30 #include "surfaceInterpolate.H" 53 void Foam::fv::volumeFractionSource::readCoeffs()
55 phiName_ = coeffs().lookupOrDefault<word>(
"phi",
"phi");
56 rhoName_ = coeffs().lookupOrDefault<word>(
"rho",
"rho");
57 UName_ = coeffs().lookupOrDefault<word>(
"U",
"U");
59 volumePhaseName_ = coeffs().lookup<word>(
"volumePhase");
67 if (!
mesh().foundObject<volScalarField>(alphaName))
75 mesh().time().constant(),
105 momentumTransportModel::typeName
108 return turbulence.
nuEff();
112 const thermophysicalTransportModel& ttm =
113 mesh().lookupObject<thermophysicalTransportModel>
115 thermophysicalTransportModel::typeName
119 fieldName == ttm.thermo().T().name()
121 : fieldName == ttm.thermo().he().name()
123 : ttm.momentumTransport().rho()*ttm.momentumTransport().nuEff();
128 <<
"Dimensions of " << phi.name() <<
" not recognised" 130 return tmp<volScalarField>(
nullptr);
135 template <
class Type,
class AlphaFieldType>
136 void Foam::fv::volumeFractionSource::addGeneralSup
138 const AlphaFieldType& alpha,
140 const word& fieldName
153 const word divScheme =
"div(" + phiName +
"," + eqn.psi().name() +
")";
154 eqn -= AByB*
fvm::div(phi, eqn.psi(), divScheme);
157 const word laplacianScheme =
158 "laplacian(" + D.name() +
"," + eqn.psi().name() +
")";
165 template<
class Type,
class AlphaFieldType>
166 void Foam::fv::volumeFractionSource::addAlphaSupType
168 const AlphaFieldType& alpha,
170 const word& fieldName
173 addGeneralSup(alpha, eqn, fieldName);
177 template<
class AlphaFieldType>
178 void Foam::fv::volumeFractionSource::addAlphaSupType
180 const AlphaFieldType& alpha,
181 fvMatrix<scalar>& eqn,
182 const word& fieldName
198 addGeneralSup(alpha, eqn, fieldName);
203 template<
class AlphaFieldType>
204 void Foam::fv::volumeFractionSource::addAlphaSupType
206 const AlphaFieldType& alpha,
207 fvMatrix<vector>& eqn,
208 const word& fieldName
220 const word
scheme(
"div(" + phiName +
"," + eqn.psi().name() +
")");
226 addGeneralSup(alpha, eqn, fieldName);
232 void Foam::fv::volumeFractionSource::addSupType
235 const word& fieldName
238 addAlphaSupType(geometricOneField(), eqn, fieldName);
243 void Foam::fv::volumeFractionSource::addSupType
247 const word& fieldName
250 addAlphaSupType(geometricOneField(), eqn, fieldName);
255 void Foam::fv::volumeFractionSource::addSupType
260 const word& fieldName
263 addAlphaSupType(alpha, eqn, fieldName);
272 const word& modelType,
277 fvModel(name, modelType, dict, mesh),
#define IMPLEMENT_FV_MODEL_ADD_ALPHA_RHO_SUP(Type, modelType)
defineTypeNameAndDebug(fixedTemperatureConstraint, 0)
virtual ~volumeFractionSource()
Destructor.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool read(const dictionary &dict)
Read dictionary.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
virtual bool read(const dictionary &dict)
Read source dictionary.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
static tmp< surfaceInterpolationScheme< Type > > scheme(const surfaceScalarField &faceFlux, Istream &schemeData)
Return weighting factors for scheme given from Istream.
virtual bool movePoints()
Update for mesh motion.
Calculate the matrix for the laplacian of the field.
word member() const
Return member (name without the extension)
Finite volume model abstract base class.
word group() const
Return group (extension part of name)
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
compressibleMomentumTransportModel momentumTransportModel
const dimensionSet dimTime
virtual wordList addSupFields() const
Return the list of fields for which the fvModel adds source term.
A class for handling words, derived from string.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
static word groupName(Name name, const word &group)
This fvModel adds transport terms into the equations to account for the presence of a constant volume...
static const word null
An empty word.
#define IMPLEMENT_FV_MODEL_ADD_SUP(Type, modelType)
Calculate the divergence of the given field.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
const dimensionSet dimMass
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
volumeFractionSource(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
addToRunTimeSelectionTable(fvConstraint, fixedTemperatureConstraint, dictionary)
Calculate the matrix for the divergence of the given field and flux.
List< word > wordList
A List of words.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
#define IMPLEMENT_FV_MODEL_ADD_RHO_SUP(Type, modelType)
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Mesh data needed to do the Finite Volume discretisation.
virtual bool addsSupToField(const word &fieldName) const
Return true if the fvModel adds a source term to the given.
const dimensionSet dimVolume
FOR_ALL_FIELD_TYPES(DefineFvWallInfoType)
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Class containing mesh-to-mesh mapping information.
virtual tmp< volScalarField > nuEff() const =0
Return the effective viscosity.