DAFoam
v3.0.6
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
this->
primalResidualControl<scalar>
(solverE, printToScreen, printInterval,
"he"
);
18
19
// bound he
20
DAUtility::boundVar(
allOptions
,
he
, printToScreen);
21
22
thermo
.correct();
23
}
allOptions
const dictionary & allOptions
Definition:
createRefsRhoSimpleC.H:15
U
U
Definition:
pEqnPimpleDyM.H:60
p
volScalarField & p
Definition:
createRefsPimple.H:6
primalResidualControl< scalar >
this primalResidualControl< scalar >(solverE, printToScreen, printInterval, "he")
phi
surfaceScalarField & phi
Definition:
createRefsPimple.H:8
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))
thermo
fluidThermo & thermo
Definition:
createRefsRhoSimpleC.H:6
he
volScalarField & he
Definition:
EEqnRhoSimple.H:5
solverE
SolverPerformance< scalar > solverE
Definition:
EEqnRhoSimpleC.H:15
rho
volScalarField & rho
Definition:
createRefsRhoSimpleC.H:8
Generated by
1.8.17