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
globalContErr
scalar globalContErr
Definition:
compressibleContinuityErrors.H:9
Foam::fvc::domainIntegrate
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
Definition:
fvcVolumeIntegrate.C:88
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition:
Ostream.H:369
rho
rho
Definition:
readInitialConditions.H:88
sumLocalContErr
scalar sumLocalContErr
Definition:
compressibleContinuityErrors.H:4
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition:
dimensionedScalarFwd.H:42
mesh
dynamicFvMesh & mesh
Definition:
createDynamicFvMesh.H:6
cumulativeContErr
cumulativeContErr[i]
Definition:
compressibleContinuityErrors.H:14
Foam::mag
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
applications
solvers
heatTransfer
chtMultiRegionFoam
fluid
compressibleContinuityErrors.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.