37 namespace regionModels
39 namespace areaSurfaceFilmModels
53 { frictionMethodType::mquadraticProfile,
"quadraticProfile" },
54 { frictionMethodType::mlinearProfile,
"linearProfile" },
55 { frictionMethodType::mDarcyWeisbach,
"DarcyWeisbach" },
56 { frictionMethodType::mManningStrickler,
"ManningStrickler" }
66 { shearMethodType::msimple,
"simple" },
67 { shearMethodType::mwallFunction,
"wallFunction" }
73 filmTurbulenceModel::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")),
111 auto&
Cw = tCw.ref();
125 Cw.clamp_max(5000.0);
148 const scalar Cf =
dict_.
get<scalar>(
"DarcyWeisbach");
165 Cw.primitiveFieldRef() =
173 <<
"Unimplemented method " 175 <<
"Please set 'frictionMethod' to one of " 208 tshearStress.ref() += -
fam::Sp(Cf,
U) + Cf*Up();
220 = tdevRhoReff().boundaryField();
238 Sfb[patchi] & devRhoReffb[patchi]
249 const label patchi = patchFaces[i].
first();
250 const label facei = patchFaces[i].second();
252 const auto* pfld = patchFields.
get(patchi);
256 afT[i] = (*pfld)[facei];
258 afT[i].removeCollinear(nHat[i]);
269 vectorField& aForce = taForce.ref().primitiveFieldRef();
276 tshearStress.ref() += taForce();
300 if (m.
foundObject<cmpTurbModel>(cmpTurbModel::propertiesName))
303 m.
lookupObject<cmpTurbModel>(cmpTurbModel::propertiesName);
305 return turb.devRhoReff();
307 else if (m.
foundObject<icoTurbModel>(icoTurbModel::propertiesName))
310 m.
lookupObject<icoTurbModel>(icoTurbModel::propertiesName);
323 const auto& laminarT =
340 <<
"No valid model for viscous stress calculation" List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
word dictName() const
The local dictionary name (final part of scoped name)
const Type & value() const noexcept
Return const reference to value.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
void size(const label n)
Older name for setAddressableSize.
const frictionMethodType method_
Friction model.
const surfaceVectorField & Sf() const
Return cell face area vectors.
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...
const Internal::FieldType & primitiveField() const noexcept
Return a const-reference to the internal field values.
static const Enum< shearMethodType > shearMethodTypeNames_
Names for shear stress models.
const dictionary dict_
Model dictionary.
const liquidFilmBase & film() const
Return film.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
tmp< areaVectorField > Up() const
Primary region velocity at film hight. Assume the film to be.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
tmp< faVectorMatrix > primaryRegionFriction(areaVectorField &U) const
Return primary region friction.
const Time & time() const
Return reference to time.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const Internal & internalField() const noexcept
Return a const-reference to the dimensioned internal field.
constexpr char nl
The newline '\n' character (0x0a)
static const Enum< frictionMethodType > frictionMethodTypeNames_
Names for friction models.
T & first()
Access first element of the list, position [0].
const dimensionSet dimViscosity
compressible::turbulenceModel & turb
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
const DimensionedField< scalar, areaMesh > & S() const
Return face areas.
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type get(const label i) const
Return bool value at specified position, always false for out-of-range access.
A HashTable of pointers to objects of type <T> with a label key.
const labelList & whichPolyPatches() const
The polyPatches related to the areaMesh, in sorted order.
bool writeTime() const noexcept
True if this is a write interval.
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
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 Time & time() const
Return the top-level database.
defineTypeNameAndDebug(kinematicThinFilm, 0)
Base class for liquid-film models.
frictionMethodType
Options for the friction models.
#define forAll(list, i)
Loop across all elements in list.
Templated abstract base class for single-phase incompressible turbulence models.
tmp< volSymmTensorField > devRhoReff() const
Return the effective viscous stress (laminar + turbulent)
zeroField Sp(const Foam::zero, const GeometricField< Type, faPatchField, areaMesh > &)
A no-op source.
const liquidFilmBase & film_
Reference to liquidFilmBase.
defineRunTimeSelectionTable(liquidFilmBase, dictionary)
A class for handling words, derived from Foam::string.
Fundamental fluid thermodynamic properties.
bool set(const Key &key, T *ptr)
Assign a new entry, overwrites existing.
dimensionedScalar cbrt(const dimensionedScalar &ds)
const areaScalarField & h() const noexcept
Access const reference h.
const fvMesh & primaryMesh() const noexcept
Return the reference to the primary mesh database.
const faMesh & regionMesh() const
Return the region mesh database.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
IOdictionary transportProperties(IOobject("transportProperties", runTime.constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
autoPtr< surfaceVectorField > Uf
tmp< volScalarField > rho() const
Return rho if specified otherwise rhoRef.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
static tmp< GeometricField< scalar, faPatchField, areaMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=faPatchField< scalar >::calculatedType())
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions and patch type. [Takes current timeN...
const uniformDimensionedVectorField & g
static const gravity & New(const word &name, const Time &runTime)
Return named gravity field cached or construct on Time.
const dimensionSet dimDensity
const dimensionedScalar h
Planck constant.
virtual tmp< areaScalarField > Cw() const
Return the wall film surface friction.
const dimensionedScalar mu
Atomic mass unit.
List< word > sortedToc() const
The sorted list of enum names.
scalar rhoRef_
Reference density needed for incompressible calculations.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const shearMethodType shearMethod_
Shear-stress model.
Base-class for all transport models used by the incompressible turbulence models. ...
Mesh data needed to do the Finite Volume discretisation.
virtual const areaScalarField & rho() const =0
Access const reference rho.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const areaVectorField & Uf() const noexcept
Access const reference Uf.
bool foundObject(const word &name, const bool recursive=false) const
Is the named Type found?
virtual const areaScalarField & mu() const =0
Access const reference mu.
const List< labelPair > & whichPatchFaces() const
The polyPatch/local-face for each faceLabels()
A class for managing temporary objects.
shearMethodType
Options for the shear stress models.
const areaVectorField & faceAreaNormals() const
Return face area normals.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
word UName() const
Name of the U field.
Do not request registration (bool: false)
word rhoName_
Name of density field.
const dimensionedScalar & h0() const noexcept
Return h0.
SymmTensor< Cmpt > devTwoSymm(const SymmTensor< Cmpt > &st)
Return the deviatoric part of twice the symmetric part of a SymmTensor.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
static constexpr const zero Zero
Global zero (0)
const dimensionSet dimVelocity