49 void Foam::fv::waveForcing::readCoeffs()
55 lambdaBoundaryCoeff_ =
60 Info<<
" Volume average region length "
61 << regionLength_.value() <<
endl;
72 return tmp<volScalarField::Internal>(scale_());
77 Foam::fv::waveForcing::forceCoeff()
const
84 waves_.maxWaveSpeed(mesh().time().deltaTValue())
87 lambda_ = lambdaCoeff_*waveSpeed/regionLength_;
88 lambdaBoundary_ = lambdaBoundaryCoeff_*waveSpeed/regionLength_;
100 const word& modelType,
107 lambdaBoundaryCoeff_(0),
108 regionLength_(
"regionLength",
dimLength, 0),
110 liquidPhaseName_(coeffs().lookup<
word>(
"liquidPhase")),
111 alphaName_(
IOobject::groupName(
"alpha", liquidPhaseName_)),
112 UName_(coeffs().lookupOrDefault<
word>(
"U",
"U")),
124 return {alphaName_, UName_};
139 eqn += forceCoeff*alphaWaves_();
151 if (
U.name() == UName_ && &
U == &eqn.
psi())
156 eqn += forceCoeff*Uwaves_();
199 const scalar t = mesh().time().value();
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &, const Field< Type > &)
Return a temporary field constructed from name, mesh,.
Generic GeometricField class.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
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.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
Finite volume model abstract base class.
const dictionary & coeffs() const
Return dictionary.
Base fvModel for forcing functions.
void readLambda()
Read the forcing coefficients.
void writeForceFields() const
Optionally write the forcing fields:
virtual bool read(const dictionary &dict)
Read dictionary.
virtual tmp< volScalarField::Internal > forceCoeff() const
Return the force coefficient.
dimensionedScalar regionLength() const
Calculate and return the volume average forcing region length.
virtual tmp< volScalarField::Internal > scale() const
Return the scale distribution.
This fvModel applies forcing to the liquid phase-fraction field and all components of the vector fiel...
virtual bool movePoints()
Update for mesh motion.
virtual wordList addSupFields() const
Return the list of fields for which the fvModel adds source term.
virtual void correct()
Correct the wave forcing coefficients.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
virtual bool read(const dictionary &dict)
Read dictionary.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
virtual void addSup(const volScalarField &alpha, fvMatrix< scalar > &eqn) const
Source term to VoF phase-fraction equation.
waveForcing(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from components.
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 wrapper around a list of wave models. Superimposes the modelled values of elevation and velocity....
A class for handling words, derived from string.
Calculate the first temporal derivative.
Calculate the divergence of the given field.
Calculate the matrix for implicit and explicit sources.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
const dimensionedScalar h
Planck constant.
addToRunTimeSelectionTable(fvConstraint, bound, dictionary)
defineTypeNameAndDebug(bound, 0)
tmp< VolField< Type > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const VolField< Type > &)
tmp< scalarField > levelSetFraction(const fvMesh &mesh, const scalarField &levelC, const scalarField &levelP, const bool above)
Calculate the volume-fraction that a level set occupies. This gives the.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
const dimensionSet dimless
const dimensionSet dimLength
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
const dimensionSet dimVelocity
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< Field< Type > > levelSetAverage(const fvMesh &mesh, const scalarField &levelC, const scalarField &levelP, const Field< Type > &positiveC, const Field< Type > &positiveP, const Field< Type > &negativeC, const Field< Type > &negativeP)
Calculate the average value of two fields, one on each side of a level set.