mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated fixedJump BCs to enable general types (was only for scalar)
This commit is contained in:
@ -122,6 +122,7 @@ $(derivedFvPatchFields)/fan/fanFvPatchFields.C
|
|||||||
$(derivedFvPatchFields)/fanPressure/fanPressureFvPatchScalarField.C
|
$(derivedFvPatchFields)/fanPressure/fanPressureFvPatchScalarField.C
|
||||||
$(derivedFvPatchFields)/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C
|
$(derivedFvPatchFields)/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C
|
||||||
$(derivedFvPatchFields)/fixedInternalValueFvPatchField/fixedInternalValueFvPatchFields.C
|
$(derivedFvPatchFields)/fixedInternalValueFvPatchField/fixedInternalValueFvPatchFields.C
|
||||||
|
$(derivedFvPatchFields)/fixedJump/fixedJumpFvPatchFields.C
|
||||||
$(derivedFvPatchFields)/fixedJumpAMI/fixedJumpAMIFvPatchFields.C
|
$(derivedFvPatchFields)/fixedJumpAMI/fixedJumpAMIFvPatchFields.C
|
||||||
$(derivedFvPatchFields)/fixedMean/fixedMeanFvPatchFields.C
|
$(derivedFvPatchFields)/fixedMean/fixedMeanFvPatchFields.C
|
||||||
$(derivedFvPatchFields)/fixedNormalSlip/fixedNormalSlipFvPatchFields.C
|
$(derivedFvPatchFields)/fixedNormalSlip/fixedNormalSlipFvPatchFields.C
|
||||||
|
|||||||
@ -105,12 +105,12 @@ tmp<Field<Type> > jumpCyclicFvPatchField<Type>::patchNeighbourField() const
|
|||||||
tmp<Field<Type> > tpnf(new Field<Type>(this->size()));
|
tmp<Field<Type> > tpnf(new Field<Type>(this->size()));
|
||||||
Field<Type>& pnf = tpnf();
|
Field<Type>& pnf = tpnf();
|
||||||
|
|
||||||
tmp<Field<scalar> > tjf = jump();
|
tmp<Field<Type> > tjf = jump();
|
||||||
if (!this->cyclicPatch().owner())
|
if (!this->cyclicPatch().owner())
|
||||||
{
|
{
|
||||||
tjf = -tjf;
|
tjf = -tjf;
|
||||||
}
|
}
|
||||||
const Field<scalar>& jf = tjf();
|
const Field<Type>& jf = tjf();
|
||||||
|
|
||||||
if (this->doTransform())
|
if (this->doTransform())
|
||||||
{
|
{
|
||||||
@ -149,7 +149,8 @@ void jumpCyclicFvPatchField<Type>::updateInterfaceMatrix
|
|||||||
const labelUList& nbrFaceCells =
|
const labelUList& nbrFaceCells =
|
||||||
this->cyclicPatch().neighbFvPatch().faceCells();
|
this->cyclicPatch().neighbFvPatch().faceCells();
|
||||||
|
|
||||||
if (&psiInternal == &this->internalField())
|
// for AMG solve - only apply jump to finest level
|
||||||
|
if (psiInternal.size() == this->internalField().size())
|
||||||
{
|
{
|
||||||
tmp<Field<scalar> > tjf = jump()().component(cmpt);
|
tmp<Field<scalar> > tjf = jump()().component(cmpt);
|
||||||
if (!this->cyclicPatch().owner())
|
if (!this->cyclicPatch().owner())
|
||||||
@ -197,7 +198,8 @@ void jumpCyclicFvPatchField<Type>::updateInterfaceMatrix
|
|||||||
const labelUList& nbrFaceCells =
|
const labelUList& nbrFaceCells =
|
||||||
this->cyclicPatch().neighbFvPatch().faceCells();
|
this->cyclicPatch().neighbFvPatch().faceCells();
|
||||||
|
|
||||||
if (&psiInternal == &this->internalField())
|
// for AMG solve - only apply jump to finest level
|
||||||
|
if (psiInternal.size() == this->internalField().size())
|
||||||
{
|
{
|
||||||
tmp<Field<Type> > tjf = jump();
|
tmp<Field<Type> > tjf = jump();
|
||||||
if (!this->cyclicPatch().owner())
|
if (!this->cyclicPatch().owner())
|
||||||
|
|||||||
@ -72,6 +72,9 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("fixedJump");
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from patch and internal field
|
//- Construct from patch and internal field
|
||||||
|
|||||||
@ -0,0 +1,43 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "fixedJumpFvPatchFields.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
makePatchFields(fixedJump);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef fixedJumpFvPatchFields_H
|
||||||
|
#define fixedJumpFvPatchFields_H
|
||||||
|
|
||||||
|
#include "fixedJumpFvPatchField.H"
|
||||||
|
#include "fieldTypes.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
makePatchTypeFieldTypedefs(fixedJump);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef fixedJumpFvPatchFieldsFwd_H
|
||||||
|
#define fixedJumpFvPatchFieldsFwd_H
|
||||||
|
|
||||||
|
#include "fieldTypes.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type> class fixedJumpFvPatchField;
|
||||||
|
|
||||||
|
makePatchTypeFieldTypedefs(fixedJump);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user