Zero-dimensional fixed pressure constraint. Should be used in conjunction with the zeroDimensionalFixedPressureModel. More...


Public Member Functions | |
| TypeName ("zeroDimensionalFixedPressure") | |
| Runtime type information. More... | |
| zeroDimensionalFixedPressureConstraint (const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict) | |
| Construct from dictionary. More... | |
| virtual | ~zeroDimensionalFixedPressureConstraint () |
| Destructor. More... | |
| const word & | pName () const |
| Pressure field name. More... | |
| const word & | rhoName () const |
| Density field name. More... | |
| virtual wordList | constrainedFields () const |
| Return the list of fields constrained by the fvConstraint. More... | |
| tmp< volScalarField::Internal > | pEqnSource (const volScalarField &rho, fvMatrix< scalar > &pEqn) const |
| Return the mass or volume source for the pressure equation. More... | |
| tmp< volScalarField::Internal > | massSource (const volScalarField::Internal &rho) const |
| Return the mass source. More... | |
| tmp< volScalarField::Internal > | massSource (const volScalarField::Internal &alpha, const volScalarField::Internal &rho) const |
| Return the mass source for a given phase. More... | |
| virtual bool | constrain (fvMatrix< scalar > &pEqn, const word &fieldName) const |
| Apply the constraint to the pressure equation. More... | |
| virtual bool | movePoints () |
| Update for mesh motion. More... | |
| virtual void | topoChange (const polyTopoChangeMap &) |
| Update topology using the given map. More... | |
| virtual void | mapMesh (const polyMeshMap &) |
| Update from another mesh using the given map. More... | |
| virtual void | distribute (const polyDistributionMap &) |
| Redistribute or update using the given distribution map. More... | |
| virtual bool | read (const dictionary &dict) |
| Read dictionary. More... | |
| template<class AlphaFieldType > | |
| Foam::tmp< Foam::volScalarField::Internal > | massSource (const AlphaFieldType &alpha, const volScalarField::Internal &rho) const |
Public Member Functions inherited from fvConstraint | |
| TypeName ("fvConstraint") | |
| Runtime type information. More... | |
| declareRunTimeSelectionTable (autoPtr, fvConstraint, dictionary,(const word &name, const word &constraintType, const fvMesh &mesh, const dictionary &dict),(name, constraintType, mesh, dict)) | |
| fvConstraint (const word &name, const word &constraintType, const fvMesh &mesh, const dictionary &dict) | |
| Construct from components. More... | |
| autoPtr< fvConstraint > | clone () const |
| Return clone. More... | |
| virtual | ~fvConstraint () |
| Destructor. More... | |
| const word & | name () const |
| Return const access to the source name. More... | |
| const fvMesh & | mesh () const |
| Return const access to the mesh database. More... | |
| const dictionary & | coeffs (const dictionary &) const |
| Return the coefficients sub-dictionary. More... | |
| virtual bool | constrainsField (const word &fieldName) const |
| Return true if the given field is constrained. More... | |
| FOR_ALL_FIELD_TYPES (DEFINE_FV_CONSTRAINT_CONSTRAIN) | |
| Apply a constraint to an equation. More... | |
| FOR_ALL_FIELD_TYPES (DEFINE_FV_CONSTRAINT_CONSTRAIN_FIELD) | |
| Apply constraint to a field. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from fvConstraint | |
| static autoPtr< fvConstraint > | New (const word &name, const fvMesh &mesh, const dictionary &dict) |
| Return a reference to the selected fvConstraint. More... | |
Zero-dimensional fixed pressure constraint. Should be used in conjunction with the zeroDimensionalFixedPressureModel.
This constraint and model facilitates specification of a constant or time-varying pressure. It adds mass source terms proportional to the error that remains when the pressure equation is evaluated at the desired pressure. Iteration may be necessary to converge the constraint in the case of non-linear equations of state.
Properties are added or removed with their current value. The model therefore represents a uniform expansion or contraction in infinite space.
{
type zeroDimensionalFixedPressure;
// Name of the pressure field, default = p
//p p;
// Name of the density field, default = rho
//rho rho;
// Pressure value
pressure 1e5;
}
Definition at line 78 of file zeroDimensionalFixedPressureConstraint.H.
| zeroDimensionalFixedPressureConstraint | ( | const word & | name, |
| const word & | modelType, | ||
| const fvMesh & | mesh, | ||
| const dictionary & | dict | ||
| ) |
Construct from dictionary.
Definition at line 140 of file zeroDimensionalFixedPressureConstraint.C.
References fvConstraint::coeffs(), dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, fvConstraint::mesh(), and polyMesh::nGeometricD().

