mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
compressibleInterFoam tutorials updated for new thermo
This commit is contained in:
@ -35,6 +35,7 @@ namespace Foam
|
||||
defineTypeNameAndDebug(twoPhaseMixtureThermo, 0);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::twoPhaseMixtureThermo::twoPhaseMixtureThermo
|
||||
@ -44,9 +45,22 @@ Foam::twoPhaseMixtureThermo::twoPhaseMixtureThermo
|
||||
:
|
||||
psiThermo(mesh, word::null),
|
||||
twoPhaseMixture(mesh, *this),
|
||||
thermo1_(rhoThermo::New(mesh, phase1Name())),
|
||||
thermo2_(rhoThermo::New(mesh, phase2Name()))
|
||||
thermo1_(NULL),
|
||||
thermo2_(NULL)
|
||||
{
|
||||
{
|
||||
volScalarField T1("T" + phase1Name(), T_);
|
||||
T1.write();
|
||||
}
|
||||
|
||||
{
|
||||
volScalarField T2("T" + phase2Name(), T_);
|
||||
T2.write();
|
||||
}
|
||||
|
||||
thermo1_ = rhoThermo::New(mesh, phase1Name());
|
||||
thermo2_ = rhoThermo::New(mesh, phase2Name());
|
||||
|
||||
thermo1_->validate(phase1Name(), "e");
|
||||
thermo2_->validate(phase2Name(), "e");
|
||||
|
||||
|
||||
@ -0,0 +1,35 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
walls
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1e5;
|
||||
}
|
||||
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -3,4 +3,4 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
foamCleanTutorials cases
|
||||
rm -rf processor*
|
||||
rm -rf 0/p_rgh.gz 0/alphawater.gz 0/T.gz
|
||||
rm -rf 0/p_rgh.gz 0/p.gz 0/alphawater.gz 0/T*.gz
|
||||
@ -10,6 +10,7 @@ application=`getApplication`
|
||||
runApplication blockMesh
|
||||
cp 0/alphawater.org 0/alphawater
|
||||
cp 0/p_rgh.org 0/p_rgh
|
||||
cp 0/p.org 0/p
|
||||
cp 0/T.org 0/T
|
||||
runApplication setFields
|
||||
runApplication $application
|
||||
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType
|
||||
{
|
||||
type heRhoThermo;
|
||||
mixture pureMixture;
|
||||
transport const;
|
||||
thermo hConst;
|
||||
equationOfState perfectGas;
|
||||
specie specie;
|
||||
energy sensibleInternalEnergy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
specie
|
||||
{
|
||||
nMoles 1;
|
||||
molWeight 28.9;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cp 1007;
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
{
|
||||
mu 1.84e-05;
|
||||
Pr 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,54 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType
|
||||
{
|
||||
type heRhoThermo;
|
||||
mixture pureMixture;
|
||||
transport const;
|
||||
thermo hConst;
|
||||
equationOfState perfectFluid;
|
||||
specie specie;
|
||||
energy sensibleInternalEnergy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
specie
|
||||
{
|
||||
nMoles 1;
|
||||
molWeight 18.0;
|
||||
}
|
||||
equationOfState
|
||||
{
|
||||
R 3000;
|
||||
rho0 1027;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cp 4195;
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
{
|
||||
mu 3.645e-4;
|
||||
Pr 2.289;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -19,6 +19,7 @@ defaultFieldValues
|
||||
(
|
||||
volScalarFieldValue alphawater 1
|
||||
volScalarFieldValue p_rgh 1e5
|
||||
volScalarFieldValue p 1e5
|
||||
volScalarFieldValue T 300
|
||||
);
|
||||
|
||||
@ -32,6 +33,7 @@ regions
|
||||
(
|
||||
volScalarFieldValue alphawater 0
|
||||
volScalarFieldValue p_rgh 1e6
|
||||
volScalarFieldValue p 1e6
|
||||
volScalarFieldValue T 578
|
||||
);
|
||||
}
|
||||
@ -24,6 +24,11 @@ boundaryField
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -25,6 +25,10 @@ boundaryField
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -24,6 +24,11 @@ boundaryField
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,35 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
walls
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1e5;
|
||||
}
|
||||
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -25,6 +25,11 @@ boundaryField
|
||||
type fixedFluxPressure;
|
||||
value uniform 1e5;
|
||||
}
|
||||
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -3,6 +3,6 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
foamCleanTutorials cases
|
||||
rm -rf processor*
|
||||
rm -rf 0/p_rgh 0/p_rgh.gz 0/alphawater 0/alphawater.gz 0/T.gz
|
||||
rm -rf 0/p_rgh.gz 0/p.gz 0/alphawater.gz 0/T.gz
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -10,6 +10,7 @@ application=`getApplication`
|
||||
runApplication blockMesh
|
||||
cp 0/alphawater.org 0/alphawater
|
||||
cp 0/p_rgh.org 0/p_rgh
|
||||
cp 0/p.org 0/p
|
||||
cp 0/T.org 0/T
|
||||
runApplication setFields
|
||||
runApplication decomposePar
|
||||
@ -9,20 +9,16 @@ FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
1
|
||||
(
|
||||
walls
|
||||
{
|
||||
type wall;
|
||||
nFaces 64000;
|
||||
startFace 3040000;
|
||||
}
|
||||
)
|
||||
phases (water air);
|
||||
|
||||
pMin pMin [ 1 -1 -2 0 0 0 0 ] 10000;
|
||||
|
||||
sigma sigma [ 1 0 -2 0 0 0 0 ] 0.07;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType
|
||||
{
|
||||
type heRhoThermo;
|
||||
mixture pureMixture;
|
||||
transport const;
|
||||
thermo hConst;
|
||||
equationOfState perfectGas;
|
||||
specie specie;
|
||||
energy sensibleInternalEnergy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
specie
|
||||
{
|
||||
nMoles 1;
|
||||
molWeight 28.9;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cp 1007;
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
{
|
||||
mu 1.84e-05;
|
||||
Pr 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,54 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType
|
||||
{
|
||||
type heRhoThermo;
|
||||
mixture pureMixture;
|
||||
transport const;
|
||||
thermo hConst;
|
||||
equationOfState perfectFluid;
|
||||
specie specie;
|
||||
energy sensibleInternalEnergy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
specie
|
||||
{
|
||||
nMoles 1;
|
||||
molWeight 18.0;
|
||||
}
|
||||
equationOfState
|
||||
{
|
||||
R 3000;
|
||||
rho0 1027;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cp 4195;
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
{
|
||||
mu 3.645e-4;
|
||||
Pr 2.289;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -19,6 +19,7 @@ defaultFieldValues
|
||||
(
|
||||
volScalarFieldValue alphawater 1
|
||||
volScalarFieldValue p_rgh 1e5
|
||||
volScalarFieldValue p 1e5
|
||||
volScalarFieldValue T 300
|
||||
);
|
||||
|
||||
@ -32,6 +33,7 @@ regions
|
||||
(
|
||||
volScalarFieldValue alphawater 0
|
||||
volScalarFieldValue p_rgh 1e6
|
||||
volScalarFieldValue p 1e6
|
||||
volScalarFieldValue T 578
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user