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
ea17556c
Commit
ea17556c
authored
Mar 07, 2024
by
shunbo
Browse files
Initial commit
parents
Changes
798
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1010 additions
and
0 deletions
+1010
-0
applications/solvers/multiphase/cavitatingFoam/rhoEqn.H
applications/solvers/multiphase/cavitatingFoam/rhoEqn.H
+16
-0
applications/solvers/multiphase/cavitatingFoam/setDeltaT.H
applications/solvers/multiphase/cavitatingFoam/setDeltaT.H
+55
-0
applications/solvers/multiphase/cavitatingFoam/setInitialDeltaT.H
...ions/solvers/multiphase/cavitatingFoam/setInitialDeltaT.H
+53
-0
applications/solvers/multiphase/compressibleInterFoam/Allwclean
...ations/solvers/multiphase/compressibleInterFoam/Allwclean
+14
-0
applications/solvers/multiphase/compressibleInterFoam/Allwmake
...cations/solvers/multiphase/compressibleInterFoam/Allwmake
+16
-0
applications/solvers/multiphase/compressibleInterFoam/Make/files
...tions/solvers/multiphase/compressibleInterFoam/Make/files
+3
-0
applications/solvers/multiphase/compressibleInterFoam/Make/options
...ons/solvers/multiphase/compressibleInterFoam/Make/options
+29
-0
applications/solvers/multiphase/compressibleInterFoam/TEqn.H
applications/solvers/multiphase/compressibleInterFoam/TEqn.H
+28
-0
applications/solvers/multiphase/compressibleInterFoam/UEqn.H
applications/solvers/multiphase/compressibleInterFoam/UEqn.H
+34
-0
applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/Make/files
...InterFoam/VoFphaseCompressibleTurbulenceModels/Make/files
+4
-0
applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/Make/options
...terFoam/VoFphaseCompressibleTurbulenceModels/Make/options
+25
-0
applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/VoFphaseCompressibleTurbulenceModel.H
...bleTurbulenceModels/VoFphaseCompressibleTurbulenceModel.H
+54
-0
applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/VoFphaseCompressibleTurbulenceModelFwd.H
...TurbulenceModels/VoFphaseCompressibleTurbulenceModelFwd.H
+57
-0
applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/VoFphaseCompressibleTurbulenceModels.C
...leTurbulenceModels/VoFphaseCompressibleTurbulenceModels.C
+108
-0
applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/compressibleInterPhaseTransportModel.C
...leTurbulenceModels/compressibleInterPhaseTransportModel.C
+211
-0
applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/compressibleInterPhaseTransportModel.H
...leTurbulenceModels/compressibleInterPhaseTransportModel.H
+154
-0
applications/solvers/multiphase/compressibleInterFoam/alphaSuSp.H
...ions/solvers/multiphase/compressibleInterFoam/alphaSuSp.H
+43
-0
applications/solvers/multiphase/compressibleInterFoam/compressibleAlphaEqnSubCycle.H
...hase/compressibleInterFoam/compressibleAlphaEqnSubCycle.H
+69
-0
applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/files
...compressibleInterFoam/compressibleInterDyMFoam/Make/files
+3
-0
applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options
...mpressibleInterFoam/compressibleInterDyMFoam/Make/options
+34
-0
No files found.
Too many changes to show.
To preserve performance only
798 of 798+
files are displayed.
Plain diff
Email patch
applications/solvers/multiphase/cavitatingFoam/rhoEqn.H
0 → 100644
View file @
ea17556c
{
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
);
}
applications/solvers/multiphase/cavitatingFoam/setDeltaT.H
0 → 100644
View file @
ea17556c
/*---------------------------------------------------------------------------*\
========= |
\\ / 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
;
}
// ************************************************************************* //
applications/solvers/multiphase/cavitatingFoam/setInitialDeltaT.H
0 → 100644
View file @
ea17556c
/*---------------------------------------------------------------------------*\
========= |
\\ / 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
)
);
}
}
// ************************************************************************* //
applications/solvers/multiphase/compressibleInterFoam/Allwclean
0 → 100644
View file @
ea17556c
#!/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
#------------------------------------------------------------------------------
applications/solvers/multiphase/compressibleInterFoam/Allwmake
0 → 100644
View file @
ea17556c
#!/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
#------------------------------------------------------------------------------
applications/solvers/multiphase/compressibleInterFoam/Make/files
0 → 100644
View file @
ea17556c
compressibleInterFoam.C
EXE = $(FOAM_APPBIN)/compressibleInterFoam
applications/solvers/multiphase/compressibleInterFoam/Make/options
0 → 100644
View file @
ea17556c
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
applications/solvers/multiphase/compressibleInterFoam/TEqn.H
0 → 100644
View file @
ea17556c
{
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
();
}
applications/solvers/multiphase/compressibleInterFoam/UEqn.H
0 → 100644
View file @
ea17556c
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
);
}
applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/Make/files
0 → 100644
View file @
ea17556c
VoFphaseCompressibleTurbulenceModels.C
compressibleInterPhaseTransportModel.C
LIB = $(FOAM_LIBBIN)/libVoFphaseCompressibleTurbulenceModels
applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/Make/options
0 → 100644
View file @
ea17556c
EXE_INC = \
-I../twoPhaseMixtureThermo \
-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/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = \
-ltwoPhaseMixtureThermo \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lspecie \
-ltwoPhaseMixture \
-ltwoPhaseProperties \
-linterfaceProperties \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lincompressibleTransportModels \
-lfiniteVolume \
-lmeshTools
applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/VoFphaseCompressibleTurbulenceModel.H
0 → 100644
View file @
ea17556c
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017 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/>.
Typedef
Foam::VoFphaseCompressibleTurbulenceModel
Description
Typedef for VoFphaseCompressibleTurbulenceModel
\*---------------------------------------------------------------------------*/
#ifndef VoFphaseCompressibleTurbulenceModel_H
#define VoFphaseCompressibleTurbulenceModel_H
#include "VoFphaseCompressibleTurbulenceModelFwd.H"
#include "PhaseCompressibleTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "fluidThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
typedef
ThermalDiffusivity
<
PhaseCompressibleTurbulenceModel
<
fluidThermo
>>
VoFphaseCompressibleTurbulenceModel
;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/VoFphaseCompressibleTurbulenceModelFwd.H
0 → 100644
View file @
ea17556c
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017 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/>.
Typedef
Foam::VoFphaseCompressibleTurbulenceModel
Description
Forward declaration of typedef for VoFphaseCompressibleTurbulenceModel
\*---------------------------------------------------------------------------*/
#ifndef VoFphaseCompressibleTurbulenceModelFwd_H
#define VoFphaseCompressibleTurbulenceModelFwd_H
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
class
fluidThermo
;
template
<
class
TransportModel
>
class
PhaseCompressibleTurbulenceModel
;
template
<
class
BasicTurbulenceModel
>
class
ThermalDiffusivity
;
typedef
ThermalDiffusivity
<
PhaseCompressibleTurbulenceModel
<
fluidThermo
>>
VoFphaseCompressibleTurbulenceModel
;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/VoFphaseCompressibleTurbulenceModels.C
0 → 100644
View file @
ea17556c
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017 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/>.
\*---------------------------------------------------------------------------*/
#include "PhaseCompressibleTurbulenceModel.H"
#include "fluidThermo.H"
#include "addToRunTimeSelectionTable.H"
#include "makeTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "EddyDiffusivity.H"
#include "laminarModel.H"
#include "RASModel.H"
#include "LESModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defineTurbulenceModelTypes
(
volScalarField
,
volScalarField
,
compressibleTurbulenceModel
,
PhaseCompressibleTurbulenceModel
,
ThermalDiffusivity
,
fluidThermo
);
makeBaseTurbulenceModel
(
volScalarField
,
volScalarField
,
compressibleTurbulenceModel
,
PhaseCompressibleTurbulenceModel
,
ThermalDiffusivity
,
fluidThermo
);
#define makeLaminarModel(Type) \
makeTemplatedLaminarModel \
(fluidThermoPhaseCompressibleTurbulenceModel, laminar, Type)
#define makeRASModel(Type) \
makeTemplatedTurbulenceModel \
(fluidThermoPhaseCompressibleTurbulenceModel, RAS, Type)
#define makeLESModel(Type) \
makeTemplatedTurbulenceModel \
(fluidThermoPhaseCompressibleTurbulenceModel, LES, Type)
// -------------------------------------------------------------------------- //
// Laminar models
// -------------------------------------------------------------------------- //
#include "Stokes.H"
makeLaminarModel
(
Stokes
);
#include "Maxwell.H"
makeLaminarModel
(
Maxwell
);
// -------------------------------------------------------------------------- //
// RAS models
// -------------------------------------------------------------------------- //
#include "kEpsilon.H"
makeRASModel
(
kEpsilon
);
#include "kOmegaSST.H"
makeRASModel
(
kOmegaSST
);
// -------------------------------------------------------------------------- //
// LES models
// -------------------------------------------------------------------------- //
#include "Smagorinsky.H"
makeLESModel
(
Smagorinsky
);
#include "kEqn.H"
makeLESModel
(
kEqn
);
// ************************************************************************* //
applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/compressibleInterPhaseTransportModel.C
0 → 100644
View file @
ea17556c
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017-2018 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
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/>.
\*---------------------------------------------------------------------------*/
#include "compressibleInterPhaseTransportModel.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam
::
compressibleInterPhaseTransportModel
::
compressibleInterPhaseTransportModel
(
const
volScalarField
&
rho
,
const
volVectorField
&
U
,
const
surfaceScalarField
&
phi
,
const
surfaceScalarField
&
rhoPhi
,
const
surfaceScalarField
&
alphaPhi10
,
const
twoPhaseMixtureThermo
&
mixture
)
:
twoPhaseTransport_
(
false
),
mixture_
(
mixture
),
phi_
(
phi
),
alphaPhi10_
(
alphaPhi10
)
{
{
IOdictionary
turbulenceProperties
(
IOobject
(
turbulenceModel
::
propertiesName
,
U
.
time
().
constant
(),
U
.
db
(),
IOobject
::
MUST_READ
,
IOobject
::
NO_WRITE
)
);
const
word
simulationType
(
turbulenceProperties
.
get
<
word
>
(
"simulationType"
)
);
if
(
simulationType
==
"twoPhaseTransport"
)
{
twoPhaseTransport_
=
true
;
}
}
if
(
twoPhaseTransport_
)
{
const
volScalarField
&
alpha1
(
mixture_
.
alpha1
());
const
volScalarField
&
alpha2
(
mixture_
.
alpha2
());
const
volScalarField
&
rho1
=
mixture_
.
thermo1
().
rho
();
const
volScalarField
&
rho2
=
mixture_
.
thermo2
().
rho
();
alphaRhoPhi1_
=
(
new
surfaceScalarField
(
IOobject
::
groupName
(
"alphaRhoPhi"
,
alpha1
.
group
()),
fvc
::
interpolate
(
rho1
)
*
alphaPhi10_
)
);
alphaRhoPhi2_
=
(
new
surfaceScalarField
(
IOobject
::
groupName
(
"alphaRhoPhi"
,
alpha2
.
group
()),
fvc
::
interpolate
(
rho2
)
*
(
phi_
-
alphaPhi10_
)
)
);
turbulence1_
=
(
ThermalDiffusivity
<
PhaseCompressibleTurbulenceModel
<
fluidThermo
>>
::
New
(
alpha1
,
rho1
,
U
,
alphaRhoPhi1_
(),
phi
,
mixture
.
thermo1
()
)
);
turbulence2_
=
(
ThermalDiffusivity
<
PhaseCompressibleTurbulenceModel
<
fluidThermo
>>
::
New
(
alpha2
,
rho2
,
U
,
alphaRhoPhi2_
(),
phi
,
mixture
.
thermo2
()
)
);
}
else
{
turbulence_
=
compressible
::
turbulenceModel
::
New
(
rho
,
U
,
rhoPhi
,
mixture
);
turbulence_
->
validate
();
}
}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam
::
tmp
<
Foam
::
volScalarField
>
Foam
::
compressibleInterPhaseTransportModel
::
alphaEff
()
const
{
if
(
twoPhaseTransport_
)
{
return
mixture_
.
alpha1
()
*
mixture_
.
thermo1
().
alphaEff
(
turbulence1_
->
alphat
()
)
+
mixture_
.
alpha2
()
*
mixture_
.
thermo2
().
alphaEff
(
turbulence2_
->
alphat
()
);
}
else
{
return
mixture_
.
alphaEff
(
turbulence_
->
alphat
());
}
}
Foam
::
tmp
<
Foam
::
fvVectorMatrix
>
Foam
::
compressibleInterPhaseTransportModel
::
divDevRhoReff
(
volVectorField
&
U
)
const
{
if
(
twoPhaseTransport_
)
{
return
turbulence1_
->
divDevRhoReff
(
U
)
+
turbulence2_
->
divDevRhoReff
(
U
);
}
else
{
return
turbulence_
->
divDevRhoReff
(
U
);
}
}
void
Foam
::
compressibleInterPhaseTransportModel
::
correctPhasePhi
()
{
if
(
twoPhaseTransport_
)
{
const
volScalarField
&
rho1
=
mixture_
.
thermo1
().
rho
();
const
volScalarField
&
rho2
=
mixture_
.
thermo2
().
rho
();
alphaRhoPhi1_
.
ref
()
=
fvc
::
interpolate
(
rho1
)
*
alphaPhi10_
;
alphaRhoPhi2_
.
ref
()
=
fvc
::
interpolate
(
rho2
)
*
(
phi_
-
alphaPhi10_
);
}
}
void
Foam
::
compressibleInterPhaseTransportModel
::
correct
()
{
if
(
twoPhaseTransport_
)
{
turbulence1_
->
correct
();
turbulence2_
->
correct
();
}
else
{
turbulence_
->
correct
();
}
}
// ************************************************************************* //
applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/compressibleInterPhaseTransportModel.H
0 → 100644
View file @
ea17556c
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017-2018 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/>.
Class
Foam::compressibleInterPhaseTransportModel
Description
Transport model selection class for the compressibleInterFoam family of
solvers.
By default the standard mixture transport modelling approach is used in
which a single momentum stress model (laminar, non-Newtonian, LES or RAS) is
constructed for the mixture. However if the \c simulationType in
constant/turbulenceProperties is set to \c twoPhaseTransport the alternative
Euler-Euler two-phase transport modelling approach is used in which separate
stress models (laminar, non-Newtonian, LES or RAS) are instantiated for each
of the two phases allowing for different modeling for the phases.
SourceFiles
compressibleInterPhaseTransportModel.C
\*---------------------------------------------------------------------------*/
#ifndef compressibleInterPhaseTransportModel_H
#define compressibleInterPhaseTransportModel_H
#include "twoPhaseMixture.H"
#include "twoPhaseMixtureThermo.H"
#include "turbulentFluidThermoModel.H"
#include "VoFphaseCompressibleTurbulenceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
/*---------------------------------------------------------------------------*\
Class compressibleInterPhaseTransportModel Declaration
\*---------------------------------------------------------------------------*/
class
compressibleInterPhaseTransportModel
{
// Private data
//- Switch to select two-phase or mixture transport modelling
Switch
twoPhaseTransport_
;
//- Two-phase mixture
const
twoPhaseMixtureThermo
&
mixture_
;
//- Mixture volumetric flux
const
surfaceScalarField
&
phi_
;
//- Phase volumetric flux
const
surfaceScalarField
&
alphaPhi10_
;
//- Phase-1 mass-flux (constructed for two-phase transport)
tmp
<
surfaceScalarField
>
alphaRhoPhi1_
;
//- Phase-2 mass-flux (constructed for two-phase transport)
tmp
<
surfaceScalarField
>
alphaRhoPhi2_
;
//- Mixture transport model (constructed for mixture transport)
autoPtr
<
compressible
::
turbulenceModel
>
turbulence_
;
//- Phase-1 transport model (constructed for two-phase transport)
autoPtr
<
ThermalDiffusivity
<
PhaseCompressibleTurbulenceModel
<
fluidThermo
>>
>
turbulence1_
;
//- Phase-2 transport model (constructed for two-phase transport)
autoPtr
<
ThermalDiffusivity
<
PhaseCompressibleTurbulenceModel
<
fluidThermo
>>
>
turbulence2_
;
// Private Member Functions
//- No copy construct
compressibleInterPhaseTransportModel
(
const
compressibleInterPhaseTransportModel
&
)
=
delete
;
//- No copy assignment
void
operator
=
(
const
compressibleInterPhaseTransportModel
&
)
=
delete
;
public:
// Constructors
//- Construct from components
compressibleInterPhaseTransportModel
(
const
volScalarField
&
rho
,
const
volVectorField
&
U
,
const
surfaceScalarField
&
phi
,
const
surfaceScalarField
&
rhoPhi
,
const
surfaceScalarField
&
alphaPhi10
,
const
twoPhaseMixtureThermo
&
mixture
);
// Member Functions
//- Return the effective temperature transport coefficient
tmp
<
volScalarField
>
alphaEff
()
const
;
//- Return the effective momentum stress divergence
tmp
<
fvVectorMatrix
>
divDevRhoReff
(
volVectorField
&
U
)
const
;
//- Correct the phase mass-fluxes
// (required for the two-phase transport option)
void
correctPhasePhi
();
//- Correct the phase or mixture transport models
void
correct
();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
applications/solvers/multiphase/compressibleInterFoam/alphaSuSp.H
0 → 100644
View file @
ea17556c
volScalarField
::
Internal
Sp
(
IOobject
(
"Sp"
,
runTime
.
timeName
(),
mesh
),
mesh
,
dimensionedScalar
(
dgdt
.
dimensions
(),
Zero
)
);
volScalarField
::
Internal
Su
(
IOobject
(
"Su"
,
runTime
.
timeName
(),
mesh
),
mesh
,
dimensionedScalar
(
dgdt
.
dimensions
(),
Zero
)
);
forAll
(
dgdt
,
celli
)
{
if
(
dgdt
[
celli
]
>
0
.
0
)
{
Sp
[
celli
]
-=
dgdt
[
celli
]
/
max
(
1
.
0
-
alpha1
[
celli
],
1e-4
);
Su
[
celli
]
+=
dgdt
[
celli
]
/
max
(
1
.
0
-
alpha1
[
celli
],
1e-4
);
}
else
if
(
dgdt
[
celli
]
<
0
.
0
)
{
Sp
[
celli
]
+=
dgdt
[
celli
]
/
max
(
alpha1
[
celli
],
1e-4
);
}
}
volScalarField
::
Internal
divU
(
mesh
.
moving
()
?
fvc
::
div
(
phiCN
()
+
mesh
.
phi
())
:
fvc
::
div
(
phiCN
())
);
applications/solvers/multiphase/compressibleInterFoam/compressibleAlphaEqnSubCycle.H
0 → 100644
View file @
ea17556c
tmp
<
surfaceScalarField
>
talphaPhi1
(
alphaPhi10
);
if
(
nAlphaSubCycles
>
1
)
{
dimensionedScalar
totalDeltaT
=
runTime
.
deltaT
();
talphaPhi1
=
new
surfaceScalarField
(
IOobject
(
"alphaPhi1"
,
runTime
.
timeName
(),
mesh
),
mesh
,
dimensionedScalar
(
alphaPhi10
.
dimensions
(),
Zero
)
);
surfaceScalarField
rhoPhiSum
(
IOobject
(
"rhoPhiSum"
,
runTime
.
timeName
(),
mesh
),
mesh
,
dimensionedScalar
(
rhoPhi
.
dimensions
(),
Zero
)
);
tmp
<
volScalarField
>
trSubDeltaT
;
if
(
LTS
)
{
trSubDeltaT
=
fv
::
localEulerDdt
::
localRSubDeltaT
(
mesh
,
nAlphaSubCycles
);
}
for
(
subCycle
<
volScalarField
>
alphaSubCycle
(
alpha1
,
nAlphaSubCycles
);
!
(
++
alphaSubCycle
).
end
();
)
{
#include "alphaEqn.H"
talphaPhi1
.
ref
()
+=
(
runTime
.
deltaT
()
/
totalDeltaT
)
*
alphaPhi10
;
rhoPhiSum
+=
(
runTime
.
deltaT
()
/
totalDeltaT
)
*
rhoPhi
;
}
rhoPhi
=
rhoPhiSum
;
}
else
{
#include "alphaEqn.H"
}
rho
==
alpha1
*
rho1
+
alpha2
*
rho2
;
const
surfaceScalarField
&
alphaPhi1
=
talphaPhi1
();
surfaceScalarField
alphaPhi2
(
"alphaPhi2"
,
phi
-
alphaPhi1
);
volScalarField
::
Internal
contErr
(
(
fvc
::
ddt
(
rho
)
+
fvc
::
div
(
rhoPhi
)
-
(
fvOptions
(
alpha1
,
mixture
.
thermo1
().
rho
())
&
rho1
)
-
(
fvOptions
(
alpha2
,
mixture
.
thermo2
().
rho
())
&
rho2
)
)()
);
applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/files
0 → 100644
View file @
ea17556c
compressibleInterDyMFoam.C
EXE = $(FOAM_APPBIN)/compressibleInterDyMFoam
applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options
0 → 100644
View file @
ea17556c
EXE_INC = \
-I.. \
-I../../VoF \
-I../twoPhaseMixtureThermo \
-I../VoFphaseCompressibleTurbulenceModels/lnInclude \
-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 \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-ltwoPhaseMixtureThermo \
-ltwoPhaseSurfaceTension \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lspecie \
-ltwoPhaseMixture \
-ltwoPhaseProperties \
-linterfaceProperties \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lVoFphaseCompressibleTurbulenceModels \
-ldynamicMesh \
-ldynamicFvMesh
Prev
1
…
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