|
virtual |
Destructor.
Definition at line 169 of file zeroDimensionalFixedPressureConstraint.C.
| TypeName | ( | "zeroDimensionalFixedPressure" | ) |
Runtime type information.
|
inline |
Pressure field name.
Definition at line 141 of file zeroDimensionalFixedPressureConstraint.H.
|
inline |
Density field name.
Definition at line 147 of file zeroDimensionalFixedPressureConstraint.H.
|
virtual |
Return the list of fields constrained by the fvConstraint.
Reimplemented from fvConstraint.
Definition at line 177 of file zeroDimensionalFixedPressureConstraint.C.
| Foam::tmp< Foam::volScalarField::Internal > pEqnSource | ( | const volScalarField & | rho, |
| fvMatrix< scalar > & | pEqn | ||
| ) | const |
Return the mass or volume source for the pressure equation.
Definition at line 184 of file zeroDimensionalFixedPressureConstraint.C.
References fvMatrix< Type >::dimensions(), Foam::dimMass, Foam::dimVolume, Foam::exit(), Foam::FatalError, FatalErrorInFunction, mesh, DimensionedField< Type, GeoMesh, PrimitiveField >::New(), fvMatrix< Type >::psi(), rho, and Foam::typedName().

| Foam::tmp< Foam::volScalarField::Internal > massSource | ( | const volScalarField::Internal & | rho | ) | const |
Return the mass source.
Definition at line 227 of file zeroDimensionalFixedPressureConstraint.C.
References rho.
| Foam::tmp< Foam::volScalarField::Internal > massSource | ( | const volScalarField::Internal & | alpha, |
| const volScalarField::Internal & | rho | ||
| ) | const |
Return the mass source for a given phase.
Definition at line 237 of file zeroDimensionalFixedPressureConstraint.C.

Apply the constraint to the pressure equation.
Definition at line 247 of file zeroDimensionalFixedPressureConstraint.C.
References IOobject::AUTO_WRITE, fvMatrix< Type >::dimensions(), Foam::dimPressure, Foam::dimVolume, mesh, Foam::name(), DimensionedField< Type, GeoMesh, PrimitiveField >::New(), IOobject::READ_IF_PRESENT, and Foam::typedName().

|
virtual |
Update for mesh motion.
Implements fvConstraint.
Definition at line 300 of file zeroDimensionalFixedPressureConstraint.C.
|
virtual |
Update topology using the given map.
Implements fvConstraint.
Definition at line 306 of file zeroDimensionalFixedPressureConstraint.C.
|
virtual |
Update from another mesh using the given map.
Implements fvConstraint.
Definition at line 313 of file zeroDimensionalFixedPressureConstraint.C.
|
virtual |
Redistribute or update using the given distribution map.
Implements fvConstraint.
Definition at line 320 of file zeroDimensionalFixedPressureConstraint.C.
|
virtual |
Read dictionary.
Reimplemented from fvConstraint.
Definition at line 327 of file zeroDimensionalFixedPressureConstraint.C.
References dict, and fvConstraint::read().

| Foam::tmp<Foam::volScalarField::Internal> massSource | ( | const AlphaFieldType & | alpha, |
| const volScalarField::Internal & | rho | ||
| ) | const |
Definition at line 78 of file zeroDimensionalFixedPressureConstraint.C.
References alpha(), Foam::dimless, Foam::dimMass, Foam::dimTime, Foam::dimVolume, Foam::exit(), Foam::FatalError, FatalErrorInFunction, mesh, DimensionedField< Type, GeoMesh, PrimitiveField >::New(), rho, and Foam::typedName().
