Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
f92fbeb9
Commit
f92fbeb9
authored
May 07, 2008
by
henry
Browse files
Added p to interFoam
Changed formatting of interDyMFoam
parent
3e9f272d
Changes
3
Hide whitespace changes
Inline
Side-by-side
applications/solvers/multiphase/interDyMFoam/interDyMFoam.C
View file @
f92fbeb9
...
...
@@ -46,18 +46,17 @@ Description
int
main
(
int
argc
,
char
*
argv
[])
{
# include "setRootCase.H"
# include "createTime.H"
# include "createDynamicFvMesh.H"
# include "readEnvironmentalProperties.H"
# include "readPISOControls.H"
# include "initContinuityErrs.H"
# include "createFields.H"
# include "readTimeControls.H"
# include "correctPhi.H"
# include "CourantNo.H"
# include "setInitialDeltaT.H"
#include
"setRootCase.H"
#include
"createTime.H"
#include
"createDynamicFvMesh.H"
#include
"readEnvironmentalProperties.H"
#include
"readPISOControls.H"
#include
"initContinuityErrs.H"
#include
"createFields.H"
#include
"readTimeControls.H"
#include
"correctPhi.H"
#include
"CourantNo.H"
#include
"setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
@@ -65,10 +64,10 @@ int main(int argc, char *argv[])
while
(
runTime
.
run
())
{
#
include "readControls.H"
#
include "CourantNo.H"
#
include
"readControls.H"
#
include
"CourantNo.H"
#
include "setDeltaT.H"
#
include
"setDeltaT.H"
runTime
++
;
...
...
@@ -97,7 +96,7 @@ int main(int argc, char *argv[])
if
(
mesh
.
changing
()
&&
correctPhi
)
{
#
include "correctPhi.H"
#
include
"correctPhi.H"
}
// Make the fluxes relative to the mesh motion
...
...
@@ -108,22 +107,22 @@ int main(int argc, char *argv[])
if
(
mesh
.
changing
()
&&
checkMeshCourantNo
)
{
#
include "meshCourantNo.H"
#
include
"meshCourantNo.H"
}
twoPhaseProperties
.
correct
();
#
include "gammaEqnSubCycle.H"
#
include
"gammaEqnSubCycle.H"
#
include "UEqn.H"
#
include
"UEqn.H"
// --- PISO loop
for
(
int
corr
=
0
;
corr
<
nCorr
;
corr
++
)
{
#
include "pEqn.H"
#
include
"pEqn.H"
}
#
include "continuityErrs.H"
#
include
"continuityErrs.H"
p
=
pd
+
rho
*
gh
;
...
...
applications/solvers/multiphase/interFoam/createFields.H
View file @
f92fbeb9
...
...
@@ -45,7 +45,7 @@
Info
<<
"Reading transportProperties
\n
"
<<
endl
;
twoPhaseMixture
twoPhaseProperties
(
U
,
phi
,
"gamma"
);
const
dimensionedScalar
&
rho1
=
twoPhaseProperties
.
rho1
();
const
dimensionedScalar
&
rho2
=
twoPhaseProperties
.
rho2
();
...
...
@@ -83,14 +83,29 @@
);
Info
<<
"Calculating field g.h
\n
"
<<
endl
;
volScalarField
gh
(
"gh"
,
g
&
mesh
.
C
());
surfaceScalarField
ghf
(
"gh"
,
g
&
mesh
.
Cf
());
volScalarField
p
(
IOobject
(
"p"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
NO_READ
,
IOobject
::
AUTO_WRITE
),
pd
+
rho
*
gh
);
label
pdRefCell
=
0
;
scalar
pdRefValue
=
0
.
0
;
setRefCell
(
pd
,
mesh
.
solutionDict
().
subDict
(
"PISO"
),
pdRefCell
,
pdRefValue
);
Info
<<
"Calculating field g.h
\n
"
<<
endl
;
surfaceScalarField
ghf
(
"gh"
,
g
&
mesh
.
Cf
());
// Construct interface from gamma distribution
interfaceProperties
interface
(
gamma
,
U
,
twoPhaseProperties
);
applications/solvers/multiphase/interFoam/interFoam.C
View file @
f92fbeb9
...
...
@@ -45,18 +45,17 @@ Description
int
main
(
int
argc
,
char
*
argv
[])
{
# include "setRootCase.H"
# include "createTime.H"
# include "createMesh.H"
# include "readEnvironmentalProperties.H"
# include "readPISOControls.H"
# include "initContinuityErrs.H"
# include "createFields.H"
# include "readTimeControls.H"
# include "correctPhi.H"
# include "CourantNo.H"
# include "setInitialDeltaT.H"
#include
"setRootCase.H"
#include
"createTime.H"
#include
"createMesh.H"
#include
"readEnvironmentalProperties.H"
#include
"readPISOControls.H"
#include
"initContinuityErrs.H"
#include
"createFields.H"
#include
"readTimeControls.H"
#include
"correctPhi.H"
#include
"CourantNo.H"
#include
"setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
@@ -64,10 +63,10 @@ int main(int argc, char *argv[])
while
(
runTime
.
run
())
{
#
include "readPISOControls.H"
#
include "readTimeControls.H"
#
include "CourantNo.H"
#
include "setDeltaT.H"
#
include
"readPISOControls.H"
#
include
"readTimeControls.H"
#
include
"CourantNo.H"
#
include
"setDeltaT.H"
runTime
++
;
...
...
@@ -75,17 +74,19 @@ int main(int argc, char *argv[])
twoPhaseProperties
.
correct
();
#
include "gammaEqnSubCycle.H"
#
include
"gammaEqnSubCycle.H"
#
include "UEqn.H"
#
include
"UEqn.H"
// --- PISO loop
for
(
int
corr
=
0
;
corr
<
nCorr
;
corr
++
)
{
#
include "pEqn.H"
#
include
"pEqn.H"
}
# include "continuityErrs.H"
#include
"continuityErrs.H"
p
=
pd
+
rho
*
gh
;
runTime
.
write
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment