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
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
640 additions
and
0 deletions
+640
-0
OpenFOAM-v2112/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Make/options
...s/multiphase/compressibleMultiphaseInterFoam/Make/options
+24
-0
OpenFOAM-v2112/applications/solvers/multiphase/compressibleMultiphaseInterFoam/TEqn.H
...solvers/multiphase/compressibleMultiphaseInterFoam/TEqn.H
+17
-0
OpenFOAM-v2112/applications/solvers/multiphase/compressibleMultiphaseInterFoam/UEqn.H
...solvers/multiphase/compressibleMultiphaseInterFoam/UEqn.H
+27
-0
OpenFOAM-v2112/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseInterFoam.C
...ibleMultiphaseInterFoam/compressibleMultiphaseInterFoam.C
+123
-0
OpenFOAM-v2112/applications/solvers/multiphase/compressibleMultiphaseInterFoam/createFields.H
...multiphase/compressibleMultiphaseInterFoam/createFields.H
+68
-0
OpenFOAM-v2112/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/Make/files
...bleMultiphaseInterFoam/multiphaseMixtureThermo/Make/files
+5
-0
OpenFOAM-v2112/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/Make/options
...eMultiphaseInterFoam/multiphaseMixtureThermo/Make/options
+12
-0
OpenFOAM-v2112/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
...o/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
+147
-0
OpenFOAM-v2112/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
...o/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
+217
-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/compressibleMultiphaseInterFoam/Make/options
0 → 100644
View file @
649c29f9
EXE_INC = \
-I../VoF \
-I../interFoam \
-ImultiphaseMixtureThermo/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
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-lmultiphaseMixtureThermo \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lspecie \
-linterfaceProperties \
-lturbulenceModels \
-lcompressibleTurbulenceModels
OpenFOAM-v2112/applications/solvers/multiphase/compressibleMultiphaseInterFoam/TEqn.H
0 → 100644
View file @
649c29f9
{
fvScalarMatrix
TEqn
(
fvm
::
ddt
(
rho
,
T
)
+
fvm
::
div
(
mixture
.
rhoPhi
(),
T
)
-
fvm
::
laplacian
(
mixture
.
alphaEff
(
turbulence
->
mut
()),
T
)
+
(
fvc
::
div
(
fvc
::
absolute
(
phi
,
U
),
p
)
+
fvc
::
ddt
(
rho
,
K
)
+
fvc
::
div
(
mixture
.
rhoPhi
(),
K
)
)
*
mixture
.
rCv
()
);
TEqn
.
relax
();
TEqn
.
solve
();
mixture
.
correct
();
}
OpenFOAM-v2112/applications/solvers/multiphase/compressibleMultiphaseInterFoam/UEqn.H
0 → 100644
View file @
649c29f9
fvVectorMatrix
UEqn
(
fvm
::
ddt
(
rho
,
U
)
+
fvm
::
div
(
mixture
.
rhoPhi
(),
U
)
+
turbulence
->
divDevRhoReff
(
U
)
);
UEqn
.
relax
();
if
(
pimple
.
momentumPredictor
())
{
solve
(
UEqn
==
fvc
::
reconstruct
(
(
mixture
.
surfaceTensionForce
()
-
ghf
*
fvc
::
snGrad
(
rho
)
-
fvc
::
snGrad
(
p_rgh
)
)
*
mesh
.
magSf
()
)
);
K
=
0
.
5
*
magSqr
(
U
);
}
OpenFOAM-v2112/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseInterFoam.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) 2013-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
compressibleMultiphaseInterFoam
Group
grpMultiphaseSolvers
Description
Solver for N compressible, non-isothermal immiscible fluids using a VOF
(volume of fluid) phase-fraction based interface capturing approach.
The momentum and other fluid properties are of the "mixture" and a single
momentum equation is solved.
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "multiphaseMixtureThermo.H"
#include "turbulentFluidThermoModel.H"
#include "pimpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int
main
(
int
argc
,
char
*
argv
[])
{
argList
::
addNote
(
"Solver for N compressible, non-isothermal immiscible fluids"
" using VOF phase-fraction based interface capturing."
);
#include "postProcess.H"
#include "addCheckCaseOptions.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
#include "createTimeControls.H"
#include "createFields.H"
#include "CourantNo.H"
#include "setInitialDeltaT.H"
volScalarField
&
p
=
mixture
.
p
();
volScalarField
&
T
=
mixture
.
T
();
turbulence
->
validate
();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info
<<
"
\n
Starting time loop
\n
"
<<
endl
;
while
(
runTime
.
run
())
{
#include "readTimeControls.H"
#include "CourantNo.H"
#include "alphaCourantNo.H"
#include "setDeltaT.H"
++
runTime
;
Info
<<
"Time = "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
// --- Pressure-velocity PIMPLE corrector loop
while
(
pimple
.
loop
())
{
mixture
.
solve
();
solve
(
fvm
::
ddt
(
rho
)
+
fvc
::
div
(
mixture
.
rhoPhi
()));
#include "UEqn.H"
#include "TEqn.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/compressibleMultiphaseInterFoam/createFields.H
0 → 100644
View file @
649c29f9
Info
<<
"Reading field p_rgh
\n
"
<<
endl
;
volScalarField
p_rgh
(
IOobject
(
"p_rgh"
,
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"
Info
<<
"Constructing multiphaseMixtureThermo
\n
"
<<
endl
;
multiphaseMixtureThermo
mixture
(
U
,
phi
);
volScalarField
rho
(
IOobject
(
"rho"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
READ_IF_PRESENT
),
mixture
.
rho
()
);
dimensionedScalar
pMin
(
"pMin"
,
dimPressure
,
mixture
);
mesh
.
setFluxRequired
(
p_rgh
.
name
());
#include "readGravitationalAcceleration.H"
#include "readhRef.H"
#include "gh.H"
// Construct compressible turbulence model
autoPtr
<
compressible
::
turbulenceModel
>
turbulence
(
compressible
::
turbulenceModel
::
New
(
rho
,
U
,
mixture
.
rhoPhi
(),
mixture
)
);
#include "createK.H"
OpenFOAM-v2112/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/Make/files
0 → 100644
View file @
649c29f9
phaseModel/phaseModel.C
alphaContactAngle/alphaContactAngleFvPatchScalarField.C
multiphaseMixtureThermo.C
LIB = $(FOAM_LIBBIN)/libmultiphaseMixtureThermo
OpenFOAM-v2112/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/Make/options
0 → 100644
View file @
649c29f9
EXE_INC = \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lspecie \
-lfiniteVolume \
-lmeshTools
OpenFOAM-v2112/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/alphaContactAngle/alphaContactAngleFvPatchScalarField.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) 2013 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 "alphaContactAngleFvPatchScalarField.H"
#include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
alphaContactAngleFvPatchScalarField
::
interfaceThetaProps
::
interfaceThetaProps
(
Istream
&
is
)
:
theta0_
(
readScalar
(
is
)),
uTheta_
(
readScalar
(
is
)),
thetaA_
(
readScalar
(
is
)),
thetaR_
(
readScalar
(
is
))
{}
Istream
&
operator
>>
(
Istream
&
is
,
alphaContactAngleFvPatchScalarField
::
interfaceThetaProps
&
tp
)
{
is
>>
tp
.
theta0_
>>
tp
.
uTheta_
>>
tp
.
thetaA_
>>
tp
.
thetaR_
;
return
is
;
}
Ostream
&
operator
<<
(
Ostream
&
os
,
const
alphaContactAngleFvPatchScalarField
::
interfaceThetaProps
&
tp
)
{
os
<<
tp
.
theta0_
<<
token
::
SPACE
<<
tp
.
uTheta_
<<
token
::
SPACE
<<
tp
.
thetaA_
<<
token
::
SPACE
<<
tp
.
thetaR_
;
return
os
;
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
alphaContactAngleFvPatchScalarField
::
alphaContactAngleFvPatchScalarField
(
const
fvPatch
&
p
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
)
:
zeroGradientFvPatchScalarField
(
p
,
iF
)
{}
alphaContactAngleFvPatchScalarField
::
alphaContactAngleFvPatchScalarField
(
const
alphaContactAngleFvPatchScalarField
&
gcpsf
,
const
fvPatch
&
p
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
,
const
fvPatchFieldMapper
&
mapper
)
:
zeroGradientFvPatchScalarField
(
gcpsf
,
p
,
iF
,
mapper
),
thetaProps_
(
gcpsf
.
thetaProps_
)
{}
alphaContactAngleFvPatchScalarField
::
alphaContactAngleFvPatchScalarField
(
const
fvPatch
&
p
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
,
const
dictionary
&
dict
)
:
zeroGradientFvPatchScalarField
(
p
,
iF
),
thetaProps_
(
dict
.
lookup
(
"thetaProperties"
))
{
evaluate
();
}
alphaContactAngleFvPatchScalarField
::
alphaContactAngleFvPatchScalarField
(
const
alphaContactAngleFvPatchScalarField
&
gcpsf
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
)
:
zeroGradientFvPatchScalarField
(
gcpsf
,
iF
),
thetaProps_
(
gcpsf
.
thetaProps_
)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void
alphaContactAngleFvPatchScalarField
::
write
(
Ostream
&
os
)
const
{
fvPatchScalarField
::
write
(
os
);
os
.
writeEntry
(
"thetaProperties"
,
thetaProps_
);
writeEntry
(
"value"
,
os
);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeField
(
fvPatchScalarField
,
alphaContactAngleFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// ************************************************************************* //
OpenFOAM-v2112/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/alphaContactAngle/alphaContactAngleFvPatchScalarField.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) 2013 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::alphaContactAngleFvPatchScalarField
Description
Contact-angle boundary condition for multi-phase interface-capturing
simulations. Used in conjunction with multiphaseMixture.
SourceFiles
alphaContactAngleFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef alphaContactAngleFvPatchScalarField_H
#define alphaContactAngleFvPatchScalarField_H
#include "zeroGradientFvPatchFields.H"
#include "multiphaseMixtureThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
/*---------------------------------------------------------------------------*\
Class alphaContactAngleFvPatch Declaration
\*---------------------------------------------------------------------------*/
class
alphaContactAngleFvPatchScalarField
:
public
zeroGradientFvPatchScalarField
{
public:
class
interfaceThetaProps
{
//- Equilibrium contact angle
scalar
theta0_
;
//- Dynamic contact angle velocity scale
scalar
uTheta_
;
//- Limiting advancing contact angle
scalar
thetaA_
;
//- Limiting receding contact angle
scalar
thetaR_
;
public:
// Constructors
interfaceThetaProps
()
{}
interfaceThetaProps
(
Istream
&
);
// Member functions
//- Return the equilibrium contact angle theta0
scalar
theta0
(
bool
matched
=
true
)
const
{
if
(
matched
)
return
theta0_
;
else
return
180.0
-
theta0_
;
}
//- Return the dynamic contact angle velocity scale
scalar
uTheta
()
const
{
return
uTheta_
;
}
//- Return the limiting advancing contact angle
scalar
thetaA
(
bool
matched
=
true
)
const
{
if
(
matched
)
return
thetaA_
;
else
return
180.0
-
thetaA_
;
}
//- Return the limiting receding contact angle
scalar
thetaR
(
bool
matched
=
true
)
const
{
if
(
matched
)
return
thetaR_
;
else
return
180.0
-
thetaR_
;
}
// IO functions
friend
Istream
&
operator
>>
(
Istream
&
,
interfaceThetaProps
&
);
friend
Ostream
&
operator
<<
(
Ostream
&
,
const
interfaceThetaProps
&
);
};
typedef
HashTable
<
interfaceThetaProps
,
multiphaseMixtureThermo
::
interfacePair
,
multiphaseMixtureThermo
::
interfacePair
::
hash
>
thetaPropsTable
;
private:
// Private data
thetaPropsTable
thetaProps_
;
public:
//- Runtime type information
TypeName
(
"alphaContactAngle"
);
// Constructors
//- Construct from patch and internal field
alphaContactAngleFvPatchScalarField
(
const
fvPatch
&
,
const
DimensionedField
<
scalar
,
volMesh
>&
);
//- Construct from patch, internal field and dictionary
alphaContactAngleFvPatchScalarField
(
const
fvPatch
&
,
const
DimensionedField
<
scalar
,
volMesh
>&
,
const
dictionary
&
);
//- Construct by mapping given alphaContactAngleFvPatchScalarField
// onto a new patch
alphaContactAngleFvPatchScalarField
(
const
alphaContactAngleFvPatchScalarField
&
,
const
fvPatch
&
,
const
DimensionedField
<
scalar
,
volMesh
>&
,
const
fvPatchFieldMapper
&
);
//- Construct and return a clone
virtual
tmp
<
fvPatchScalarField
>
clone
()
const
{
return
tmp
<
fvPatchScalarField
>
(
new
alphaContactAngleFvPatchScalarField
(
*
this
)
);
}
//- Construct as copy setting internal field reference
alphaContactAngleFvPatchScalarField
(
const
alphaContactAngleFvPatchScalarField
&
,
const
DimensionedField
<
scalar
,
volMesh
>&
);
//- Construct and return a clone setting internal field reference
virtual
tmp
<
fvPatchScalarField
>
clone
(
const
DimensionedField
<
scalar
,
volMesh
>&
iF
)
const
{
return
tmp
<
fvPatchScalarField
>
(
new
alphaContactAngleFvPatchScalarField
(
*
this
,
iF
)
);
}
// Member functions
//- Return the contact angle properties
const
thetaPropsTable
&
thetaProps
()
const
{
return
thetaProps_
;
}
//- Write
virtual
void
write
(
Ostream
&
)
const
;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
Prev
1
…
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