35 namespace laminarModels
40 template<
class BasicMomentumTransportModel>
41 PtrList<dimensionedScalar>
50 if (modeCoefficients_.size())
52 if (this->coeffDict().found(name))
55 <<
"Using 'modes' list, '" << name <<
"' entry will be ignored." 59 forAll(modeCoefficients_, modei)
68 modeCoefficients_[modei].
lookup(name)
82 this->coeffDict_.lookup(name)
91 template<
class BasicMomentumTransportModel>
98 return -
fvm::Sp(this->alpha_*this->rho_/lambdas_[modei], sigma);
104 template<
class BasicMomentumTransportModel>
129 this->coeffDict().found(
"modes")
132 this->coeffDict().lookup(
"modes")
137 nModes_(modeCoefficients_.size() ? modeCoefficients_.size() : 1),
139 nuM_(
"nuM",
dimViscosity, this->coeffDict_.lookup(
"nuM")),
141 lambdas_(readModeCoefficients(
"lambda",
dimTime)),
148 this->runTime_.timeName(),
158 sigmas_.setSize(nModes_);
165 this->runTime_.timeName(),
173 Info<<
" Reading mode stress field " 174 << header.name() <<
endl;
184 this->runTime_.timeName(),
203 this->runTime_.timeName(),
215 if (type == typeName)
217 this->printCoeffs(type);
224 template<
class BasicMomentumTransportModel>
229 if (modeCoefficients_.size())
231 this->coeffDict().lookup(
"modes") >> modeCoefficients_;
234 nuM_.read(this->coeffDict());
236 lambdas_ = readModeCoefficients(
"lambda",
dimTime);
247 template<
class BasicMomentumTransportModel>
258 template<
class BasicMomentumTransportModel>
264 return this->nu(patchi);
268 template<
class BasicMomentumTransportModel>
275 template<
class BasicMomentumTransportModel>
281 this->alpha_*this->rho_*sigma_
282 - (this->alpha_*this->rho_*this->nu())
288 template<
class BasicMomentumTransportModel>
298 this->alpha_*this->rho_*this->nuM_*
fvc::grad(U)
300 +
fvc::div(this->alpha_*this->rho_*sigma_)
307 template<
class BasicMomentumTransportModel>
328 template<
class BasicMomentumTransportModel>
359 this->alphaRhoPhi_.group()
361 this->runTime_.constant(),
382 "div(" + alphaRhoPhi.
name() +
',' + sigma_.name() +
')' 386 + sigmaSource(modei, sigma)
387 + fvModels.source(alpha, rho, sigma)
392 sigmaEqn.solve(
"sigma");
400 for (
label modei = 1; modei<sigmas_.size(); modei++)
402 sigmaSum += sigmas_[modei];
const dimensionSet dimViscosity
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.
virtual tmp< volSymmTensorField > devTau() const
Return the effective stress tensor.
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.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< scalar >> &)
Return a temporary field constructed from name,.
Ostream & endl(Ostream &os)
Add newline and flush stream.
BasicMomentumTransportModel::rhoField rhoField
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
BasicMomentumTransportModel::alphaField alphaField
PtrList< dimensionedScalar > readModeCoefficients(const word &name, const dimensionSet &dims) const
BasicMomentumTransportModel::transportModel transportModel
virtual tmp< volScalarField > nuEff() const
Return the effective viscosity, i.e. the laminar viscosity.
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
const dimensionSet dimTime
Dimension set for the base types.
stressControl lookup("compactNormalStress") >> compactNormalStress
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
Foam::fvConstraints & fvConstraints
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)
virtual tmp< fvVectorMatrix > divDevTau(volVectorField &U) const
Return the source term for the momentum equation.
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.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
virtual tmp< volSymmTensorField > sigma() const
Return the stress tensor [m^2/s^2].
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.
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
Foam::fvModels & fvModels
virtual void correct()
Solve the turbulence equations and correct eddy-Viscosity and.
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
Finite volume constraints.
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.
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
A class for managing temporary objects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...