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
interDyMFoam
interDyMFoam.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
interDyMFoam
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
with optional mesh motion and mesh topology changes including adaptive
31
re-meshing.
32
33
Usage
34
- interDyMFoam [OPTION]
35
36
@param -case <dir> \n
37
Specify the case directory
38
39
@param -parallel \n
40
Run the case in parallel
41
42
@param -help \n
43
Display short usage message
44
45
@param -doc \n
46
Display Doxygen documentation page
47
48
@param -srcDoc \n
49
Display source code
50
51
\*---------------------------------------------------------------------------*/
52
53
#include <
finiteVolume/fvCFD.H
>
54
#include <
dynamicFvMesh/dynamicFvMesh.H
>
55
#include <
finiteVolume/MULES.H
>
56
#include <
OpenFOAM/subCycle.H
>
57
#include <
interfaceProperties/interfaceProperties.H
>
58
#include <
incompressibleTransportModels/twoPhaseMixture.H
>
59
#include <
incompressibleTurbulenceModel/turbulenceModel.H
>
60
61
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62
63
int
main
(
int
argc,
char
*argv[])
64
{
65
#include <
OpenFOAM/setRootCase.H
>
66
#include <
OpenFOAM/createTime.H
>
67
#include <
dynamicFvMesh/createDynamicFvMesh.H
>
68
#include <
finiteVolume/readPISOControls.H
>
69
#include <
finiteVolume/initContinuityErrs.H
>
70
#include "
../createFields.H
"
71
#include <
finiteVolume/readTimeControls.H
>
72
#include "
../correctPhi.H
"
73
#include <
finiteVolume/CourantNo.H
>
74
#include <
finiteVolume/setInitialDeltaT.H
>
75
76
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77
Info
<<
"\nStarting time loop\n"
<<
endl
;
78
79
while
(runTime.run())
80
{
81
#include "
readControls.H
"
82
#include "
../alphaCourantNo.H
"
83
#include <
finiteVolume/CourantNo.H
>
84
85
// Make the fluxes absolute
86
fvc::makeAbsolute
(
phi
,
U
);
87
88
#include "
../setDeltaT.H
"
89
90
runTime++;
91
92
Info
<<
"Time = "
<< runTime.timeName() <<
nl
<<
endl
;
93
94
scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
95
96
// Do any mesh changes
97
mesh
.
update
();
98
99
if
(
mesh
.
changing
())
100
{
101
Info
<<
"Execution time for mesh.update() = "
102
<< runTime.elapsedCpuTime() - timeBeforeMeshUpdate
103
<<
" s"
<<
endl
;
104
105
gh
= g &
mesh
.
C
();
106
ghf
= g &
mesh
.
Cf
();
107
}
108
109
if
(
mesh
.
changing
() &&
correctPhi
)
110
{
111
#include "
../correctPhi.H
"
112
}
113
114
// Make the fluxes relative to the mesh motion
115
fvc::makeRelative
(
phi
,
U
);
116
117
if
(
mesh
.
changing
() &&
checkMeshCourantNo
)
118
{
119
#include <
dynamicFvMesh/meshCourantNo.H
>
120
}
121
122
twoPhaseProperties
.correct();
123
124
#include "
../alphaEqnSubCycle.H
"
125
126
#include "
../UEqn.H
"
127
128
// --- PISO loop
129
for
(
int
corr=0; corr<
nCorr
; corr++)
130
{
131
#include "
pEqn.H
"
132
}
133
134
turbulence
->correct();
135
136
runTime.write();
137
138
Info
<<
"ExecutionTime = "
<< runTime.elapsedCpuTime() <<
" s"
139
<<
" ClockTime = "
<< runTime.elapsedClockTime() <<
" s"
140
<<
nl
<<
endl
;
141
}
142
143
Info
<<
"End\n"
<<
endl
;
144
145
return
0;
146
}
147
148
149
// ************************ vim: set sw=4 sts=4 et: ************************ //