compressibleInterFoam: Added thermal support

This commit is contained in:
Henry
2012-04-16 11:47:28 +01:00
parent aa7c66a3ff
commit 8e3e1808ec
27 changed files with 651 additions and 187 deletions

View File

@ -0,0 +1,34 @@
/*--------------------------------*- 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 alpha1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 300;
boundaryField
{
walls
{
type zeroGradient;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
object alpha1;
object alphawater;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -1,5 +1,6 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
foamCleanTutorials cases
rm -rf processor*
rm -rf 0/p_rgh 0/p_rgh.gz 0/alpha1 0/alpha1.gz
rm -rf 0/p_rgh.gz 0/alphawater.gz 0/T.gz

View File

@ -8,8 +8,9 @@ cd ${0%/*} || exit 1 # run from this directory
application=`getApplication`
runApplication blockMesh
cp 0/alpha1.org 0/alpha1
cp 0/alphawater.org 0/alphawater
cp 0/p_rgh.org 0/p_rgh
cp 0/T.org 0/T
runApplication setFields
runApplication $application

View File

@ -33,28 +33,20 @@ blocks
hex (0 1 2 3 4 5 6 7) (80 160 1) simpleGrading (1 1 1)
);
boundary
patches
(
walls
{
type wall;
faces
(
(3 7 6 2)
(0 4 7 3)
(2 6 5 1)
(1 5 4 0)
);
}
frontAndBack
{
type empty;
faces
(
(0 3 2 1)
(4 5 6 7)
);
}
wall walls
(
(3 7 6 2)
(0 4 7 3)
(2 6 5 1)
(1 5 4 0)
)
empty frontAndBack
(
(0 3 2 1)
(4 5 6 7)
)
);
// ************************************************************************* //

View File

@ -15,22 +15,28 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
phase1
phases (water air);
water
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [1 1 -3 -1 0 0 0] 0; //0.613;
rho rho [ 1 -3 0 0 0 0 0 ] 1000;
rho0 rho0 [ 1 -3 0 0 0 0 0 ] 1000;
psi psi [ 0 -2 2 0 0 ] 1e-05;
R R [0 2 -2 -1 0] 3000;
Cv Cv [0 2 -2 -1 0] 4179;
}
phase2
air
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.589e-05;
k k [1 1 -3 -1 0 0 0] 0; //2.63e-2;
rho rho [ 1 -3 0 0 0 0 0 ] 1;
rho0 rho0 [ 1 -3 0 0 0 0 0 ] 0;
psi psi [ 0 -2 2 0 0 ] 1e-05;
R R [0 2 -2 -1 0] 287;
Cv Cv [0 2 -2 -1 0] 721;
}
pMin pMin [ 1 -1 -2 0 0 0 0 ] 10000;

View File

@ -17,7 +17,7 @@ FoamFile
application compressibleInterFoam;
startFrom latestTime;
startFrom startTime;
startTime 0;

View File

@ -30,7 +30,9 @@ divSchemes
div(rho*phi,U) Gauss upwind;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss interfaceCompression 1;
div(phi,p_rgh) Gauss upwind;
div(phid1,p_rgh) Gauss upwind;
div(phid2,p_rgh) Gauss upwind;
div(rho*phi,T) Gauss upwind;
div(phi,k) Gauss vanLeer;
div((nuEff*dev(T(grad(U))))) Gauss linear;
}
@ -55,7 +57,6 @@ fluxRequired
default no;
p_rgh;
pcorr;
gamma;
}

View File

@ -91,7 +91,7 @@ solvers
nSweeps 1;
}
"(k|B|nuTilda)"
"(T|k|B|nuTilda).*"
{
solver PBiCG;
preconditioner DILU;

View File

@ -17,8 +17,9 @@ FoamFile
defaultFieldValues
(
volScalarFieldValue alpha1 1
volScalarFieldValue alphawater 1
volScalarFieldValue p_rgh 1e5
volScalarFieldValue T 300
);
regions
@ -29,8 +30,9 @@ regions
radius 0.1;
fieldValues
(
volScalarFieldValue alpha1 0
volScalarFieldValue alphawater 0
volScalarFieldValue p_rgh 1e6
volScalarFieldValue T 578
);
}
boxToCell
@ -38,7 +40,7 @@ regions
box (-10 1 -1) (10 10 1);
fieldValues
(
volScalarFieldValue alpha1 0
volScalarFieldValue alphawater 0
);
}
);

View File

@ -0,0 +1,29 @@
/*--------------------------------*- 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 alpha1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 300;
boundaryField
{
walls
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
object alpha1.org;
object alphawater;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -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/alpha1 0/alpha1.gz
rm -rf 0/p_rgh 0/p_rgh.gz 0/alphawater 0/alphawater.gz 0/T.gz
# ----------------------------------------------------------------- end-of-file

View File

@ -8,8 +8,9 @@ cd ${0%/*} || exit 1 # run from this directory
application=`getApplication`
runApplication blockMesh
cp 0/alpha1.org 0/alpha1
cp 0/alphawater.org 0/alphawater
cp 0/p_rgh.org 0/p_rgh
cp 0/T.org 0/T
runApplication setFields
runApplication decomposePar
runParallel $application 4

View File

@ -15,22 +15,28 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
phase1
phases (water air);
water
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [1 1 -3 -1 0 0 0] 0; //0.613;
rho rho [ 1 -3 0 0 0 0 0 ] 1000;
rho0 rho0 [ 1 -3 0 0 0 0 0 ] 1000;
psi psi [ 0 -2 2 0 0 ] 1e-05;
R R [0 2 -2 -1 0] 3000;
Cv Cv [0 2 -2 -1 0] 4179;
}
phase2
air
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.589e-05;
k k [1 1 -3 -1 0 0 0] 0; //2.63e-2;
rho rho [ 1 -3 0 0 0 0 0 ] 1;
rho0 rho0 [ 1 -3 0 0 0 0 0 ] 0;
psi psi [ 0 -2 2 0 0 ] 1e-05;
R R [0 2 -2 -1 0] 287;
Cv Cv [0 2 -2 -1 0] 721;
}
pMin pMin [ 1 -1 -2 0 0 0 0 ] 10000;

View File

@ -30,7 +30,9 @@ divSchemes
div(rho*phi,U) Gauss upwind;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss interfaceCompression 1;
div(phi,p_rgh) Gauss upwind;
div(phid1,p_rgh) Gauss upwind;
div(phid2,p_rgh) Gauss upwind;
div(rho*phi,T) Gauss upwind;
div(phi,k) Gauss vanLeer;
div((nuEff*dev(T(grad(U))))) Gauss linear;
}
@ -55,7 +57,6 @@ fluxRequired
default no;
p_rgh;
pcorr;
gamma;
}

View File

@ -91,7 +91,7 @@ solvers
nSweeps 1;
}
"(k|B|nuTilda)"
"(T|k|B|nuTilda).*"
{
solver PBiCG;
preconditioner DILU;

View File

@ -17,8 +17,9 @@ FoamFile
defaultFieldValues
(
volScalarFieldValue alpha1 1
volScalarFieldValue alphawater 1
volScalarFieldValue p_rgh 1e5
volScalarFieldValue T 300
);
regions
@ -29,8 +30,9 @@ regions
radius 0.1;
fieldValues
(
volScalarFieldValue alpha1 0
volScalarFieldValue alphawater 0
volScalarFieldValue p_rgh 1e6
volScalarFieldValue T 578
);
}
boxToCell
@ -38,7 +40,7 @@ regions
box (-10 1 -1) (10 10 1);
fieldValues
(
volScalarFieldValue alpha1 0
volScalarFieldValue alphawater 0
);
}
);