53 { frictionMethodType::mquadraticProfile,
"quadraticProfile" },
54 { frictionMethodType::mlinearProfile,
"linearProfile" },
55 { frictionMethodType::mDarcyWeisbach,
"DarcyWeisbach" },
56 { frictionMethodType::mManningStrickler,
"ManningStrickler" }
67 { shearMethodType::mwallFunction,
"wallFunction" }
73filmTurbulenceModel::filmTurbulenceModel
75 const word& modelType,
81 dict_(
dict.subDict(modelType +
"Coeffs")),
82 method_(frictionMethodTypeNames_.get(
"friction", dict_)),
83 shearMethod_(shearMethodTypeNames_.get(
"shearStress", dict_)),
84 rhoName_(dict_.getOrDefault<
word>(
"rho",
"rho")),
102 regionMesh.time().timeName(),
122 word(dwfNamePtr->stream()),
123 regionMesh.time().timeName(),
158 Cw.clamp_max(5000.0);
178 const auto magG(
mag(
g.value()));
183 auto& Cwp =
Cw.primitiveFieldRef();
192 const scalar Cf =
dict_.
get<scalar>(
"DarcyWeisbach");
200 const auto& primaryMesh =
film_.primaryMesh();
205 const scalar
h0 =
film_.h0().value();
207 const scalar
n =
dict_.get<scalar>(
"n");
209 Cw.primitiveFieldRef() =
217 <<
"Unimplemented method "
219 <<
"Please set 'frictionMethod' to one of "
252 tshearStress.ref() += -
fam::Sp(Cf,
U) + Cf*Up();
264 = tdevRhoReff().boundaryField();
282 Sfb[patchi] & devRhoReffb[patchi]
289 film_.regionMesh().faceAreaNormals().internalField();
293 const label patchi = patchFaces[i].
first();
294 const label facei = patchFaces[i].second();
296 const auto* pfld = patchFields.
get(patchi);
300 afT[i] = (*pfld)[facei];
302 afT[i].removeCollinear(nHat[i]);
313 vectorField& aForce = taForce.ref().primitiveFieldRef();
315 const DimensionedField<scalar, areaMesh>& magSf =
316 film_.regionMesh().S();
318 aForce = afT/(
film_.rho().primitiveField()*magSf);
320 tshearStress.ref() += taForce();
322 if (
film_.regionMesh().time().writeTime())
344 if (m.
foundObject<cmpTurbModel>(cmpTurbModel::propertiesName))
347 m.
lookupObject<cmpTurbModel>(cmpTurbModel::propertiesName);
349 return turb.devRhoReff();
351 else if (m.
foundObject<icoTurbModel>(icoTurbModel::propertiesName))
354 m.
lookupObject<icoTurbModel>(icoTurbModel::propertiesName);
365 else if (m.
foundObject<transportModel>(
"transportProperties"))
367 const auto& laminarT =
384 <<
"No valid model for viscous stress calculation"
const uniformDimensionedVectorField & g
compressible::turbulenceModel & turb
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
static tmp< GeometricField< vector, faPatchField, areaMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=faPatchField< vector >::calculatedType())
GeometricBoundaryField< vector, fvsPatchField, surfaceMesh > Boundary
const Internal::FieldType & primitiveField() const noexcept
Return a const-reference to the internal field values.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
const T * get(const Key &key) const
Return const pointer associated with given entry or a nullptr if the key does not exist in the table.
bool set(const Key &key, T *ptr)
Assign a new entry, overwrites existing.
@ NO_REGISTER
Do not request registration (bool: false).
@ NO_READ
Nothing to be read.
@ MUST_READ
Reading required.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
@ AUTO_WRITE
Automatically write from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static word scopedName(const std::string &scope, const word &name)
Create scope:name or scope_name string.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A HashTable of pointers to objects of type <T> with a label key.
T & first()
Access first element of the list, position [0].
bool get(const label i) const
Return bool value at specified position, always false for out-of-range access.
void size(const label n)
Older name for setAddressableSize.
static const word dictName
The dictionary name ("thermophysicalProperties").
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
const entry * findEntry(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry (const access) with the given keyword.
const Type & value() const noexcept
Return const reference to value.
const List< labelPair > & whichPatchFaces() const
The polyPatch/local-face for each faceLabels().
const labelList & whichPolyPatches() const
The polyPatches related to the areaMesh, in sorted order.
Fundamental fluid thermodynamic properties.
Mesh data needed to do the Finite Volume discretisation.
const surfaceVectorField & Sf() const
Return cell face area vectors.
static const gravity & New(const word &name, const Time &runTime)
Return named gravity field cached or construct on Time.
bool foundObject(const word &name, const bool recursive=false) const
Contains the named Type?
const Type & lookupObject(const word &name, const bool recursive=false) const
Lookup and return const reference to the object of the given Type. Fatal if not found or the wrong ty...
virtual tmp< volScalarField > mu() const
Dynamic viscosity of mixture [kg/m/s].
Base class for film turbulence models.
scalar rhoRef_
Reference density needed for incompressible calculations.
autoPtr< areaScalarField > dwfPtr_
Darcy-Weisbach model field.
frictionMethodType
Options for the friction models.
const liquidFilmBase & film() const
Return film.
static const Enum< frictionMethodType > frictionMethodTypeNames_
Names for friction models.
tmp< faVectorMatrix > primaryRegionFriction(areaVectorField &U) const
Return primary region friction.
static const Enum< shearMethodType > shearMethodTypeNames_
Names for shear stress models.
tmp< volSymmTensorField > devRhoReff() const
Return the effective viscous stress (laminar + turbulent).
autoPtr< areaScalarField > CwPtr_
Wall film-surface friction field.
tmp< volScalarField > rho() const
Return rho if specified otherwise rhoRef.
const frictionMethodType method_
Friction model.
const liquidFilmBase & film_
Reference to liquidFilmBase.
const shearMethodType shearMethod_
Shear-stress model.
word rhoName_
Name of density field.
const dictionary dict_
Model dictionary.
virtual tmp< areaScalarField > Cw() const
Return the wall film surface friction.
shearMethodType
Options for the shear stress models.
const dimensionedScalar & h0() const noexcept
Return h0.
tmp< areaVectorField > Up() const
Primary region velocity at film hight. Assume the film to be.
virtual const areaScalarField & mu() const =0
Access const reference mu.
virtual const areaScalarField & rho() const =0
Access const reference rho.
const areaVectorField & Uf() const noexcept
Access const reference Uf.
word UName() const
Name of the U field.
const areaScalarField & h() const noexcept
Access const reference h.
Base class for liquid-film models.
const faMesh & regionMesh() const
Return the region mesh database.
const fvMesh & primaryMesh() const noexcept
Return the reference to the primary mesh database.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for managing temporary objects.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
Base-class for all transport models used by the incompressible turbulence models.
virtual tmp< volScalarField > nu() const =0
Return the laminar viscosity.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
autoPtr< surfaceVectorField > Uf
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
zeroField Sp(const Foam::zero, const GeometricField< Type, faPatchField, areaMesh > &)
A no-op source.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
IncompressibleTurbulenceModel< transportModel > turbulenceModel
const dimensionSet dimViscosity
GeometricField< vector, fvPatchField, volMesh > volVectorField
List< label > labelList
A List of labels.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
SymmTensor< Cmpt > devTwoSymm(const SymmTensor< Cmpt > &st)
Return the deviatoric part of twice the symmetric part of a SymmTensor.
const dimensionSet dimVelocity
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
GeometricField< vector, faPatchField, areaMesh > areaVectorField
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
Field< vector > vectorField
Specialisation of Field<T> for vector.
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
dimensionedScalar cbrt(const dimensionedScalar &ds)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimDensity
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
constexpr char nl
The newline '\n' character (0x0a).
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.
psiReactionThermo & thermo
IOdictionary transportProperties(IOobject("transportProperties", runTime.constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
#define forAll(list, i)
Loop across all elements in list.