37 template<
class BasicMomentumTransportModel>
50 template<
class BasicMomentumTransportModel>
60 template<
class BasicMomentumTransportModel>
69 min(
max(gammaIntEff_, scalar(0.1)), scalar(1))
74 template<
class BasicMomentumTransportModel>
97 (1 -
sqr((gammaInt_() - 1.0/ce2_)/(1 - 1.0/ce2_)))
105 template<
class BasicMomentumTransportModel>
122 const scalar ReThetat = ReThetat_[celli];
129 + 120.656e-4*ReThetat
130 - 868.230e-6*
sqr(ReThetat)
131 + 696.506e-9*
pow3(ReThetat)
132 - 174.105e-12*
pow4(ReThetat)
134 ReThetat - 593.11 - 0.482*(ReThetat - 1870);
141 template<
class BasicMomentumTransportModel>
163 const scalar ReThetat = ReThetat_[celli];
169 - 119.270e-4*ReThetat
170 - 132.567e-6*
sqr(ReThetat);
172 else if (ReThetat < 596)
176 - 123.939e-2*ReThetat
177 + 194.548e-5*
sqr(ReThetat)
178 - 101.695e-8*
pow3(ReThetat);
180 else if (ReThetat < 1200)
182 Flength[celli] = 0.5 - 3
e-4*(ReThetat - 596);
186 Flength[celli] = 0.3188;
189 const scalar Fsublayer =
190 exp(-
sqr(
sqr(y[celli])*omega[celli]/(200*nu[celli])));
192 Flength[celli] = Flength[celli]*(1 - Fsublayer) + 40*Fsublayer;
199 template<
class BasicMomentumTransportModel>
227 max(100*
sqrt((2.0/3.0)*k[celli])/Us[celli], scalar(0.027))
242 const scalar lambda0 =
lambda;
246 const scalar Flambda =
253 - 405.689*
pow3(lambda)
257 + 0.275*(1 -
exp(-35*lambda))
261 (1173.51 - 589.428*Tu + 0.2196/
sqr(Tu))
267 const scalar Flambda =
274 -405.689*
pow3(lambda)
278 + 0.275*(1 -
exp(-35*lambda))
282 331.50*
pow((Tu - 0.5658), -0.671)
283 *Flambda*nu[celli]/Us[celli];
286 lambda =
sqr(thetat)/nu[celli]*dUsds[celli];
287 lambda =
max(
min(lambda, 0.1), -0.1);
289 lambdaErr =
mag(lambda - lambda0);
291 maxIter =
max(maxIter, ++iter);
293 }
while (lambdaErr > lambdaErr_);
295 ReThetat0[celli] =
max(thetat*Us[celli]/nu[celli], scalar(20));
298 if (maxIter > maxLambdaIter_)
301 <<
"Number of lambda iterations exceeds maxLambdaIter(" 302 << maxLambdaIter_ <<
')'<<
endl;
309 template<
class BasicMomentumTransportModel>
329 max(Fonset2 - Fonset3, scalar(0))
336 template<
class BasicMomentumTransportModel>
344 const viscosity& viscosity,
414 this->coeffDict_.lookupOrDefault(
"lambdaErr", 1
e-6)
418 this->coeffDict_.lookupOrDefault(
"maxLambdaIter", 10)
427 this->runTime_.timeName(),
440 this->runTime_.timeName(),
453 this->runTime_.timeName(),
464 template<
class BasicMomentumTransportModel>
469 ca1_.readIfPresent(this->coeffDict());
470 ca2_.readIfPresent(this->coeffDict());
471 ce1_.readIfPresent(this->coeffDict());
472 ce2_.readIfPresent(this->coeffDict());
473 sigmaThetat_.readIfPresent(this->coeffDict());
474 cThetat_.readIfPresent(this->coeffDict());
475 this->coeffDict().readIfPresent(
"lambdaErr", lambdaErr_);
476 this->coeffDict().readIfPresent(
"maxLambdaIter", maxLambdaIter_);
487 template<
class BasicMomentumTransportModel>
520 alpha()*
rho()*(cThetat_/t)*(1 - Fthetat)
530 Pthetat*ReThetat0(Us, dUsds, nu) -
fvm::Sp(Pthetat, ReThetat_)
531 + fvModels.source(alpha, rho, ReThetat_)
534 ReThetatEqn.
ref().relax();
535 fvConstraints.
constrain(ReThetatEqn.ref());
549 *ca1_*Flength(nu)*S*
sqrt(gammaInt_()*Fonset(Rev, ReThetac, RT))
556 alpha()*
rho()*ca2_*Omega*Fturb*gammaInt_()
566 Pgamma -
fvm::Sp(ce1_*Pgamma, gammaInt_)
567 + Egamma -
fvm::Sp(ce2_*Egamma, gammaInt_)
568 + fvModels.source(alpha, rho, gammaInt_)
571 gammaIntEqn.
ref().relax();
572 fvConstraints.
constrain(gammaIntEqn.ref());
581 min(2*
max(Rev/(3.235*ReThetac) - 1, scalar(0))*Freattach, scalar(2))
585 gammaIntEff_ =
max(gammaInt_(), gammaSep);
589 template<
class BasicMomentumTransportModel>
592 if (!this->turbulence_)
598 correctReThetatGammaInt();
BasicMomentumTransportModel::alphaField alphaField
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
#define forAll(list, i)
Loop across all elements in list.
static dimensioned< Type > lookupOrAddToDict(const word &, dictionary &, const dimensionSet &dims=dimless, const Type &defaultValue=pTraits< Type >::zero)
Construct from dictionary, with default value.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
void clear() const
If object pointer points to valid object:
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &)
Return a temporary field constructed from name, mesh.
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
tmp< volScalarField::Internal > ReThetat0(const volScalarField::Internal &Us, const volScalarField::Internal &dUsds, const volScalarField::Internal &nu) const
Return the transition onset momentum-thickness Reynolds number.
dimensionedTensor skew(const dimensionedTensor &dt)
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))
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar lambda(viscosity->lookup("lambda"))
const dimensionSet dimless
label k
Boltzmann constant.
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
DimensionedField< scalar, volMesh > Internal
Type of the internal field from which this GeometricField is derived.
virtual tmp< volScalarField::Internal > epsilonByk(const volScalarField::Internal &F1, const volScalarField::Internal &F2) const
Modified form of the k-omega SST epsilon/k.
tmp< volScalarField::Internal > ReThetac() const
Empirical correlation for critical Reynolds number where the.
dimensionedScalar exp(const dimensionedScalar &ds)
Foam::fvConstraints & fvConstraints
A class for handling words, derived from string.
tmp< fvMatrix< Type > > S(const Pair< tmp< volScalarField::Internal >> &, const GeometricField< Type, fvPatchField, volMesh > &)
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)
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
Specialisation for RAS of the generic kOmegaSSTBase base class. For more information, see Description of kOmegaSSTBase.H.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
virtual bool read()
Re-read model coefficients if they have changed.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
const dimensionSet dimVelocity
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
tmp< volScalarField::Internal > Fonset(const volScalarField::Internal &Rev, const volScalarField::Internal &ReThetac, const volScalarField::Internal &RT) const
Transition onset location control function.
tmp< volScalarField::Internal > Flength(const volScalarField::Internal &nu) const
Empirical correlation that controls the length of the.
virtual tmp< volScalarField::Internal > Pk(const volScalarField::Internal &G) const
Return k production rate.
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
tensor Ry(const scalar &omega)
Rotational transformation tensor about the y-axis by omega radians.
Foam::fvModels & fvModels
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar pow3(const dimensionedScalar &ds)
volScalarField & bound(volScalarField &, const dimensionedScalar &lowerBound)
Bound the given scalar field if it has gone unbounded.
#define WarningInFunction
Report a warning using Foam::Warning.
Finite volume constraints.
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
dimensionedScalar pow4(const dimensionedScalar &ds)
kOmegaSSTLM(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.
SolverPerformance< Type > solve(fvMatrix< Type > &, const word &)
Solve returning the solution statistics given convergence tolerance.
dimensioned< scalar > mag(const dimensioned< Type > &)
void correctReThetatGammaInt()
Solve the turbulence equations and correct the turbulence viscosity.
const doubleScalar e
Elementary charge.
virtual tmp< volScalarField::Internal > epsilonByk(const volScalarField::Internal &F1, const volScalarField::Internal &F2) const
Return epsilon/k which for standard RAS is betaStar*omega.
tmp< volScalarField::Internal > Fthetat(const volScalarField::Internal &Us, const volScalarField::Internal &Omega, const volScalarField::Internal &nu) const
Freestream blending-function.
A class for managing temporary objects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
virtual tmp< volScalarField > F1(const volScalarField &CDkOmega) const
Modified form of the k-omega SST F1 function.
virtual tmp< volScalarField::Internal > Pk(const volScalarField::Internal &G) const
Modified form of the k-omega SST k production rate.
BasicMomentumTransportModel::rhoField rhoField