OpenFOAM
12
The OpenFOAM Foundation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
porousSimpleFoam.C
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration | Website: https://openfoam.org
5
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
11
OpenFOAM is free software: you can redistribute it and/or modify it
12
under the terms of the GNU General Public License as published by
13
the Free Software Foundation, either version 3 of the License, or
14
(at your option) any later version.
15
16
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19
for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23
24
Application
25
porousSimpleFoam
26
27
Description
28
Steady-state solver for incompressible, turbulent flow with
29
implicit or explicit porosity treatment and support for multiple reference
30
frames (MRF).
31
32
\*---------------------------------------------------------------------------*/
33
34
#include "
argList.H
"
35
#include "
timeSelector.H
"
36
#include "
viscosityModel.H
"
37
#include "
incompressibleMomentumTransportModels.H
"
38
#include "
simpleControl.H
"
39
#include "
pressureReference.H
"
40
#include "
findRefCell.H
"
41
#include "
constrainPressure.H
"
42
#include "
constrainHbyA.H
"
43
#include "
adjustPhi.H
"
44
#include "
fvModels.H
"
45
#include "
fvConstraints.H
"
46
#include "
IOporosityModelList.H
"
47
48
#include "
fvcDdt.H
"
49
#include "
fvcGrad.H
"
50
#include "
fvcFlux.H
"
51
52
#include "
fvmDdt.H
"
53
#include "
fvmDiv.H
"
54
#include "
fvmLaplacian.H
"
55
56
using namespace
Foam
;
57
58
59
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60
61
int
main
(
int
argc,
char
*argv[])
62
{
63
#define CREATE_FIELDS_2 createPorousZones.H
64
#include "
postProcess.H
"
65
66
#include "
setRootCase.H
"
67
#include "
createTime.H
"
68
#include "
createMesh.H
"
69
#include "createControl.H"
70
#include "
createFields.H
"
71
#include "
createPorousZones.H
"
72
#include "
initContinuityErrs.H
"
73
74
turbulence
->validate();
75
76
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77
78
Info
<<
"\nStarting time loop\n"
<<
endl
;
79
80
while
(
simple
.
loop
(runTime))
81
{
82
Info
<<
"Time = "
<< runTime.userTimeName() <<
nl
<<
endl
;
83
84
fvModels
.
correct
();
85
86
turbulence
->predict();
87
88
// Pressure-velocity SIMPLE corrector
89
{
90
#include "
UEqn.H
"
91
#include "
pEqn.H
"
92
}
93
94
viscosity
->correct();
95
turbulence
->correct();
96
97
runTime.write();
98
99
Info
<<
"ExecutionTime = "
<< runTime.elapsedCpuTime() <<
" s"
100
<<
" ClockTime = "
<< runTime.elapsedClockTime() <<
" s"
101
<<
nl
<<
endl
;
102
}
103
104
Info
<<
"End\n"
<<
endl
;
105
106
return
0;
107
}
108
109
110
// ************************************************************************* //
IOporosityModelList.H
adjustPhi.H
For cases which do no have a pressure boundary adjust the balance of fluxes to obey continuity....
argList.H
Foam::fvModels
Finite volume models.
Definition:
fvModels.H:65
Foam::fvModels::correct
virtual void correct()
Correct the fvModels.
Definition:
fvModels.C:380
Foam::simpleControl::loop
bool loop(Time &time)
Time loop loop.
Definition:
simpleControl.C:80
Foam::viscosity
Abstract base class for all fluid physical properties.
Definition:
viscosity.H:50
constrainHbyA.H
constrainPressure.H
createMesh.H
createPorousZones.H
simple
simpleControl simple(mesh)
createTime.H
findRefCell.H
Find the reference cell nearest (in index) to the given cell but which is not on a cyclic,...
fvConstraints.H
fvModels.H
fvcDdt.H
Calculate the first temporal derivative.
fvcFlux.H
Calculate the face-flux of the given field.
fvcGrad.H
Calculate the gradient of the given field.
fvmDdt.H
Calculate the matrix for the first temporal derivative.
fvmDiv.H
Calculate the matrix for the divergence of the given field and flux.
fvmLaplacian.H
Calculate the matrix for the laplacian of the field.
incompressibleMomentumTransportModels.H
UEqn.H
initContinuityErrs.H
Declare and initialise the cumulative continuity error.
pEqn.H
createFields.H
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.H:214
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition:
Ostream.H:257
Foam::Info
messageStream Info
Foam::nl
static const char nl
Definition:
Ostream.H:266
main
int main(int argc, char *argv[])
Definition:
porousSimpleFoam.C:58
postProcess.H
Execute application functionObjects to post-process existing results.
pressureReference.H
setRootCase.H
simpleControl.H
turbulence
autoPtr< incompressible::momentumTransportModel > turbulence(incompressible::momentumTransportModel::New(U, phi, viscosity))
timeSelector.H
viscosityModel.H
applications
legacy
incompressible
porousSimpleFoam
porousSimpleFoam.C
Generated by
1.9.1