OpenFOAM: API Guide
v2012
The open source CFD toolbox
CorrectPhi.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration |
5
\\ / A nd | www.openfoam.com
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
Copyright (C) 2015-2016 OpenFOAM Foundation
9
-------------------------------------------------------------------------------
10
License
11
This file is part of OpenFOAM.
12
13
OpenFOAM is free software: you can redistribute it and/or modify it
14
under the terms of the GNU General Public License as published by
15
the Free Software Foundation, either version 3 of the License, or
16
(at your option) any later version.
17
18
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21
for more details.
22
23
You should have received a copy of the GNU General Public License
24
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26
Class
27
Foam::CorrectPhi
28
29
Description
30
Flux correction functions to ensure continuity.
31
32
Required during start-up, restart, mesh-motion etc. when non-conservative
33
fluxes may adversely affect the prediction-part of the solution algorithm
34
(the part before the first pressure solution which would ensure continuity).
35
This is particularly important for VoF and other multi-phase solver in
36
which non-conservative fluxes cause unboundedness of the phase-fraction.
37
38
SourceFiles
39
CorrectPhi.C
40
41
\*---------------------------------------------------------------------------*/
42
43
#ifndef CorrectPhi_H
44
#define CorrectPhi_H
45
46
#include "
volFieldsFwd.H
"
47
#include "
surfaceFieldsFwd.H
"
48
49
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50
51
namespace
Foam
52
{
53
class
pimpleControl;
54
55
//- If the mesh is moving correct the velocity BCs on the moving walls to
56
// ensure the corrected fluxes and velocity are consistent
57
void
correctUphiBCs
58
(
59
volVectorField
&
U
,
60
surfaceScalarField
&
phi
61
);
62
63
//- If the mesh is moving correct the velocity BCs on the moving walls to
64
// ensure the corrected fluxes and velocity are consistent
65
void
correctUphiBCs
66
(
67
const
volScalarField
&
rho
,
68
volVectorField
&
U
,
69
surfaceScalarField
&
phi
70
);
71
72
template
<
class
RAUfType,
class
DivUType>
73
void
CorrectPhi
74
(
75
volVectorField
&
U
,
76
surfaceScalarField
&
phi
,
77
const
volScalarField
&
p
,
78
const
RAUfType&
rAUf
,
79
const
DivUType&
divU
,
80
pimpleControl&
pimple
81
);
82
83
template
<
class
RAUfType,
class
DivRhoUType>
84
void
CorrectPhi
85
(
86
volVectorField
&
U
,
87
surfaceScalarField
&
phi
,
88
const
volScalarField
&
p
,
89
const
volScalarField
&
rho
,
90
const
volScalarField
&
psi
,
91
const
RAUfType&
rAUf
,
92
const
DivRhoUType& divRhoU,
93
pimpleControl&
pimple
94
);
95
}
96
97
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
98
99
#ifdef NoRepository
100
#include "
CorrectPhi.C
"
101
#endif
102
103
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104
105
#endif
106
107
// ************************************************************************* //
volFieldsFwd.H
p
volScalarField & p
Definition:
createFieldRefs.H:8
rho
rho
Definition:
readInitialConditions.H:88
pimple
pimpleControl & pimple
Definition:
setRegionFluidFields.H:56
CorrectPhi.C
divU
zeroField divU
Definition:
alphaSuSp.H:3
phi
surfaceScalarField & phi
Definition:
setRegionFluidFields.H:8
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition:
volFieldsFwd.H:57
Foam::correctUphiBCs
void correctUphiBCs(volVectorField &U, surfaceScalarField &phi)
If the mesh is moving correct the velocity BCs on the moving walls to.
Definition:
correctUphiBCs.C:33
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition:
volFieldsFwd.H:62
U
U
Definition:
pEqn.H:72
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition:
surfaceFieldsFwd.H:54
Foam::CorrectPhi
void CorrectPhi(volVectorField &U, surfaceScalarField &phi, const volScalarField &p, const RAUfType &rAUf, const DivUType &divU, pimpleControl &pimple)
Definition:
CorrectPhi.C:45
surfaceFieldsFwd.H
psi
const volScalarField & psi
Definition:
createFieldRefs.H:1
rAUf
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))
src
finiteVolume
cfdTools
general
CorrectPhi
CorrectPhi.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.