41 template<
class BasicMomentumTransportModel>
50 const scalar Cpm = pm.
dict().
lookup<scalar>(
C.name());
63 template<
class BasicMomentumTransportModel>
74 const scalar Cpm = pm.
dict().
lookup<scalar>(
C.name());
81 C[celli] = Cpm*Av[celli];
87 template<
class BasicMomentumTransportModel>
98 if (isA<fv::porosityForce>(
fvModels[i]))
101 refCast<const fv::porosityForce>(
fvModels[i]);
103 if (isA<porosityModels::powerLawLopesdaCosta>(eps.
model()))
106 refCast<const porosityModels::powerLawLopesdaCosta>
111 setPorosityCoefficient(Cmu_, pm);
112 setPorosityCoefficient(C1_, pm);
113 setPorosityCoefficient(C2_, pm);
114 setPorosityCoefficient(sigmak_, pm);
115 setPorosityCoefficient(sigmaEps_, pm);
118 setPorosityCoefficient(betap_, pm);
119 setPorosityCoefficient(betad_, pm);
120 setPorosityCoefficient(C4_, pm);
121 setPorosityCoefficient(C5_, pm);
128 template<
class BasicMomentumTransportModel>
133 epsilon_ =
max(epsilon_, tCmuk2()/(this->nutMaxCoeff_*this->nu()));
138 template<
class BasicMomentumTransportModel>
141 this->nut_ = boundEpsilon()/epsilon_;
142 this->nut_.correctBoundaryConditions();
147 template<
class BasicMomentumTransportModel>
154 return fvm::Su(CdAv_*(betap_*magU3 - betad_*magU*k_()), k_);
158 template<
class BasicMomentumTransportModel>
169 *(C4_*betap_*epsilon_()/k_()*magU3 - C5_*betad_*magU*epsilon_()),
177 template<
class BasicMomentumTransportModel>
205 this->runTime_.
name(),
221 this->runTime_.
name(),
237 this->runTime_.
name(),
253 this->runTime_.
name(),
269 this->runTime_.
name(),
286 this->runTime_.
name(),
297 this->runTime_.
name(),
308 this->runTime_.
name(),
319 this->runTime_.
name(),
330 this->runTime_.
name(),
342 this->runTime_.
name(),
354 this->runTime_.
name(),
365 if (
type == typeName)
367 this->printCoeffs(
type);
376 template<
class BasicMomentumTransportModel>
390 template<
class BasicMomentumTransportModel>
393 if (!this->turbulence_)
426 epsilon_.boundaryFieldRef().updateCoeffs();
441 + epsilonSource(magU, magU3)
445 epsEqn.
ref().relax();
447 epsEqn.
ref().boundaryManipulate(epsilon_.boundaryFieldRef());
462 + kSource(magU, magU3)
470 bound(k_, this->kMin_);
#define forAll(list, i)
Loop across all elements in list.
Bound the given scalar field where it is below the specified minimum.
Graphite solid properties.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic GeometricField class.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Templated abstract base class for RAS turbulence models.
BasicMomentumTransportModel::alphaField alphaField
virtual tmp< fvScalarMatrix > kSource(const volScalarField::Internal &magU, const volScalarField::Internal &magU3) const
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
tmp< volScalarField > boundEpsilon()
Bound epsilon and return Cmu*sqr(k) for nut.
void setPorosityCoefficients()
kEpsilonLopesdaCosta(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity, const word &type=typeName)
Construct from components.
void setCdAv(volScalarField::Internal &C, const porosityModels::powerLawLopesdaCosta &pm)
virtual void correctNut()
Correct the eddy-viscosity nut.
virtual tmp< fvScalarMatrix > epsilonSource(const volScalarField::Internal &magU, const volScalarField::Internal &magU3) const
void setPorosityCoefficient(volScalarField::Internal &C, const porosityModels::powerLawLopesdaCosta &pm)
virtual bool read()
Re-read model coefficients if they have changed.
BasicMomentumTransportModel::rhoField rhoField
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
Generic dimensioned Type class.
Eddy viscosity turbulence model base class.
Finite volume constraints.
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
tmp< fvMatrix< Type > > source(const VolField< Type > &field) const
Return source for an equation.
This model applies the force exerted on the fluid by a porous media.
const porosityModel & model() const
Return the porosity model.
const word & zoneName() const
Return const access to the cell zone name.
const dictionary & dict() const
Return dictionary used for model construction.
const scalarField & Av() const
Return the porosity surface area per unit volume zone field.
Variant of the power law porosity model with spatially varying drag coefficient.
A class for managing temporary objects.
void clear() const
If object pointer points to valid object:
T & ref() const
Return non-const reference or generate a fatal error.
Abstract base class for all fluid physical properties.
A class for handling words, derived from string.
Foam::fvConstraints & fvConstraints(Foam::fvConstraints::New(mesh))
Foam::fvModels & fvModels(Foam::fvModels::New(mesh))
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
void correct(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &phiCorr, const SpType &Sp, const SuType &Su)
const char *const group
Group name for atomic constants.
const dimensionedScalar G
Newtonian constant of gravitation.
tmp< VolField< typename outerProduct< vector, Type >::type > > grad(const SurfaceField< Type > &ssf)
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
tmp< fvMatrix< Type > > Su(const DimensionedField< Type, volMesh > &, const VolField< Type > &)
tmp< fvMatrix< Type > > laplacian(const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const VolField< Type > &)
tmp< fvMatrix< Type > > SuSp(const volScalarField::Internal &, const VolField< Type > &)
tmp< fvMatrix< Type > > ddt(const VolField< Type > &vf)
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
bool read(const char *, int32_t &)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar pow3(const dimensionedScalar &ds)
word name(const bool)
Return a word representation of a bool.
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
const dimensionSet dimless
const dimensionSet dimLength
dimensioned< scalar > mag(const dimensioned< Type > &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
bool bound(volScalarField &, const dimensionedScalar &min)
Bound the given scalar field where it is below the specified min value.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
SolverPerformance< Type > solve(fvMatrix< Type > &, const word &)
Solve returning the solution statistics given convergence tolerance.