30 #include "surfaceInterpolate.H"
48 "volumeFractionSource"
56 void Foam::fv::volumeBlockage::readCoeffs()
70 if (!mesh().foundObject<volScalarField>(alphaName))
78 mesh().time().constant(),
112 const fluidThermophysicalTransportModel& ttm =
113 mesh().lookupType<fluidThermophysicalTransportModel>();
116 fieldName == ttm.thermo().T().name()
118 : fieldName == ttm.thermo().he().name()
119 ? ttm.kappaEff()/ttm.thermo().Cpv()
120 : ttm.momentumTransport().rho()*ttm.momentumTransport().nuEff();
125 <<
"Dimensions of " << phi.name() <<
" not recognised"
128 return tmp<volScalarField>(
nullptr);
133 template <
class Type,
class AlphaFieldType>
134 void Foam::fv::volumeBlockage::addGeneralSupType
136 const AlphaFieldType&
alpha,
150 const word divScheme =
"div(" + phiName +
"," + eqn.psi().name() +
")";
151 eqn -= AByB*
fvm::div(phi, eqn.psi(), divScheme);
154 const word laplacianScheme =
155 "laplacian(" +
D.
name() +
"," + eqn.psi().name() +
")";
162 template<
class Type,
class AlphaFieldType>
163 void Foam::fv::volumeBlockage::addAlphaSupType
165 const AlphaFieldType&
alpha,
166 const VolField<Type>& field,
170 addGeneralSupType(
alpha, eqn);
174 template<
class AlphaFieldType>
175 void Foam::fv::volumeBlockage::addAlphaSupType
177 const AlphaFieldType&
alpha,
179 fvMatrix<scalar>& eqn
195 addGeneralSupType(
alpha, eqn);
200 template<
class AlphaFieldType>
201 void Foam::fv::volumeBlockage::addAlphaSupType
203 const AlphaFieldType&
alpha,
205 fvMatrix<vector>& eqn
217 const word
scheme(
"div(" + phiName +
"," + eqn.psi().name() +
")");
223 addGeneralSupType(
alpha, eqn);
229 void Foam::fv::volumeBlockage::addSupType
231 const VolField<Type>& field,
235 addAlphaSupType(geometricOneField(), field, eqn);
240 void Foam::fv::volumeBlockage::addSupType
243 const VolField<Type>& field,
247 addAlphaSupType(geometricOneField(), field, eqn);
252 void Foam::fv::volumeBlockage::addSupType
256 const VolField<Type>& field,
260 addAlphaSupType(
alpha, field, eqn);
269 const word& modelType,
275 phiName_(
word::null),
276 rhoName_(
word::null),
278 volumePhaseName_(
word::null)
318 bool Foam::
fv::volumeBlockage::movePoints()
static const Foam::dimensionedScalar B("B", Foam::dimless, 18.678)
static const Foam::dimensionedScalar D("D", Foam::dimTemperature, 257.14)
Macros for easy insertion into run-time selection tables.
Generic GeometricField class.
word group() const
Return group (extension part of name)
word member() const
Return member (name without the extension)
static word groupName(Name name, const word &group)
A list of keyword definitions, which are a keyword followed by any number of values (e....
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T, if not found return the given default.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const word & name() const
Return const reference to name.
Mesh data needed to do the Finite Volume discretisation.
Finite volume model abstract base class.
const dictionary & coeffs() const
Return dictionary.
virtual bool read(const dictionary &dict)
Read source dictionary.
This fvModel adds transport terms into the equations to account for the presence of a constant volume...
virtual wordList addSupFields() const
Return the list of fields for which the fvModel adds source term.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
volumeBlockage(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from components.
virtual bool read(const dictionary &dict)
Read dictionary.
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 ~volumeBlockage()
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.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A class for managing temporary objects.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define IMPLEMENT_FV_MODEL_ADD_FIELD_SUP(Type, modelType)
#define IMPLEMENT_FV_MODEL_ADD_ALPHA_RHO_FIELD_SUP(Type, modelType)
#define IMPLEMENT_FV_MODEL_ADD_RHO_FIELD_SUP(Type, modelType)
Calculate the divergence of the given field.
Calculate the matrix for the divergence of the given field and flux.
Calculate the matrix for the laplacian of the field.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
compressibleMomentumTransportModel momentumTransportModel
addToRunTimeSelectionTable(fvConstraint, bound, dictionary)
defineTypeNameAndDebug(bound, 0)
addBackwardCompatibleToRunTimeSelectionTable(fvConstraint, fixedTemperature, dictionary, fixedTemperatureConstraint, "fixedTemperatureConstraint")
static tmp< surfaceInterpolationScheme< Type > > scheme(const surfaceScalarField &faceFlux, Istream &schemeData)
Return weighting factors for scheme given from Istream.
static tmp< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
tmp< fvMatrix< Type > > laplacian(const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const VolField< Type > &vf, const word &name)
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< word > wordList
A List of words.
VolField< vector > volVectorField
word name(const bool)
Return a word representation of a bool.
SurfaceField< scalar > surfaceScalarField
const dimensionSet dimTime
const dimensionSet dimVolume
VolField< scalar > volScalarField
const dimensionSet dimMass
FOR_ALL_FIELD_TYPES(makeFieldSourceTypedef)
autoPtr< incompressible::momentumTransportModel > turbulence(incompressible::momentumTransportModel::New(U, phi, viscosity))