DAFoam
v4.0.2
Discrete Adjoint with OpenFOAM
dafoam
src
adjoint
DASolver
DARhoSimpleCFoam
EEqnRhoSimpleC.H
Go to the documentation of this file.
1
{
2
volScalarField&
he
=
thermo
.he();
3
4
fvScalarMatrix
EEqn
(
5
fvm::div(
phi
,
he
)
6
+ (
he
.name() ==
"e"
7
? fvc::div(
phi
, volScalarField(
"Ekp"
, 0.5 * magSqr(
U
) +
p
/
rho
))
8
: fvc::div(
phi
, volScalarField(
"K"
, 0.5 * magSqr(
U
))))
9
- fvm::laplacian(turbulencePtr_->alphaEff(),
he
));
10
11
EEqn
.relax();
12
13
// get the solver performance info such as initial
14
// and final residuals
15
SolverPerformance<scalar>
solverE
=
EEqn
.solve();
16
17
DAUtility::primalResidualControl(
solverE
, printToScreen_,
"he"
, daGlobalVarPtr_->primalMaxRes);
18
19
// bound he
20
DAUtility::boundVar(
allOptions
,
he
, printToScreen_);
21
22
thermo
.correct();
23
}
U
volVectorField & U
Definition:
createRefsPimpleDyM.H:7
he
volScalarField & he
Definition:
EEqnRhoPimple.H:5
thermo
fluidThermo & thermo
Definition:
createRefsRhoPimple.H:6
p
volScalarField & p
Definition:
createRefsPimpleDyM.H:6
phi
surfaceScalarField & phi
Definition:
createRefsPimpleDyM.H:8
rho
volScalarField & rho
Definition:
createRefsRhoPimple.H:8
allOptions
const dictionary & allOptions
Definition:
createRefsPimpleDyM.H:14
EEqn
fvScalarMatrix EEqn(fvm::div(phi, he)+(he.name()=="e" ? fvc::div(phi, volScalarField("Ekp", 0.5 *magSqr(U)+p/rho)) :fvc::div(phi, volScalarField("K", 0.5 *magSqr(U)))) - fvm::laplacian(turbulencePtr_->alphaEff(), he))
solverE
SolverPerformance< scalar > solverE
Definition:
EEqnRhoSimpleC.H:15
Generated by
1.8.17