43 namespace incompressibleAdjoint
45 namespace adjointRASModels
126 auto tzeroFirstCell =
147 if (isA<omegaWallFunctionFvPatchScalarField>(omegab))
149 const label patchi =
patch.index();
166 return tzeroFirstCell;
189 if (isA<nutkWallFunctionFvPatchScalarField>(nutb))
199 const vectorField USnGrad(
U.boundaryField()[pI].snGrad());
207 -
ka()[cI]*akb[fI]*kSnGrad[fI]
208 - (Ua[cI] & (USnGrad[fI] + (
dev2(gradUb[fI]) & nf[fI])));
267 - scalar(2)*arg2*(1 -
F2*
F2)*
292 case_2_nut*scalar(2)*arg2*(1 -
F2*
F2)
339 typedef fixedValueFvPatchScalarField fixedValue;
340 typedef zeroGradientFvPatchScalarField zeroGrad;
350 && (isA<zeroGrad>(omegab) || isA<omegaWF>(omegab))
355 else if (isA<fixedValue>(
kb) && isA<fixedValue>(omegab)
380 && (isA<zeroGrad>(omegab) || isA<omegaWF>(omegab))
385 else if (isA<fixedValue>(
kb) && isA<fixedValue>(omegab))
387 dRdF1b = dRdF1b.patchInternalField();
391 dRdF1 += dR_dF1_coeffs;
449 interpolationScheme<vector>(
"div(dR_dGradOmega)")().
475 isA<zeroGradientFvPatchScalarField>(omegab)
476 || isA<omegaWallFunctionFvPatchScalarField>(omegab)
481 else if (isA<fixedValueFvPatchScalarField>(omegab))
489 interpolationScheme<vector>(
"sourceAdjontkOmegaSST")().
515 if (isA<zeroGradientFvPatchScalarField>(
kb))
519 else if (isA<fixedValueFvPatchScalarField>(
kb))
528 interpolationScheme<vector>(
"sourceAdjontkOmegaSST")().
586 interpolationScheme<vector>(
"div(dR_dGradK)")().
602 const word& schemeName
606 (interpolationScheme<scalar>(schemeName));
613 if (isA<zeroGradientFvPatchScalarField>(primalbf))
616 snGradPrimal.boundaryFieldRef()[pI] =
Zero;
619 else if (isA<fixedValueFvPatchScalarField>(primalbf))
622 snGradPrimal.boundaryFieldRef()[pI] =
Zero;
637 const word& schemeName
641 (interpolationScheme<scalar>(schemeName));
648 if (isA<zeroGradientFvPatchScalarField>(bc))
652 snGradPrimal.boundaryFieldRef()[pI] *=
656 else if (isA<fixedValueFvPatchScalarField>(bc))
658 snGradPrimal.boundaryFieldRef()[pI] =
Zero;
672 const word& schemeName
676 (interpolationScheme<vector>(schemeName));
684 if (isA<zeroGradientFvPatchScalarField>(bc))
688 else if (isA<fixedValueFvPatchScalarField>(bc))
690 snGradU.boundaryFieldRef()[pI] =
Zero;
704 if (!isA<coupledFvPatchVectorField>(Ub))
708 fluxTranspose.boundaryFieldRef()[pI] = Uai*Sfb;
712 const DimensionedField<scalar, volMesh>& V =
mesh_.
V();
716 if (isA<zeroGradientFvPatchScalarField>(bc))
727 const label celli = faceCells[fI];
728 M[celli] -= ((Uai[fI] & dev2GradU[fI]) & Sfb[fI])/V[celli];
732 M.correctBoundaryConditions();
790 if (isA<zeroGradientFvPatchVectorField>(bc))
794 else if (isA<fixedValueFvPatchVectorField>(bc))
796 interpolatedPrimal.boundaryFieldRef()[pI] =
Zero;
819 if (isA<zeroGradientFvPatchVectorField>(bc))
823 else if (isA<fixedValueFvPatchVectorField>(bc))
825 flux.boundaryFieldRef()[pI] =
827 & GbyNuMult().boundaryField()[pI].patchInternalField();
849 if (isA<zeroGradientFvPatchVectorField>(bc))
853 else if (isA<fixedValueFvPatchVectorField>(bc))
855 flux.boundaryFieldRef()[pI] =
857 *divUMult().boundaryField()[pI].patchInternalField();
885 if (!isA<coupledFvPatchVectorField>(bc))
888 snGradPrimal.boundaryFieldRef()[pI] =
Zero;
908 M.correctBoundaryConditions();
920 if (isA<zeroGradientFvPatchVectorField>(bc))
922 returnFieldFlux.boundaryFieldRef()[pI] =
Zero;
924 else if (isA<fixedValueFvPatchVectorField>(bc))
926 returnFieldFlux.boundaryFieldRef()[pI] =
928 &
M.boundaryField()[pI].patchInternalField();
955 if (isA<nutkWallFunctionFvPatchScalarField>(nutWall))
968 refCast<nutWallFunctionFvPatchScalarField>(nutWall);
970 const scalar Cmu = wallCoeffs.
Cmu();
971 const scalar
kappa = wallCoeffs.kappa();
972 const scalar E = wallCoeffs.E();
973 const scalar yPlusLam = wallCoeffs.yPlusLam();
975 const scalar Cmu25 =
pow025(Cmu);
979 dR_dnut.boundaryField()[patchi];
981 bool addTermsFromOmegaWallFuction
982 (isA<omegaWallFunctionFvPatchScalarField>(omegaw));
991 const scalar sqrtkCell(
sqrt(
k[celli]));
992 const scalar
yPlus = Cmu25*
y[facei]*sqrtkCell/nuw[facei];
993 const scalar logEyPlus =
log(E*
yPlus);
994 const scalar dnut_dyPlus =
995 nuw[facei]*
kappa*(logEyPlus - 1)/
sqr(logEyPlus);
996 const scalar dyPlus_dk =
997 Cmu25*
y[facei]/(2*nuw[facei]*sqrtkCell);
998 const scalar
dnut_dk = dnut_dyPlus*dyPlus_dk;
1000 if (yPlusLam <
yPlus)
1003 source[celli] -= dR_dnutw[facei]*
dnut_dk*magSf[facei];
1005 if (addTermsFromOmegaWallFuction)
1007 const scalar denom(Cmu25*
kappa*
y[facei]);
1008 const scalar omegaLog(sqrtkCell/denom);
1011 wa[celli]*omegaLog/
omega[celli]
1012 /(2*sqrtkCell*denom);
1018 (nutWall[facei] + nuw[facei])
1021 /(2.0*sqrtkCell*
kappa*
y[facei])
1024 if (yPlusLam <
yPlus)
1044 Info<<
"Updating primal-based fields of the adjoint turbulence " 1045 <<
"model ..." <<
endl;
1189 word divEntry(
"div(" + phiInst.
name() +
',' + varName +
')');
1193 word discarded(divScheme);
1194 if (discarded ==
"bounded")
1196 discarded =
word(divScheme);
1204 adjointkOmegaSST::adjointkOmegaSST
1209 const word& adjointTurbulenceModelName,
1210 const word& modelName
1219 adjointTurbulenceModelName
1341 Switch::lookupOrAddToDict
1349 y_(primalVars_.RASModelVariables()().d()),
1369 "rasModel::gradOmega",
1422 "adjointRASModel::GbyNu0",
1697 zeroFirstCell_(zeroFirstCell()),
1913 "adjointMeanFlowSource" +
type(),
1941 twoSymmGradU.clear();
1967 nutMeanFlowSourceMult,
1979 if (isA<omegaWallFunctionFvPatchScalarField>(omegaWall))
1991 refCast<nutWallFunctionFvPatchScalarField>
1994 const scalar Cmu = wallCoeffs.
Cmu();
1995 const scalar
kappa = wallCoeffs.kappa();
1996 const scalar Cmu25 =
pow025(Cmu);
2008 meanFlowSource[celli] +=
2010 *(nutw[facei] + nuw[facei])
2011 *snGradUw[facei].normalise()
2012 *Cmu25*
sqrt(
k()[celli])
2018 return tmeanFlowSource;
2027 tmp<volScalarField> S2
2088 return dnut_domega(
F2, S, case_1_nut, case_2_nut, case_3_nut);
2120 +
nu()().boundaryField()[patchI]
2130 +
nu()().boundaryField()[patchI]
2172 waEqn.ref().relax();
2177 waEqn.ref().solve();
2194 kaEqn.ref().
relax();
2200 kaEqn.ref().
solve();
2206 Info<<
"Max mag of adjoint dissipation = " << maxwa.
value() <<
endl;
2207 Info<<
"Max mag of adjoint kinetic energy = " << maxka.
value() <<
endl;
2226 wallShapeSens[patchi] = nf & FITerm.boundaryField()[patchi];
2228 return wallShapeSens;
2244 "adjointEikonalSource" +
type(),
2288 type() +
"FISensTerm",
2345 const word& designVarsName
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.
virtual void addTMEqn1Source(fvScalarMatrix &adjTMEqn1)=0
Add contribution to first adjoint turbulence model PDE.
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
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
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 incompressible 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.
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)
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.
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.
volScalarField DkEff_
Diffusivity of the k equation.
volScalarField case_1_Pk_
Switch fields for the production in the k Eqn.
volScalarField case_1_GPrime_
virtual void addTMEqn2Source(fvScalarMatrix &adjTMEqn2)=0
Add contribution to second adjoint turbulence model PDE.
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
dimensionedScalar pos0(const dimensionedScalar &ds)
virtual const volScalarField & nut() const
Return the turbulence viscosity.
dimensionedScalar alphaK2_
SolverPerformance< Type > solve(const dictionary &)
Solve returning the solution statistics.
static word timeName(const scalar t, const int precision=precision_)
Return time name of given scalar time 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.
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()
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.
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