52 Foam::fv::zeroDimensionalFixedPressureModel::constraint()
const
58 if (isA<zeroDimensionalFixedPressureConstraint>(constraints[i]))
60 return refCast<const zeroDimensionalFixedPressureConstraint>
68 <<
"The " << typeName <<
" fvModel requires a corresponding "
69 << zeroDimensionalFixedPressureConstraint::typeName <<
" fvConstraint"
72 return NullObjectRef<zeroDimensionalFixedPressureConstraint>();
77 void Foam::fv::zeroDimensionalFixedPressureModel::addSupType
84 <<
"Cannot add a fixed pressure source to field " << fieldName
85 <<
" because this field's equation is not in mass-conservative form"
90 void Foam::fv::zeroDimensionalFixedPressureModel::addSupType
92 fvMatrix<scalar>& eqn,
98 eqn += constraint().massSource(eqn.psi()());
102 addSupType<scalar>(eqn, fieldName);
108 void Foam::fv::zeroDimensionalFixedPressureModel::addSupType
112 const word& fieldName
115 eqn -=
fvm::SuSp(-constraint().massSource(
rho()), eqn.psi());
119 void Foam::fv::zeroDimensionalFixedPressureModel::addSupType
122 fvMatrix<scalar>& eqn,
123 const word& fieldName
130 eqn += constraint().pEqnSource(eqn);
138 eqn += constraint().massSource(
alpha(),
rho());
143 <<
"Cannot add source for density field " << fieldName
144 <<
" into an equation for " << eqn.psi().name()
150 addSupType<scalar>(
rho, eqn, fieldName);
156 void Foam::fv::zeroDimensionalFixedPressureModel::addSupType
161 const word& fieldName
168 void Foam::fv::zeroDimensionalFixedPressureModel::addSupType
172 fvMatrix<scalar>& eqn,
173 const word& fieldName
180 eqn +=
alpha*constraint().pEqnSource(eqn);
185 <<
"Cannot add source for density field " << fieldName
186 <<
" into a phase-conservative equation for "
192 <<
"Cannot add source for density field " << fieldName
193 <<
" into an equation for " << eqn.psi().name()
199 addSupType<scalar>(
alpha,
rho, eqn, fieldName);
209 const word& modelType,
219 <<
"Zero-dimensional fvModel applied to a "
237 const word& fieldName
247 fv::zeroDimensionalFixedPressureModel
254 fv::zeroDimensionalFixedPressureModel
261 fv::zeroDimensionalFixedPressureModel
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
word member() const
Return member (name without the extension)
A list of keyword definitions, which are a keyword followed by any number of values (e....
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
Mesh data needed to do the Finite Volume discretisation.
Finite volume model abstract base class.
const fvMesh & mesh() const
Return const access to the mesh database.
Zero-dimensional fixed pressure constraint. Should be used in conjunction with the zeroDimensionalFix...
Zero-dimensional fixed pressure source. Should be used in conjunction with the zeroDimensionalFixedPr...
virtual bool movePoints()
Update for mesh motion.
zeroDimensionalFixedPressureModel(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from dictionary.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
virtual bool addsSupToField(const word &fieldName) const
Return true if the fvModel adds a source term to the given.
virtual ~zeroDimensionalFixedPressureModel()
Destructor.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
label nGeometricD() const
Return the number of valid geometric dimensions in the mesh.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A class for handling words, derived from string.
Foam::fvConstraints & fvConstraints(Foam::fvConstraints::New(mesh))
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define IMPLEMENT_FV_MODEL_ADD_RHO_SUP(Type, modelType)
#define IMPLEMENT_FV_MODEL_ADD_SUP(Type, modelType)
#define IMPLEMENT_FV_MODEL_ADD_ALPHA_RHO_SUP(Type, modelType)
Calculate the matrix for implicit and explicit sources.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
addToRunTimeSelectionTable(fvConstraint, bound, dictionary)
defineTypeNameAndDebug(bound, 0)
tmp< fvMatrix< Type > > SuSp(const volScalarField::Internal &, const VolField< Type > &)
errorManipArg< error, int > exit(error &err, const int errNo=1)
FOR_ALL_FIELD_TYPES(DefineContiguousFvWallLocationDataType)
VolField< scalar > volScalarField
word name(const complex &)
Return a string representation of a complex.