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
interPhaseChangeFoam
interPhaseChangeFoam.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
interPhaseChangeFoam
26
27
Description
28
Solver for 2 incompressible, isothermal immiscible fluids with phase-change
29
(e.g. cavitation).
30
31
Uses a VOF (volume of fluid) phase-fraction based interface capturing
32
approach. The momentum and other fluid properties are of the "mixture" and
33
a single momentum equation is solved.
34
35
The set of phase-change models provided are designed to simulate cavitation
36
but other mechanisms of phase-change are supported within this solver
37
framework.
38
39
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
40
41
Usage
42
- interPhaseChangeFoam [OPTION]
43
44
@param -case <dir> \n
45
Specify the case directory
46
47
@param -parallel \n
48
Run the case in parallel
49
50
@param -help \n
51
Display short usage message
52
53
@param -doc \n
54
Display Doxygen documentation page
55
56
@param -srcDoc \n
57
Display source code
58
59
\*---------------------------------------------------------------------------*/
60
61
#include <
finiteVolume/fvCFD.H
>
62
#include <
finiteVolume/MULES.H
>
63
#include <
OpenFOAM/subCycle.H
>
64
#include <
interfaceProperties/interfaceProperties.H
>
65
#include "
phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H
"
66
#include <
incompressibleTurbulenceModel/turbulenceModel.H
>
67
68
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69
70
int
main
(
int
argc,
char
*argv[])
71
{
72
#include <
OpenFOAM/setRootCase.H
>
73
#include <
OpenFOAM/createTime.H
>
74
#include <
OpenFOAM/createMesh.H
>
75
#include <
finiteVolume/readGravitationalAcceleration.H
>
76
#include <
finiteVolume/readPISOControls.H
>
77
#include <
finiteVolume/initContinuityErrs.H
>
78
#include "
createFields.H
"
79
#include <
finiteVolume/readTimeControls.H
>
80
#include "
../interFoam/correctPhi.H
"
81
#include <
finiteVolume/CourantNo.H
>
82
#include <
finiteVolume/setInitialDeltaT.H
>
83
84
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
85
86
Info
<<
"\nStarting time loop\n"
<<
endl
;
87
88
while
(runTime.run())
89
{
90
#include <
finiteVolume/readPISOControls.H
>
91
#include <
finiteVolume/readTimeControls.H
>
92
#include <
finiteVolume/CourantNo.H
>
93
#include <
finiteVolume/setDeltaT.H
>
94
95
runTime++;
96
97
Info
<<
"Time = "
<< runTime.timeName() <<
nl
<<
endl
;
98
99
#include "
alphaEqnSubCycle.H
"
100
101
turbulence
->correct();
102
103
// --- Pressure-velocity PIMPLE corrector loop
104
for
(
int
oCorr=0; oCorr<
nOuterCorr
; oCorr++)
105
{
106
bool
finalIter = oCorr == nOuterCorr-1;
107
108
#include "
UEqn.H
"
109
110
// --- PISO loop
111
for
(
int
corr=0; corr<
nCorr
; corr++)
112
{
113
#include "
pEqn.H
"
114
}
115
}
116
117
twoPhaseProperties
->correct();
118
119
runTime.write();
120
121
Info
<<
"ExecutionTime = "
<< runTime.elapsedCpuTime() <<
" s"
122
<<
" ClockTime = "
<< runTime.elapsedClockTime() <<
" s"
123
<<
nl
<<
endl
;
124
}
125
126
Info
<<
"End\n"
<<
endl
;
127
128
return
0;
129
}
130
131
132
// ************************ vim: set sw=4 sts=4 et: ************************ //