Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
applications
solvers
multiphase
interFoam
interFoam.C
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration |
5
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
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
interFoam
26
27
Description
28
Solver for 2 incompressible, isothermal immiscible fluids using a VOF
29
(volume of fluid) phase-fraction based interface capturing approach.
30
31
The momentum and other fluid properties are of the "mixture" and a single
32
momentum equation is solved.
33
34
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
35
36
For a two-fluid approach see twoPhaseEulerFoam.
37
38
Usage
39
- interFoam [OPTION]
40
41
@param -case <dir> \n
42
Specify the case directory
43
44
@param -parallel \n
45
Run the case in parallel
46
47
@param -help \n
48
Display short usage message
49
50
@param -doc \n
51
Display Doxygen documentation page
52
53
@param -srcDoc \n
54
Display source code
55
56
\*---------------------------------------------------------------------------*/
57
58
#include <
finiteVolume/fvCFD.H
>
59
#include <
finiteVolume/MULES.H
>
60
#include <
OpenFOAM/subCycle.H
>
61
#include <
interfaceProperties/interfaceProperties.H
>
62
#include <
incompressibleTransportModels/twoPhaseMixture.H
>
63
#include <
incompressibleTurbulenceModel/turbulenceModel.H
>
64
#include <
OpenFOAM/interpolationTable.H
>
65
66
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67
68
int
main
(
int
argc,
char
*argv[])
69
{
70
#include <
OpenFOAM/setRootCase.H
>
71
#include <
OpenFOAM/createTime.H
>
72
#include <
OpenFOAM/createMesh.H
>
73
#include <
finiteVolume/readPISOControls.H
>
74
#include <
finiteVolume/initContinuityErrs.H
>
75
#include "
createFields.H
"
76
#include <
finiteVolume/readTimeControls.H
>
77
#include "
correctPhi.H
"
78
#include <
finiteVolume/CourantNo.H
>
79
#include <
finiteVolume/setInitialDeltaT.H
>
80
81
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82
83
Info
<<
"\nStarting time loop\n"
<<
endl
;
84
85
while
(runTime.run())
86
{
87
#include <
finiteVolume/readPISOControls.H
>
88
#include <
finiteVolume/readTimeControls.H
>
89
#include <
finiteVolume/CourantNo.H
>
90
#include "
alphaCourantNo.H
"
91
#include "
setDeltaT.H
"
92
93
runTime++;
94
95
Info
<<
"Time = "
<< runTime.timeName() <<
nl
<<
endl
;
96
97
twoPhaseProperties
.correct();
98
99
#include "
alphaEqnSubCycle.H
"
100
101
#include "
UEqn.H
"
102
103
// --- PISO loop
104
for
(
int
corr=0; corr<
nCorr
; corr++)
105
{
106
#include "
pEqn.H
"
107
}
108
109
turbulence
->correct();
110
111
runTime.write();
112
113
Info
<<
"ExecutionTime = "
<< runTime.elapsedCpuTime() <<
" s"
114
<<
" ClockTime = "
<< runTime.elapsedClockTime() <<
" s"
115
<<
nl
<<
endl
;
116
}
117
118
Info
<<
"End\n"
<<
endl
;
119
120
return
0;
121
}
122
123
124
// ************************ vim: set sw=4 sts=4 et: ************************ //