Commit c7ad9e11 authored by Henry's avatar Henry
Browse files

compressibleInterFoam tutorials updated for new thermo

parent 186bf33d
......@@ -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");
......
/*--------------------------------*- 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
......
/*--------------------------------*- 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;
}
}
// ************************************************************************* //
/*--------------------------------*- 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
);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment