45 namespace incompressibleAdjoint
47 namespace adjointRASModels
142 if (isA<omegaWallFunctionFvPatchScalarField>(omegab))
144 const label patchi =
patch.index();
161 return tzeroFirstCell;
184 if (isA<nutkWallFunctionFvPatchScalarField>(nutb))
194 const vectorField USnGrad(
U.boundaryField()[pI].snGrad());
202 -
ka()[cI]*akb[fI]*kSnGrad[fI]
203 - (Ua[cI] & (USnGrad[fI] + (
dev2(gradUb[fI]) & nf[fI])));
262 - scalar(2)*arg2*(1 -
F2*
F2)*
287 case_2_nut*scalar(2)*arg2*(1 -
F2*
F2)
334 typedef fixedValueFvPatchScalarField fixedValue;
335 typedef zeroGradientFvPatchScalarField zeroGrad;
345 && (isA<zeroGrad>(omegab) || isA<omegaWF>(omegab))
350 else if (isA<fixedValue>(
kb) && isA<fixedValue>(omegab)
375 && (isA<zeroGrad>(omegab) || isA<omegaWF>(omegab))
380 else if (isA<fixedValue>(
kb) && isA<fixedValue>(omegab))
382 dRdF1b = dRdF1b.patchInternalField();
386 dRdF1 += dR_dF1_coeffs;
444 interpolationScheme<vector>(
"div(dR_dGradOmega)")().
470 isA<zeroGradientFvPatchScalarField>(omegab)
471 || isA<omegaWallFunctionFvPatchScalarField>(omegab)
476 else if (isA<fixedValueFvPatchScalarField>(omegab))
484 interpolationScheme<vector>(
"sourceAdjontkOmegaSST")().
510 if (isA<zeroGradientFvPatchScalarField>(
kb))
514 else if (isA<fixedValueFvPatchScalarField>(
kb))
523 interpolationScheme<vector>(
"sourceAdjontkOmegaSST")().
581 interpolationScheme<vector>(
"div(dR_dGradK)")().
597 const word& schemeName
601 (interpolationScheme<scalar>(schemeName));
608 if (isA<zeroGradientFvPatchScalarField>(primalbf))
611 snGradPrimal.boundaryFieldRef()[pI] =
Zero;
614 else if (isA<fixedValueFvPatchScalarField>(primalbf))
617 snGradPrimal.boundaryFieldRef()[pI] =
Zero;
632 const word& schemeName
636 (interpolationScheme<scalar>(schemeName));
643 if (isA<zeroGradientFvPatchScalarField>(bc))
647 snGradPrimal.boundaryFieldRef()[pI] *=
651 else if (isA<fixedValueFvPatchScalarField>(bc))
653 snGradPrimal.boundaryFieldRef()[pI] =
Zero;
667 const word& schemeName
671 (interpolationScheme<vector>(schemeName));
679 if (isA<zeroGradientFvPatchScalarField>(bc))
683 else if (isA<fixedValueFvPatchScalarField>(bc))
685 snGradU.boundaryFieldRef()[pI] =
Zero;
699 if (!isA<coupledFvPatchVectorField>(Ub))
703 fluxTranspose.boundaryFieldRef()[pI] = Uai*Sfb;
707 const DimensionedField<scalar, volMesh>& V =
mesh_.
V();
711 if (isA<zeroGradientFvPatchScalarField>(bc))
722 const label celli = faceCells[fI];
723 M[celli] -= ((Uai[fI] & dev2GradU[fI]) & Sfb[fI])/V[celli];
727 M.correctBoundaryConditions();
785 if (isA<zeroGradientFvPatchVectorField>(bc))
789 else if (isA<fixedValueFvPatchVectorField>(bc))
791 interpolatedPrimal.boundaryFieldRef()[pI] =
Zero;
814 if (isA<zeroGradientFvPatchVectorField>(bc))
818 else if (isA<fixedValueFvPatchVectorField>(bc))
820 flux.boundaryFieldRef()[pI] =
822 & GbyNuMult().boundaryField()[pI].patchInternalField();
844 if (isA<zeroGradientFvPatchVectorField>(bc))
848 else if (isA<fixedValueFvPatchVectorField>(bc))
850 flux.boundaryFieldRef()[pI] =
852 *divUMult().boundaryField()[pI].patchInternalField();
880 if (!isA<coupledFvPatchVectorField>(bc))
883 snGradPrimal.boundaryFieldRef()[pI] =
Zero;
903 M.correctBoundaryConditions();
915 if (isA<zeroGradientFvPatchVectorField>(bc))
917 returnFieldFlux.boundaryFieldRef()[pI] =
Zero;
919 else if (isA<fixedValueFvPatchVectorField>(bc))
921 returnFieldFlux.boundaryFieldRef()[pI] =
923 &
M.boundaryField()[pI].patchInternalField();
950 if (isA<nutkWallFunctionFvPatchScalarField>(nutWall))
963 refCast<nutWallFunctionFvPatchScalarField>(nutWall);
965 const scalar Cmu = wallCoeffs.
Cmu();
966 const scalar
kappa = wallCoeffs.kappa();
967 const scalar E = wallCoeffs.E();
968 const scalar yPlusLam = wallCoeffs.yPlusLam();
970 const scalar Cmu25 =
pow025(Cmu);
974 dR_dnut.boundaryField()[patchi];
976 bool addTermsFromOmegaWallFuction
977 (isA<omegaWallFunctionFvPatchScalarField>(omegaw));
986 const scalar sqrtkCell(
sqrt(
k[celli]));
987 const scalar
yPlus = Cmu25*
y[facei]*sqrtkCell/nuw[facei];
988 const scalar logEyPlus =
log(E*
yPlus);
989 const scalar dnut_dyPlus =
990 nuw[facei]*
kappa*(logEyPlus - 1)/
sqr(logEyPlus);
991 const scalar dyPlus_dk =
992 Cmu25*
y[facei]/(2*nuw[facei]*sqrtkCell);
993 const scalar
dnut_dk = dnut_dyPlus*dyPlus_dk;
995 if (yPlusLam <
yPlus)
998 source[celli] -= dR_dnutw[facei]*
dnut_dk*magSf[facei];
1000 if (addTermsFromOmegaWallFuction)
1002 const scalar denom(Cmu25*
kappa*
y[facei]);
1003 const scalar omegaLog(sqrtkCell/denom);
1006 wa[celli]*omegaLog/
omega[celli]
1007 /(2*sqrtkCell*denom);
1013 (nutWall[facei] + nuw[facei])
1016 /(2.0*sqrtkCell*
kappa*
y[facei])
1019 if (yPlusLam <
yPlus)
1039 Info<<
"Updating primal-based fields of the adjoint turbulence " 1040 <<
"model ..." <<
endl;
1184 word divEntry(
"div(" + phiInst.
name() +
',' + varName +
')');
1188 word discarded(divScheme);
1189 if (discarded ==
"bounded")
1191 discarded =
word(divScheme);
1199 adjointkOmegaSST::adjointkOmegaSST
1204 const word& adjointTurbulenceModelName,
1205 const word& modelName
1214 adjointTurbulenceModelName
1344 y_(primalVars_.RASModelVariables()().d()),
1364 "rasModel::gradOmega",
1417 "adjointRASModel::GbyNu0",
1692 zeroFirstCell_(zeroFirstCell()),
1907 "adjointMeanFlowSource" +
type(),
1935 twoSymmGradU.clear();
1961 nutMeanFlowSourceMult,
1973 if (isA<omegaWallFunctionFvPatchScalarField>(omegaWall))
1985 refCast<nutWallFunctionFvPatchScalarField>
1988 const scalar Cmu = wallCoeffs.
Cmu();
1989 const scalar
kappa = wallCoeffs.kappa();
1990 const scalar Cmu25 =
pow025(Cmu);
2002 meanFlowSource[celli] +=
2004 *(nutw[facei] + nuw[facei])
2005 *snGradUw[facei].normalise()
2006 *Cmu25*
sqrt(
k()[celli])
2012 return tmeanFlowSource;
2021 tmp<volScalarField> S2
2082 return dnut_domega(
F2, S, case_1_nut, case_2_nut, case_3_nut);
2114 +
nu()().boundaryField()[patchI]
2124 +
nu()().boundaryField()[patchI]
2170 waEqn.ref().relax();
2176 waEqn.ref().solve();
2195 kaEqn.ref().
relax();
2202 kaEqn.ref().
solve();
2228 wallShapeSens[patchi] = nf & FITerm.boundaryField()[patchi];
2230 return wallShapeSens;
2246 "adjointEikonalSource" +
type(),
2290 type() +
"FISensTerm",
2347 const word& designVarsName
2355 (
k().primitiveField()*
ka().primitiveField());
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
volScalarField DOmegaEff_
Diffusivity of the omega equation.
volScalarField case_2_F1_
virtual tmp< volScalarField > GbyNu(const volScalarField &GbyNu0, const volScalarField &F2, const volScalarField &S2) const
tmp< volVectorField > nutMeanFlowSource(tmp< volScalarField > &mult, const volScalarField &F2, const volScalarField &S, const volScalarField &case_1_nut, const volTensorField &gradU) const
Contributions from nut(U)
dimensionedScalar tanh(const dimensionedScalar &ds)
virtual const boundaryVectorField & wallShapeSensitivities()
Sensitivity derivative contributions when using the (E)SI approach.
const Type & value() const noexcept
Return const reference to value.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
bool includeDistance_
Does the turbulence model include distances and should the adjoint to the distance field be computed...
tmp< volScalarField > dnut_dk(const volScalarField &F2, const volScalarField &S, const volScalarField &case_2_nut) const
Nut Jacobian wrt k.
virtual tmp< scalarField > topologySensitivities(const word &designVarsName) const
Term contributing to the computation of topology optimisation sensitivities.
const surfaceVectorField & Sf() const
Return cell face area vectors.
tmp< volVectorField > dF1_dGradK(const volScalarField &arg1) const
F1 Jacobian wrt grad(k)
dimensionedScalar gamma2_
fvPatchField< vector > fvPatchVectorField
const Internal::FieldType & primitiveField() const noexcept
Return a const-reference to the internal field values.
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
dimensionedScalar log(const dimensionedScalar &ds)
Inversed weight central-differencing interpolation scheme class.
tmp< volScalarField > dF2_domega(const volScalarField &F2, const volScalarField &case_2_nut, const volScalarField &case_3_nut) const
F2 Jacobian wrt omega.
tmp< volScalarField > diffusionNutMeanFlowMult(const volScalarField &primalField, const volScalarField &adjointField, const volScalarField &coeffField) const
Contributions from nut(U), in the diffusion coefficients of the turbulence model. ...
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void resize(const label len)
Adjust allocated size of list.
tmp< volVectorField > dF1_dGradOmega(const volScalarField &arg1) const
F1 Jacobian wrt grad(omega)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
tmp< volScalarField > waEqnSourceFromF1() const
Source to waEqn from the differentiation of F1.
Central-differencing interpolation scheme class.
virtual tmp< volScalarField > F1() const
const word & name() const noexcept
Return the object name.
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
const dimensionedScalar G
Newtonian constant of gravitation.
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
const wallFunctionCoefficients & wallCoeffs() const noexcept
Return wallFunctionCoefficients.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
bool readIfPresent(const dictionary &dict)
Update the value of dimensioned<Type> if found in the dictionary, lookup in dictionary with the name(...
volScalarField case_3_nut_
const volScalarField & y_
Wall distance.
Class for managing objective functions.
virtual bool read()
Read adjointRASProperties dictionary.
virtual tmp< volSymmTensorField > devReff() const
Return the effective stress tensor including the laminar stress.
volScalarField case_2_GPrime_
volScalarField dnut_domega_
Nut Jacobian w.r.t. omega.
static tmp< edgeInterpolationScheme< Type > > scheme(const edgeScalarField &faceFlux, Istream &schemeData)
Return weighting factors for scheme given from Istream.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
tmp< volScalarField > kaEqnSourceFromF1() const
Source to kaEqn from the differentiation of F1.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
dimensionedScalar pow025(const dimensionedScalar &ds)
virtual const boundaryVectorField & wallFloCoSensitivities()
Sensitivity terms for flow control, emerging from the turbulence model differentiation.
tmp< volScalarField > dF1_domega(const volScalarField &arg1) const
F1 Jacobian wrt omega (no contributions from grad(omega))
tmp< volVectorField > GMeanFlowSource(tmp< volSymmTensorField > &GbyNuMult) const
Contributions from the G.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, any/none. Also accepts 0/1 as a string and shortcuts t/f, y/n.
static void nullifyField(GeometricField< Type, PatchField, GeoMesh > &fieldPtr)
Nullify field and old times, if present.
const surfaceScalarField & phiInst() const
Return const reference to volume flux.
volScalarField case_1_F1_
autoPtr< boundaryVectorField > adjMomentumBCSourcePtr_
Source to the adjoint momentum BC emerging from differentiating the turbulence model.
tmp< volScalarField::Internal > beta(const volScalarField::Internal &F1) const
virtual tmp< volVectorField > adjointMeanFlowSource()
Source term added to the adjoint mean flow due to the differentiation of the turbulence model...
dimensionedScalar alphaOmega2_
Generic dimensioned Type class.
Ignore writing from objectRegistry::writeObject()
const dimensionSet dimless
Dimensionless.
autoPtr< boundaryVectorField > wallShapeSensitivitiesPtr_
Wall sensitivity term for shape optimisation.
Smooth ATC in cells next to a set of patches supplied by type.
volScalarField case_2_Pk_
const Time & time() const
Return the top-level database.
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
incompressibleAdjointMeanFlowVars & adjointVars_
tmp< volScalarField > kaEqnSourceFromCDkOmega() const
Source to kaEqn from the differentiation of CDkOmega.
virtual tmp< volScalarField > nutJacobianTMVar1() const
Jacobian of nut wrt to k.
GeometricField< vector, fvPatchField, volMesh > volVectorField
virtual tmp< volScalarField > distanceSensitivities()
Contributions to the adjoint eikonal equation (zero for now)
tmp< volScalarField > alphaK(const volScalarField &F1) const
incompressibleVars & primalVars_
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
volVectorField gradOmega_
tmp< volScalarField > alphaOmega(const volScalarField &F1) const
dimensionedScalar neg(const dimensionedScalar &ds)
tmp< volVectorField > convectionMeanFlowSource(const volScalarField &primalField, const volScalarField &adjointField) const
Contributions from the turbulence model convection terms.
Macros for easy insertion into run-time selection tables.
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
tmp< volScalarField > nu() const
Return the laminar viscosity.
tmp< volScalarField > DkEff(const volScalarField &F1) const
Return the effective diffusivity for k.
#define forAll(list, i)
Loop across all elements in list.
void addWallFunctionTerms(fvScalarMatrix &kaEqn, const volScalarField &dR_dnut)
Contributions from the differentiation of k existing in nutkWallFunction.
Switch adjointTurbulence_
Turbulence on/off flag.
tmp< surfaceInterpolationScheme< scalar > > convectionScheme(const word &varName) const
Return the interpolation scheme used by the primal convection term of the equation corresponding to t...
GeometricField< scalar, fvPatchField, volMesh > volScalarField
autoPtr< boundaryVectorField > wallFloCoSensitivitiesPtr_
Wall sensitivity term for flow control optimisation.
dimensionedScalar pos(const dimensionedScalar &ds)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const surfaceScalarField & phi() const
Return const reference to volume flux.
Base class for solution control classes.
static word scopedName(const std::string &scope, const word &name)
Create scope:name or scope_name string.
bool changedPrimalSolution_
Has the primal solution changed?
The class nutWallFunction is an abstract base class that hosts calculation methods and common functi...
const dimensionedScalar e
Elementary charge.
void setSize(const label n)
Alias for resize()
virtual tmp< volScalarField > nutJacobianTMVar2() const
Jacobian of nut wrt to omega.
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
virtual void correct()
Solve the adjoint turbulence equations.
bool useSolverNameForFields() const
Append solver name to fields?
Switch F3_
Flag to include the F3 term.
virtual tmp< volTensorField > FISensitivityTerm()
Sensitivity derivative contributions when using the FI approach.
tmp< volScalarField > DomegaEff(const volScalarField &F1) const
Return the effective diffusivity for omega.
fvPatchField< scalar > fvPatchScalarField
volTensorField gradU_
Cached primal gradient fields.
A class for handling words, derived from Foam::string.
static tmp< surfaceInterpolationScheme< Type > > New(const fvMesh &mesh, Istream &schemeData)
Return new tmp interpolation scheme.
virtual tmp< fvVectorMatrix > divDevReff(volVectorField &U) const
Return the transpose part of the adjoint momentum stresses.
volScalarField case_4_F1_
Abstract base class for incompressible turbulence models.
volScalarField dnut_dk_
Nut Jacobian w.r.t. k.
bool printMaxMags() const
Print max mags of solver fields.
dimensionedScalar neg0(const dimensionedScalar &ds)
const volScalarField & nutRef() const
GeometricField< tensor, fvsPatchField, surfaceMesh > surfaceTensorField
tmp< volVectorField > divUMeanFlowSource(tmp< volScalarField > &divUMult) const
Contributions from the divU.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
tmp< volScalarField > dR_dnut()
Derivative of the primal equations wrt nut.
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.
zeroField SuSp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
wordList adjointTMVariablesBaseNames_
Base names of the adjoint fields.
volScalarField case_1_nut_
volScalarField case_2_nut_
addToRunTimeSelectionTable(adjointRASModel, adjointkOmegaSST, dictionary)
Calculation of adjoint based sensitivities for topology optimisation. This returns just the field par...
const volScalarField & k() const
dimensioned< tensor > dimensionedTensor
Dimensioned tensor obtained from generic dimensioned type.
autoPtr< volScalarField > adjointTMVariable1Ptr_
Adjoint turbulence model variable 1.
virtual void nullify()
Nullify all adjoint turbulence model fields and their old times.
const word & solverName() const
Return solver name.
virtual void correct()
Solve the adjoint turbulence equations.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
virtual const tmp< volScalarField > nut() const
Return the turbulence viscosity.
autoPtr< volScalarField > adjointTMVariable2Ptr_
Adjoint turbulence model variable 2.
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
tmp< volScalarField > dNutdbMult(const volScalarField &primalField, const volScalarField &adjointField, const volScalarField &coeffField, const volScalarField &bcField, const word &schemeName) const
Term multiplying dnut/db, coming from the turbulence model.
virtual tmp< volVectorField > nutJacobianU(tmp< volScalarField > &dNutdUMult) const
Jacobian of nut wrt the flow velocity.
Us boundaryFieldRef().evaluateCoupled< coupledFaPatch >()
const volScalarField & omega() const
const volVectorField & U() const
Return const reference to velocity.
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions and patch type. [Takes current timeN...
volScalarField DkEff_
Diffusivity of the k equation.
volScalarField case_1_Pk_
Switch fields for the production in the k Eqn.
volScalarField case_1_GPrime_
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
dimensionedScalar pos0(const dimensionedScalar &ds)
dimensionedScalar alphaK2_
SolverPerformance< Type > solve(const dictionary &)
Solve returning the solution statistics.
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch.
const dictionary & coeffDict() const
Const access to the coefficients dictionary.
tmp< volScalarField > dF1_dk(const volScalarField &arg1) const
F1 Jacobian wrt k (no contributions from grad(k))
UPtrList< const labelUList > faceCells() const
Return a list of faceCells for each patch.
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
scalar Cmu() const noexcept
Return the object: Cmu.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
const solverControl & getSolverControl() const
Return const reference to solverControl.
tmp< volScalarField > dF2_dk(const volScalarField &F2, const volScalarField &case_2_nut) const
F2 Jacobian wrt k.
static void postProcessSens(scalarField &sens, scalarField &auxSens, fv::options &fvOptions, const word &fieldName, const word &designVariablesName)
Add part of the sensitivities coming from fvOptions.
virtual void addSource(fvVectorMatrix &matrix)
Add contribution to adjoint momentum PDEs.
tmp< fvScalarMatrix > waEqnSourceFromCDkOmega() const
Source to waEqn from the differentiation of CDkOmega.
const autoPtr< incompressible::RASModelVariables > & RASModelVariables() const
Return const reference to the turbulence model variables.
void setMeanFields()
Set mean fields.
Manages the adjoint mean flow fields and their mean values.
volScalarField case_3_F1_
Continuous adjoint to the kOmegaSST turbulence model for incompressible flows.
dimensionedScalar alphaOmega1_
const volVectorField & UaInst() const
Return const reference to velocity.
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
Field< Type > & source() noexcept
virtual tmp< scalarField > diffusionCoeffVar1(label patchI) const
Diffusion coeff at the boundary for k.
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
tmp< volScalarField > coeffsDifferentiation(const volScalarField &primalField, const volScalarField &adjointField, const word &schemeName) const
Differentiation of the turbulence model diffusion coefficients.
This boundary condition provides a wall function for the specific dissipation rate (i...
ITstream & divScheme(const word &name) const
Get div scheme for given name, or default.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
void updatePrimalRelatedFields()
Update of the primal cached fields.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
label nCells() const noexcept
Number of mesh cells.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
IOobject(const IOobject &)=default
Copy construct.
tmp< volScalarField > dnut_domega(const volScalarField &F2, const volScalarField &S, const volScalarField &case_1_nut, const volScalarField &case_2_nut, const volScalarField &case_3_nut) const
Nut Jacobian wrt omega.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
dimensionedScalar pow4(const dimensionedScalar &ds)
const std::string patch
OpenFOAM patch number as a std::string.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
tmp< volScalarField::Internal > gamma(const volScalarField::Internal &F1) const
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
void correctBoundaryConditions()
Correct boundary field.
virtual tmp< scalarField > diffusionCoeffVar2(label patchI) const
Diffusion coeff at the boundary for omega.
messageStream Info
Information stream (stdout output on master, null elsewhere)
objectiveManager & objectiveManager_
Reference to the objectiveManager.
Internal & ref(const bool updateAccessTime=true)
Same as internalFieldRef()
const fvBoundaryMesh & boundary() const noexcept
Return reference to boundary mesh.
const autoPtr< incompressible::turbulenceModel > & turbulence() const
Return const reference to the turbulence model.
Field< vector > vectorField
Specialisation of Field<T> for vector.
dimensionedScalar alphaK1_
virtual tmp< volVectorField > nonConservativeMomentumSource() const
Non-conservative part of the terms added to the mean flow equations.
void clear() const noexcept
If object pointer points to valid object: delete object and set pointer to nullptr.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
void boundaryManipulate(typename GeometricField< Type, fvPatchField, volMesh >::Boundary &values)
Manipulate based on a boundary field.
volScalarField zeroFirstCell_
tmp< volScalarField > dGPrime_dk() const
GbyNu Jacobian wrt k.
volScalarField CDkOmegaPlus_
virtual tmp< volScalarField > nuEff() const
Return the effective viscosity.
List< label > labelList
A List of labels.
dimensionedScalar gamma1_
defineTypeNameAndDebug(adjointkOmegaSST, 0)
A class for managing temporary objects.
volScalarField S2_
Primal cached fields involved in the solution of the.
tmp< volScalarField > zeroFirstCell()
static options & New(const fvMesh &mesh)
Construct fvOptions and register to database if not present.
Class to host the wall-function coefficients being used in the wall function boundary conditions...
dimensionedScalar betaStar_
virtual bool read()
Read adjointRASProperties dictionary.
Defines the attributes of an object for which implicit objectRegistry management is supported...
const nearWallDist & y() const
Return the near wall distances.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
tmp< volScalarField > dGPrime_domega() const
GbyNu Jacobian wrt omega.
virtual const boundaryVectorField & adjointMomentumBCSource() const
Source for the outlet adjoint momentum BC coming from differentiating the turbulence model...
bool readIfPresent(const word &key, const dictionary &dict)
Update the value of the Switch if it is found in the dictionary.
Do not request registration (bool: false)
virtual tmp< volScalarField > F2() const
tmp< volScalarField > dR_dF1() const
Derivative of the primal equations wrt F1.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
An input stream of tokens.
volScalarField alphaOmega_
static void setField(autoPtr< GeometricField< Type, fvPatchField, volMesh >> &fieldPtr, const fvMesh &mesh, const word &baseName, const word &solverName, const bool useSolverNameForFields)
Read vol fields.
const dimensionSet dimArea(sqr(dimLength))
volScalarField case_3_Pk_
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
SymmTensor< Cmpt > devTwoSymm(const SymmTensor< Cmpt > &st)
Return the deviatoric part of twice the symmetric part of a SymmTensor.
static constexpr const zero Zero
Global zero (0)
const dimensionSet dimVelocity