OpenFOAM: API Guide
v2112
The open source CFD toolbox
compressibleContinuityErrors.H
Go to the documentation of this file.
1
{
2
dimensionedScalar
totalMass
= fvc::domainIntegrate(
rho
);
3
4
scalar
sumLocalContErr
=
5
(
6
fvc::domainIntegrate(mag(
rho
-
thermo
.rho()))/
totalMass
7
).value();
8
9
scalar
globalContErr
=
10
(
11
fvc::domainIntegrate(
rho
-
thermo
.rho())/
totalMass
12
).value();
13
14
cumulativeContErr
[i] +=
globalContErr
;
15
16
Info<<
"time step continuity errors ("
<<
mesh
.name() <<
")"
17
<<
": sum local = "
<<
sumLocalContErr
18
<<
", global = "
<<
globalContErr
19
<<
", cumulative = "
<<
cumulativeContErr
[i]
20
<< endl;
21
}
totalMass
dimensionedScalar totalMass
Definition:
continuityErrs.H:4
sumLocalContErr
scalar sumLocalContErr
Definition:
compressibleContinuityErrors.H:4
globalContErr
scalar globalContErr
Definition:
compressibleContinuityErrors.H:9
cumulativeContErr
cumulativeContErr[i]
Definition:
compressibleContinuityErrors.H:14
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
mesh
dynamicFvMesh & mesh
Definition:
createDynamicFvMesh.H:6
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition:
dimensionedScalarFwd.H:44
rho
rho
Definition:
readInitialConditions.H:88
applications
solvers
heatTransfer
chtMultiRegionFoam
chtMultiRegionSimpleFoam
fluid
compressibleContinuityErrors.H
Generated by
1.9.5
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.