34 namespace laminarModels
39 template<
class BasicMomentumTransportModel>
49 if (modeCoefficients_.size())
51 if (this->coeffDict().found(name))
54 <<
"Using 'modes' list, '" << name <<
"' entry will be ignored." 58 forAll(modeCoefficients_, modei)
67 modeCoefficients_[modei].
lookup(name)
81 this->coeffDict_.lookup(name)
90 template<
class BasicMomentumTransportModel>
97 return -
fvm::Sp(this->alpha_*this->rho_/lambdas_[modei], sigma);
103 template<
class BasicMomentumTransportModel>
128 this->coeffDict().found(
"modes")
131 this->coeffDict().lookup(
"modes")
136 nModes_(modeCoefficients_.size() ? modeCoefficients_.size() : 1),
144 this->coeffDict_.lookup(
"nuM")
148 lambdas_(readModeCoefficients(
"lambda",
dimTime)),
155 this->runTime_.timeName(),
165 sigmas_.setSize(nModes_);
172 this->runTime_.timeName(),
180 Info<<
" Reading mode stress field " 181 << header.name() <<
endl;
191 this->runTime_.timeName(),
210 this->runTime_.timeName(),
222 if (type == typeName)
224 this->printCoeffs(type);
231 template<
class BasicMomentumTransportModel>
236 if (modeCoefficients_.size())
238 this->coeffDict().lookup(
"modes") >> modeCoefficients_;
241 nuM_.readIfPresent(this->coeffDict());
243 lambdas_ = readModeCoefficients(
"lambda",
dimTime);
254 template<
class BasicMomentumTransportModel>
262 template<
class BasicMomentumTransportModel>
269 this->alpha_*this->rho_*sigma_
270 - (this->alpha_*this->rho_*this->nu())
276 template<
class BasicMomentumTransportModel>
287 this->alpha_*this->rho_*this->nuM_*
fvc::grad(U)
289 +
fvc::div(this->alpha_*this->rho_*sigma_)
296 template<
class BasicMomentumTransportModel>
317 template<
class BasicMomentumTransportModel>
344 this->alphaRhoPhi_.group()
346 this->runTime_.constant(),
367 "div(" + alphaRhoPhi.
name() +
',' + sigma_.name() +
')' 371 + sigmaSource(modei, sigma)
377 sigmaEqn.solve(
"sigma");
385 for (
label modei = 1; modei<sigmas_.size(); modei++)
387 sigmaSum += sigmas_[modei];
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Templated abstract base class for laminar transport models.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return name.
bool set(const label) const
Is element set.
Maxwell(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &type=typeName)
Construct from components.
PtrList< dimensionedScalar > readModeCoefficients(const word &name, const dimensionSet &dims) const
void correct(GeometricField< Type, fvPatchField, volMesh > &field)
Apply correction to field.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
static tmp< GeometricField< symmTensor, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< symmTensor >> &)
Return a temporary field constructed from name,.
const dimensionSet dimViscosity
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual tmp< fvVectorMatrix > divDevTau(volVectorField &U) const
Return the source term for the momentum equation.
BasicMomentumTransportModel::rhoField rhoField
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
BasicMomentumTransportModel::alphaField alphaField
virtual tmp< volSymmTensorField > devTau() const
Return the effective stress tensor.
BasicMomentumTransportModel::transportModel transportModel
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
Dimension set for the base types.
stressControl lookup("compactNormalStress") >> compactNormalStress
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
virtual tmp< fvSymmTensorMatrix > sigmaSource(const label modei, volSymmTensorField &sigma) const
A class for handling words, derived from string.
static word groupName(Name name, const word &group)
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
static const word null
An empty word.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
void constrain(fvMatrix< Type > &eqn)
Apply constraints to equation.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
virtual bool read()
Read model coefficients if they have changed.
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
word name(const complex &)
Return a string representation of a complex.
virtual void correct()
Solve the turbulence equations and correct eddy-Viscosity and.
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
virtual tmp< volSymmTensorField > sigma() const
Return the stress tensor [m^2/s^2].
virtual void correct()
Correct the laminar transport.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
A class for managing temporary objects.
static options & New(const fvMesh &mesh)
Construct fvOptions and register to datbase if not present.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...