40 template<
class BasicMomentumTransportModel>
43 this->nut_ = this->Cmu_*
sqr(k_)/epsilon_;
44 this->nut_.correctBoundaryConditions();
49 template<
class BasicMomentumTransportModel>
65 template<
class BasicMomentumTransportModel>
73 const viscosity& viscosity,
194 this->runTime_.timeName(),
206 this->runTime_.timeName(),
214 if (type == typeName)
216 this->printCoeffs(type);
218 this->boundNormalStress(this->R_);
219 bound(epsilon_, this->epsilonMin_);
220 k_ = 0.5*
tr(this->R_);
227 template<
class BasicMomentumTransportModel>
232 Cmu_.readIfPresent(this->coeffDict());
233 C1_.readIfPresent(this->coeffDict());
234 C2_.readIfPresent(this->coeffDict());
235 Ceps1_.readIfPresent(this->coeffDict());
236 Ceps2_.readIfPresent(this->coeffDict());
237 Cs_.readIfPresent(this->coeffDict());
238 Ceps_.readIfPresent(this->coeffDict());
240 wallReflection_.readIfPresent(
"wallReflection", this->coeffDict());
241 kappa_.readIfPresent(this->coeffDict());
242 Cref1_.readIfPresent(this->coeffDict());
243 Cref2_.readIfPresent(this->coeffDict());
254 template<
class BasicMomentumTransportModel>
260 (Cs_*(this->k_/this->epsilon_))*this->R_ +
I*this->nu()
265 template<
class BasicMomentumTransportModel>
271 (Ceps_*(this->k_/this->epsilon_))*this->R_ +
I*this->nu()
276 template<
class BasicMomentumTransportModel>
279 if (!this->turbulence_)
305 epsilon_.boundaryFieldRef().updateCoeffs();
314 Ceps1_*alpha*rho*G*epsilon_/k_
315 -
fvm::Sp(Ceps2_*alpha*rho*epsilon_/k_, epsilon_)
317 + fvModels.source(alpha, rho, epsilon_)
320 epsEqn.
ref().relax();
322 epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
325 bound(epsilon_, this->epsilonMin_);
336 if (isA<wallFvPatch>(curPatch))
343 G[celli]/(0.5*
mag(
tr(P[celli])) + small),
356 +
fvm::Sp(C1_*alpha*rho*epsilon_/k_, R)
359 - (2.0/3.0*(1 - C1_)*
I)*alpha*rho*epsilon_
360 - C2_*alpha*rho*
dev(P)
362 + fvModels.source(alpha, rho, R)
373 Cref1_*R - ((Cref2_*C2_)*(k_/epsilon_))*
dev(P)
377 ((3*
pow(Cmu_, 0.75)/kappa_)*(alpha*rho*
sqrt(k_)/y_))
386 this->boundNormalStress(R);
393 this->correctWallShearStress(R);
const fvPatchList & patches
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
fvMatrix< scalar > fvScalarMatrix
#define forAll(list, i)
Loop across all elements in list.
virtual tmp< fvScalarMatrix > epsilonSource() const
Source term for the epsilon equation.
tmp< volSymmTensorField > DREff() const
Return the effective diffusivity for R.
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(rho0+psi *p, rhoMin);# 1 "/home/ubuntu/OpenFOAM-10/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H" 1{ alphav=max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0));alphal=1.0 - alphav;Info<< "max-min alphav: "<< max(alphav).value()<< " "<< min(alphav).value()<< endl;psiModel-> correct()
T & ref() const
Return non-const reference or generate a fatal error.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
LRR(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.
static tmp< GeometricField< symmTensor, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< symmTensor >> &)
Return a temporary field constructed from name,.
dimensionedScalar sqrt(const dimensionedScalar &ds)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Generic dimensioned Type class.
const dimensionedScalar G
Newtonian constant of gravitation.
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
virtual bool read()
Read model coefficients if they have changed.
BasicMomentumTransportModel::alphaField alphaField
static Switch lookupOrAddToDict(const word &, dictionary &, const Switch &defaultValue=false)
Construct from dictionary, supplying default value so that if the.
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
tmp< volSymmTensorField > DepsilonEff() const
Return the effective diffusivity for epsilon.
Templated abstract base class for RAS turbulence models.
const dimensionSet dimTime
bool read(const char *, int32_t &)
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
static const Identity< scalar > I
Foam::fvConstraints & fvConstraints
virtual void correctNut()
Update the eddy-viscosity.
A class for handling words, derived from string.
virtual const labelUList & faceCells() const
Return faceCells.
static word groupName(Name name, const word &group)
Info<< "Reading field p\"<< endl;volScalarField p(IOobject("p", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);pressureReference pressureReference(p, simple.dict());mesh.schemes().setFluxRequired(p.name());Info<< "Reading field pa\"<< endl;volScalarField pa(IOobject("pa", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading field Ua\"<< endl;volVectorField Ua(IOobject("Ua", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);# 65 "/home/ubuntu/OpenFOAM-10/applications/solvers/incompressible/adjointShapeOptimisationFoam/createFields.H" 2label paRefCell=0;scalar paRefValue=0.0;setRefCell(pa, simple.dict(), paRefCell, paRefValue);mesh.schemes().setFluxRequired(pa.name());autoPtr< viscosityModel > viscosity(viscosityModel::New(mesh))
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
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.
static wallDist & New(fvMesh &mesh)
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
BasicMomentumTransportModel::rhoField rhoField
Foam::fvModels & fvModels
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
virtual void correct()
Solve the turbulence equations and correct eddy-Viscosity and.
volScalarField & bound(volScalarField &, const dimensionedScalar &lowerBound)
Bound the given scalar field if it has gone unbounded.
#define R(A, B, C, D, E, F, K, M)
Finite volume constraints.
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
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 dimVolume
SolverPerformance< Type > solve(fvMatrix< Type > &, const word &)
Solve returning the solution statistics given convergence tolerance.
dimensioned< scalar > mag(const dimensioned< Type > &)
A class for managing temporary objects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Reynolds-stress turbulence model base class.