Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
HPCAPPs
OpenFOAM-GPU-v2.0
Commits
649c29f9
Commit
649c29f9
authored
Aug 30, 2023
by
quant
Browse files
Initial commit
parent
89db0b5a
Changes
789
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
711 additions
and
0 deletions
+711
-0
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/createControls.H
...tiphase/cavitatingFoam/cavitatingDyMFoam/createControls.H
+6
-0
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/createPcorrTypes.H
...phase/cavitatingFoam/cavitatingDyMFoam/createPcorrTypes.H
+13
-0
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H
...olvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H
+88
-0
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/readControls.H
...ultiphase/cavitatingFoam/cavitatingDyMFoam/readControls.H
+4
-0
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C
...ations/solvers/multiphase/cavitatingFoam/cavitatingFoam.C
+113
-0
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/continuityErrs.H
...ations/solvers/multiphase/cavitatingFoam/continuityErrs.H
+22
-0
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/createControls.H
...ations/solvers/multiphase/cavitatingFoam/createControls.H
+6
-0
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/createFields.H
...ications/solvers/multiphase/cavitatingFoam/createFields.H
+96
-0
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/pEqn.H
...112/applications/solvers/multiphase/cavitatingFoam/pEqn.H
+85
-0
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/readControls.H
...ications/solvers/multiphase/cavitatingFoam/readControls.H
+3
-0
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/readThermodynamicProperties.H
...s/multiphase/cavitatingFoam/readThermodynamicProperties.H
+27
-0
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/rhoEqn.H
...2/applications/solvers/multiphase/cavitatingFoam/rhoEqn.H
+16
-0
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/setDeltaT.H
...pplications/solvers/multiphase/cavitatingFoam/setDeltaT.H
+55
-0
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/setInitialDeltaT.H
...ions/solvers/multiphase/cavitatingFoam/setInitialDeltaT.H
+53
-0
OpenFOAM-v2112/applications/solvers/multiphase/compressibleInterFoam/Allwclean
...ations/solvers/multiphase/compressibleInterFoam/Allwclean
+14
-0
OpenFOAM-v2112/applications/solvers/multiphase/compressibleInterFoam/Allwmake
...cations/solvers/multiphase/compressibleInterFoam/Allwmake
+16
-0
OpenFOAM-v2112/applications/solvers/multiphase/compressibleInterFoam/Make/files
...tions/solvers/multiphase/compressibleInterFoam/Make/files
+3
-0
OpenFOAM-v2112/applications/solvers/multiphase/compressibleInterFoam/Make/options
...ons/solvers/multiphase/compressibleInterFoam/Make/options
+29
-0
OpenFOAM-v2112/applications/solvers/multiphase/compressibleInterFoam/TEqn.H
...lications/solvers/multiphase/compressibleInterFoam/TEqn.H
+28
-0
OpenFOAM-v2112/applications/solvers/multiphase/compressibleInterFoam/UEqn.H
...lications/solvers/multiphase/compressibleInterFoam/UEqn.H
+34
-0
No files found.
Too many changes to show.
To preserve performance only
789 of 789+
files are displayed.
Plain diff
Email patch
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/createControls.H
0 → 100644
View file @
649c29f9
#include "createDyMControls.H"
scalar
maxAcousticCo
(
runTime
.
controlDict
().
get
<
scalar
>
(
"maxAcousticCo"
)
);
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/createPcorrTypes.H
0 → 100644
View file @
649c29f9
wordList
pcorrTypes
(
p
.
boundaryField
().
size
(),
zeroGradientFvPatchScalarField
::
typeName
);
for
(
label
i
=
0
;
i
<
p
.
boundaryField
().
size
();
i
++
)
{
if
(
p
.
boundaryField
()[
i
].
fixesValue
())
{
pcorrTypes
[
i
]
=
fixedValueFvPatchScalarField
::
typeName
;
}
}
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H
0 → 100644
View file @
649c29f9
{
if
(
pimple
.
nCorrPIMPLE
()
==
1
)
{
p
=
(
rho
-
alphal
*
rhol0
-
((
alphav
*
psiv
+
alphal
*
psil
)
-
psi
)
*
pSat
)
/
psi
;
}
surfaceScalarField
rhof
(
"rhof"
,
fvc
::
interpolate
(
rho
));
volScalarField
rAU
(
1
.
0
/
UEqn
.
A
());
surfaceScalarField
rhorAUf
(
"rhorAUf"
,
fvc
::
interpolate
(
rho
*
rAU
));
volVectorField
HbyA
(
constrainHbyA
(
rAU
*
UEqn
.
H
(),
U
,
p
));
phi
=
fvc
::
flux
(
HbyA
)
+
rhorAUf
*
fvc
::
ddtCorr
(
U
,
Uf
);
fvc
::
makeRelative
(
phi
,
U
);
surfaceScalarField
phiGradp
(
rhorAUf
*
mesh
.
magSf
()
*
fvc
::
snGrad
(
p
));
phi
-=
phiGradp
/
rhof
;
volScalarField
rho0
(
rho
-
psi
*
p
);
while
(
pimple
.
correctNonOrthogonal
())
{
fvScalarMatrix
pEqn
(
fvc
::
ddt
(
rho
)
+
psi
*
correction
(
fvm
::
ddt
(
p
))
+
fvc
::
div
(
phi
,
rho
)
+
fvc
::
div
(
phiGradp
)
-
fvm
::
laplacian
(
rhorAUf
,
p
)
);
pEqn
.
solve
(
mesh
.
solver
(
p
.
select
(
pimple
.
finalInnerIter
())));
if
(
pimple
.
finalNonOrthogonalIter
())
{
phi
+=
(
phiGradp
+
pEqn
.
flux
())
/
rhof
;
}
}
Info
<<
"Predicted p max-min : "
<<
max
(
p
).
value
()
<<
" "
<<
min
(
p
).
value
()
<<
endl
;
rho
==
max
(
rho0
+
psi
*
p
,
rhoMin
);
#include "alphavPsi.H"
p
=
(
rho
-
alphal
*
rhol0
-
((
alphav
*
psiv
+
alphal
*
psil
)
-
psi
)
*
pSat
)
/
psi
;
p
.
correctBoundaryConditions
();
Info
<<
"Phase-change corrected p max-min : "
<<
max
(
p
).
value
()
<<
" "
<<
min
(
p
).
value
()
<<
endl
;
// Correct velocity
U
=
HbyA
-
rAU
*
fvc
::
grad
(
p
);
// Remove the swirl component of velocity for "wedge" cases
if
(
pimple
.
dict
().
found
(
"removeSwirl"
))
{
label
swirlCmpt
(
pimple
.
dict
().
get
<
label
>
(
"removeSwirl"
));
Info
<<
"Removing swirl component-"
<<
swirlCmpt
<<
" of U"
<<
endl
;
U
.
field
().
replace
(
swirlCmpt
,
Zero
);
}
U
.
correctBoundaryConditions
();
Info
<<
"max(U) "
<<
max
(
mag
(
U
)).
value
()
<<
endl
;
{
Uf
=
fvc
::
interpolate
(
U
);
surfaceVectorField
n
(
mesh
.
Sf
()
/
mesh
.
magSf
());
Uf
+=
n
*
(
phi
/
mesh
.
magSf
()
-
(
n
&
Uf
));
}
}
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/readControls.H
0 → 100644
View file @
649c29f9
#include "readDyMControls.H"
correctPhi
=
pimple
.
dict
().
getOrDefault
(
"correctPhi"
,
true
);
maxAcousticCo
=
runTime
.
controlDict
().
get
<
scalar
>
(
"maxAcousticCo"
);
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C
0 → 100644
View file @
649c29f9
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
cavitatingFoam
Group
grpMultiphaseSolvers
Description
Transient cavitation solver based on the homogeneous equilibrium model
from which the compressibility of the liquid/vapour 'mixture' is obtained.
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "barotropicCompressibilityModel.H"
#include "incompressibleTwoPhaseMixture.H"
#include "turbulentTransportModel.H"
#include "pimpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int
main
(
int
argc
,
char
*
argv
[])
{
argList
::
addNote
(
"Transient cavitation solver based on the homogeneous equilibrium"
" model from which the compressibility of the liquid/vapour 'mixture'"
" is obtained."
);
#include "postProcess.H"
#include "addCheckCaseOptions.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
#include "createControls.H"
#include "createFields.H"
#include "CourantNo.H"
#include "setInitialDeltaT.H"
turbulence
->
validate
();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info
<<
"
\n
Starting time loop
\n
"
<<
endl
;
while
(
runTime
.
run
())
{
#include "readControls.H"
#include "CourantNo.H"
#include "setDeltaT.H"
++
runTime
;
Info
<<
"Time = "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
// --- Pressure-velocity PIMPLE corrector loop
while
(
pimple
.
loop
())
{
#include "rhoEqn.H"
#include "alphavPsi.H"
#include "UEqn.H"
// --- Pressure corrector loop
while
(
pimple
.
correct
())
{
#include "pEqn.H"
}
if
(
pimple
.
turbCorr
())
{
turbulence
->
correct
();
}
}
runTime
.
write
();
runTime
.
printExecutionTime
(
Info
);
}
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
// ************************************************************************* //
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/continuityErrs.H
0 → 100644
View file @
649c29f9
{
volScalarField
thermoRho
=
psi
*
p
+
alphal
*
rhol0
;
dimensionedScalar
totalMass
=
fvc
::
domainIntegrate
(
rho
);
scalar
sumLocalContErr
=
(
fvc
::
domainIntegrate
(
mag
(
rho
-
thermoRho
))
/
totalMass
).
value
();
scalar
globalContErr
=
(
fvc
::
domainIntegrate
(
rho
-
thermoRho
)
/
totalMass
).
value
();
cumulativeContErr
+=
globalContErr
;
Info
<<
"time step continuity errors : sum local = "
<<
sumLocalContErr
<<
", global = "
<<
globalContErr
<<
", cumulative = "
<<
cumulativeContErr
<<
endl
;
}
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/createControls.H
0 → 100644
View file @
649c29f9
#include "createTimeControls.H"
scalar
maxAcousticCo
(
runTime
.
controlDict
().
get
<
scalar
>
(
"maxAcousticCo"
)
);
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/createFields.H
0 → 100644
View file @
649c29f9
#include "readThermodynamicProperties.H"
Info
<<
"Reading field p
\n
"
<<
endl
;
volScalarField
p
(
IOobject
(
"p"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
MUST_READ
,
IOobject
::
AUTO_WRITE
),
mesh
);
volScalarField
rho
(
IOobject
(
"rho"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
MUST_READ
,
IOobject
::
AUTO_WRITE
),
mesh
);
Info
<<
"Reading field U
\n
"
<<
endl
;
volVectorField
U
(
IOobject
(
"U"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
MUST_READ
,
IOobject
::
AUTO_WRITE
),
mesh
);
#include "createPhi.H"
mesh
.
setFluxRequired
(
p
.
name
());
// Mass flux (corrected by rhoEqn.H)
surfaceScalarField
rhoPhi
(
IOobject
(
"rhoPhi"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
NO_READ
,
IOobject
::
NO_WRITE
),
fvc
::
interpolate
(
rho
)
*
phi
);
Info
<<
"Reading transportProperties
\n
"
<<
endl
;
incompressibleTwoPhaseMixture
mixture
(
U
,
phi
);
volScalarField
&
alphav
(
mixture
.
alpha1
());
alphav
.
oldTime
();
volScalarField
&
alphal
(
mixture
.
alpha2
());
Info
<<
"Creating compressibilityModel
\n
"
<<
endl
;
autoPtr
<
barotropicCompressibilityModel
>
psiModel
=
barotropicCompressibilityModel
::
New
(
thermodynamicProperties
,
alphav
);
const
volScalarField
&
psi
=
psiModel
->
psi
();
rho
==
max
(
psi
*
p
+
alphal
*
rhol0
+
((
alphav
*
psiv
+
alphal
*
psil
)
-
psi
)
*
pSat
,
rhoMin
);
mesh
.
setFluxRequired
(
p
.
name
());
mesh
.
setFluxRequired
(
rho
.
name
());
// Create incompressible turbulence model
autoPtr
<
incompressible
::
turbulenceModel
>
turbulence
(
incompressible
::
turbulenceModel
::
New
(
U
,
phi
,
mixture
)
);
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/pEqn.H
0 → 100644
View file @
649c29f9
{
if
(
pimple
.
nCorrPIMPLE
()
==
1
)
{
p
=
(
rho
-
alphal
*
rhol0
-
((
alphav
*
psiv
+
alphal
*
psil
)
-
psi
)
*
pSat
)
/
psi
;
}
surfaceScalarField
rhof
(
"rhof"
,
fvc
::
interpolate
(
rho
));
volScalarField
rAU
(
1
.
0
/
UEqn
.
A
());
surfaceScalarField
rhorAUf
(
"rhorAUf"
,
fvc
::
interpolate
(
rho
*
rAU
));
volVectorField
HbyA
(
constrainHbyA
(
rAU
*
UEqn
.
H
(),
U
,
p
));
phi
=
fvc
::
flux
(
HbyA
)
+
rhorAUf
*
fvc
::
ddtCorr
(
U
,
phi
);
surfaceScalarField
phiGradp
(
rhorAUf
*
mesh
.
magSf
()
*
fvc
::
snGrad
(
p
));
phi
-=
phiGradp
/
rhof
;
while
(
pimple
.
correctNonOrthogonal
())
{
fvScalarMatrix
pEqn
(
fvm
::
ddt
(
psi
,
p
)
-
(
rhol0
+
(
psil
-
psiv
)
*
pSat
)
*
fvc
::
ddt
(
alphav
)
-
pSat
*
fvc
::
ddt
(
psi
)
+
fvc
::
div
(
phi
,
rho
)
+
fvc
::
div
(
phiGradp
)
-
fvm
::
laplacian
(
rhorAUf
,
p
)
);
pEqn
.
solve
(
mesh
.
solver
(
p
.
select
(
pimple
.
finalInnerIter
())));
if
(
pimple
.
finalNonOrthogonalIter
())
{
phi
+=
(
phiGradp
+
pEqn
.
flux
())
/
rhof
;
}
}
Info
<<
"Predicted p max-min : "
<<
max
(
p
).
value
()
<<
" "
<<
min
(
p
).
value
()
<<
endl
;
rho
==
max
(
psi
*
p
+
alphal
*
rhol0
+
((
alphav
*
psiv
+
alphal
*
psil
)
-
psi
)
*
pSat
,
rhoMin
);
#include "alphavPsi.H"
p
=
(
rho
-
alphal
*
rhol0
-
((
alphav
*
psiv
+
alphal
*
psil
)
-
psi
)
*
pSat
)
/
psi
;
p
.
correctBoundaryConditions
();
Info
<<
"Phase-change corrected p max-min : "
<<
max
(
p
).
value
()
<<
" "
<<
min
(
p
).
value
()
<<
endl
;
// Correct velocity
U
=
HbyA
-
rAU
*
fvc
::
grad
(
p
);
// Remove the swirl component of velocity for "wedge" cases
if
(
pimple
.
dict
().
found
(
"removeSwirl"
))
{
label
swirlCmpt
(
pimple
.
dict
().
get
<
label
>
(
"removeSwirl"
));
Info
<<
"Removing swirl component-"
<<
swirlCmpt
<<
" of U"
<<
endl
;
U
.
field
().
replace
(
swirlCmpt
,
Zero
);
}
U
.
correctBoundaryConditions
();
Info
<<
"max(U) "
<<
max
(
mag
(
U
)).
value
()
<<
endl
;
}
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/readControls.H
0 → 100644
View file @
649c29f9
#include "readTimeControls.H"
maxAcousticCo
=
runTime
.
controlDict
().
get
<
scalar
>
(
"maxAcousticCo"
);
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/readThermodynamicProperties.H
0 → 100644
View file @
649c29f9
Info
<<
"Reading thermodynamicProperties
\n
"
<<
endl
;
IOdictionary
thermodynamicProperties
(
IOobject
(
"thermodynamicProperties"
,
runTime
.
constant
(),
mesh
,
IOobject
::
MUST_READ_IF_MODIFIED
,
IOobject
::
NO_WRITE
)
);
dimensionedScalar
psil
(
"psil"
,
dimCompressibility
,
thermodynamicProperties
);
dimensionedScalar
rholSat
(
"rholSat"
,
dimDensity
,
thermodynamicProperties
);
dimensionedScalar
psiv
(
"psiv"
,
dimCompressibility
,
thermodynamicProperties
);
dimensionedScalar
pSat
(
"pSat"
,
dimPressure
,
thermodynamicProperties
);
dimensionedScalar
rhovSat
(
"rhovSat"
,
psiv
*
pSat
);
dimensionedScalar
rhol0
(
"rhol0"
,
rholSat
-
pSat
*
psil
);
const
dimensionedScalar
rhoMin
(
"rhoMin"
,
dimDensity
,
thermodynamicProperties
);
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/rhoEqn.H
0 → 100644
View file @
649c29f9
{
fvScalarMatrix
rhoEqn
(
fvm
::
ddt
(
rho
)
+
fvm
::
div
(
phi
,
rho
)
);
rhoEqn
.
solve
();
rhoPhi
=
rhoEqn
.
flux
();
Info
<<
"max-min rho: "
<<
max
(
rho
).
value
()
<<
" "
<<
min
(
rho
).
value
()
<<
endl
;
rho
==
max
(
rho
,
rhoMin
);
}
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/setDeltaT.H
0 → 100644
View file @
649c29f9
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Global
setDeltaT
Description
Reset the timestep to maintain a constant maximum courant Number.
Reduction of time-step is immediate but increase is damped to avoid
unstable oscillations.
\*---------------------------------------------------------------------------*/
if
(
adjustTimeStep
)
{
scalar
maxDeltaTFact
=
min
(
maxCo
/
(
CoNum
+
SMALL
),
maxAcousticCo
/
(
acousticCoNum
+
SMALL
));
scalar
deltaTFact
=
min
(
min
(
maxDeltaTFact
,
1
.
0
+
0
.
1
*
maxDeltaTFact
),
1
.
2
);
runTime
.
setDeltaT
(
min
(
deltaTFact
*
runTime
.
deltaTValue
(),
maxDeltaT
)
);
Info
<<
"deltaT = "
<<
runTime
.
deltaTValue
()
<<
endl
;
}
// ************************************************************************* //
OpenFOAM-v2112/applications/solvers/multiphase/cavitatingFoam/setInitialDeltaT.H
0 → 100644
View file @
649c29f9
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Global
setInitialDeltaT
Description
Set the initial timestep corresponding to the timestep adjustment
algorithm in setDeltaT
\*---------------------------------------------------------------------------*/
if
(
adjustTimeStep
)
{
if
(
CoNum
>
SMALL
)
{
scalar
maxDeltaTFact
=
min
(
maxCo
/
(
CoNum
+
SMALL
),
maxAcousticCo
/
(
acousticCoNum
+
SMALL
));
runTime
.
setDeltaT
(
min
(
maxDeltaTFact
*
runTime
.
deltaTValue
(),
maxDeltaT
)
);
}
}
// ************************************************************************* //
OpenFOAM-v2112/applications/solvers/multiphase/compressibleInterFoam/Allwclean
0 → 100644
View file @
649c29f9
#!/bin/sh
cd
"
${
0
%/*
}
"
||
exit
# Run from this directory
#------------------------------------------------------------------------------
wclean libso twoPhaseMixtureThermo
wclean libso surfaceTensionModels
wclean libso VoFphaseCompressibleTurbulenceModels
wclean
wclean compressibleInterDyMFoam
wclean compressibleInterFilmFoam
wclean compressibleInterIsoFoam
#------------------------------------------------------------------------------
OpenFOAM-v2112/applications/solvers/multiphase/compressibleInterFoam/Allwmake
0 → 100644
View file @
649c29f9
#!/bin/sh
cd
"
${
0
%/*
}
"
||
exit
# Run from this directory
.
${
WM_PROJECT_DIR
:?
}
/wmake/scripts/AllwmakeParseArguments
#------------------------------------------------------------------------------
wmake
$targetType
twoPhaseMixtureThermo
wmake
$targetType
surfaceTensionModels
wmake
$targetType
VoFphaseCompressibleTurbulenceModels
wmake
$targetType
wmake
$targetType
compressibleInterDyMFoam
wmake
$targetType
compressibleInterFilmFoam
wmake
$targetType
compressibleInterIsoFoam
wmake
$targetType
overCompressibleInterDyMFoam
#------------------------------------------------------------------------------
OpenFOAM-v2112/applications/solvers/multiphase/compressibleInterFoam/Make/files
0 → 100644
View file @
649c29f9
compressibleInterFoam.C
EXE = $(FOAM_APPBIN)/compressibleInterFoam
OpenFOAM-v2112/applications/solvers/multiphase/compressibleInterFoam/Make/options
0 → 100644
View file @
649c29f9
EXE_INC = \
-I../VoF \
-ItwoPhaseMixtureThermo \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
-IVoFphaseCompressibleTurbulenceModels/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-ltwoPhaseMixtureThermo \
-ltwoPhaseSurfaceTension \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lspecie \
-ltwoPhaseMixture \
-ltwoPhaseProperties \
-linterfaceProperties \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lVoFphaseCompressibleTurbulenceModels
OpenFOAM-v2112/applications/solvers/multiphase/compressibleInterFoam/TEqn.H
0 → 100644
View file @
649c29f9
{
fvScalarMatrix
TEqn
(
fvm
::
ddt
(
rho
,
T
)
+
fvm
::
div
(
rhoPhi
,
T
)
-
fvm
::
Sp
(
contErr
,
T
)
-
fvm
::
laplacian
(
turbulence
.
alphaEff
(),
T
)
+
(
divUp
()
// - contErr/rho*p
+
(
fvc
::
ddt
(
rho
,
K
)
+
fvc
::
div
(
rhoPhi
,
K
))()
-
contErr
*
K
)
*
(
alpha1
()
/
mixture
.
thermo1
().
Cv
()()
+
alpha2
()
/
mixture
.
thermo2
().
Cv
()()
)
==
fvOptions
(
rho
,
T
)
);
TEqn
.
relax
();
fvOptions
.
constrain
(
TEqn
);
TEqn
.
solve
();
fvOptions
.
correct
(
T
);
mixture
.
correctThermo
();
mixture
.
correct
();
}
OpenFOAM-v2112/applications/solvers/multiphase/compressibleInterFoam/UEqn.H
0 → 100644
View file @
649c29f9
fvVectorMatrix
UEqn
(
fvm
::
ddt
(
rho
,
U
)
+
fvm
::
div
(
rhoPhi
,
U
)
-
fvm
::
Sp
(
contErr
,
U
)
+
MRF
.
DDt
(
rho
,
U
)
+
turbulence
.
divDevRhoReff
(
U
)
==
fvOptions
(
rho
,
U
)
);
UEqn
.
relax
();
fvOptions
.
constrain
(
UEqn
);
if
(
pimple
.
momentumPredictor
())
{
solve
(
UEqn
==
fvc
::
reconstruct
(
(
mixture
.
surfaceTensionForce
()
-
ghf
*
fvc
::
snGrad
(
rho
)
-
fvc
::
snGrad
(
p_rgh
)
)
*
mesh
.
magSf
()
)
);
fvOptions
.
correct
(
U
);
K
=
0
.
5
*
magSqr
(
U
);
}
Prev
1
…
32
33
34
35
36
37
38
39
40
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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