38 namespace regionModels
40 namespace areaSurfaceFilmModels
54 { frictionMethodType::mquadraticProfile,
"quadraticProfile" },
55 { frictionMethodType::mlinearProfile,
"linearProfile" },
56 { frictionMethodType::mDarcyWeisbach,
"DarcyWeisbach" },
57 { frictionMethodType::mManningStrickler,
"ManningStrickler" }
67 { shearMethodType::msimple,
"simple" },
68 { shearMethodType::mwallFunction,
"wallFunction" }
74 filmTurbulenceModel::filmTurbulenceModel
76 const word& modelType,
82 dict_(
dict.subDict(modelType +
"Coeffs")),
83 method_(frictionMethodTypeNames_.
get(
"friction", dict_)),
84 shearMethod_(shearMethodTypeNames_.
get(
"shearStress", dict_)),
85 rhoName_(dict_.getOrDefault<
word>(
"rho",
"rho")),
117 auto&
Cw = tCw.ref();
154 const scalar Cf =
dict_.
get<scalar>(
"DarcyWeisbach");
171 Cw.primitiveFieldRef() =
179 <<
"Unimplemented method " 181 <<
"Please set 'frictionMethod' to one of " 228 = tdevRhoReff().boundaryField();
246 Sfb[patchi] & devRhoReffb[patchi]
257 const label patchi = patchFaces[i].
first();
258 const label facei = patchFaces[i].second();
260 const auto* pfld = patchFields.
get(patchi);
264 afT[i] = (*pfld)[facei];
266 afT[i].removeCollinear(nHat[i]);
281 vectorField& aForce = taForce.ref().primitiveFieldRef();
288 tshearStress.
ref() += taForce();
312 if (m.
foundObject<cmpTurbModel>(cmpTurbModel::propertiesName))
315 m.
lookupObject<cmpTurbModel>(cmpTurbModel::propertiesName);
317 return turb.devRhoReff();
319 else if (m.
foundObject<icoTurbModel>(icoTurbModel::propertiesName))
322 m.
lookupObject<icoTurbModel>(icoTurbModel::propertiesName);
335 const auto& laminarT =
352 <<
"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_
Method used.
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)
const areaScalarField & h() const
Access const reference h.
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...
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
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.
faMatrix< vector > faVectorMatrix
bool writeTime() const noexcept
True if this is a write time.
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 thermal 2D shells.
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
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.
const dimensionedScalar & h0() const
Return h0.
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
defineRunTimeSelectionTable(liquidFilmBase, dictionary)
A class for handling words, derived from Foam::string.
const areaVectorField & Uf() const
Access const reference Uf.
Fundamental fluid thermodynamic properties.
bool set(const Key &key, T *ptr)
Assign a new entry, overwrites existing.
dimensionedScalar cbrt(const dimensionedScalar &ds)
const fvMesh & primaryMesh() const noexcept
Return the reference to the primary mesh database.
static const gravity & New(const Time &runTime)
Return cached object or construct on Time.
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...
const uniformDimensionedVectorField & g
static word timeName(const scalar t, const int precision=precision_)
Return time name of given scalar time formatted with the given precision.
const dimensionSet dimDensity
const dimensionedScalar h
Planck constant.
virtual tmp< areaScalarField > Cw() const
Return the wall film surface friction.
static const GeometricField< symmTensor, fvPatchField, volMesh > & null()
Return a null geometric field.
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 method used.
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...
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.
Defines the attributes of an object for which implicit objectRegistry management is supported...
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.
word rhoName_
Name of density field (optional)
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