Created a runnable tutorial out of the iglooWithFridges case to demonstrate the buoyantBoussinesqSimpleFoam code.

This commit is contained in:
henry 2009-06-30 23:09:05 +01:00
parent 1783feeb90
commit 56724d5a2d
16 changed files with 615 additions and 24 deletions

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 265;
boundaryField
{
ground
{
type fixedValue;
value uniform 265;
}
igloo_region0
{
type fixedValue;
value uniform 265;
}
twoFridgeFreezers_seal_0
{
type fixedValue;
value uniform 303;
}
twoFridgeFreezers_herring_1
{
type fixedValue;
value uniform 303;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
ground
{
type fixedValue;
value uniform (0 0 0);
}
igloo_region0
{
type fixedValue;
value uniform (0 0 0);
}
twoFridgeFreezers_seal_0
{
type fixedValue;
value uniform (0 0 0);
}
twoFridgeFreezers_herring_1
{
type fixedValue;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,50 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alphat;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
ground
{
type alphatWallFunction;
value uniform 0;
}
igloo_region0
{
type alphatWallFunction;
value uniform 0;
}
twoFridgeFreezers_seal_0
{
type alphatWallFunction;
value uniform 0;
}
twoFridgeFreezers_herring_1
{
type alphatWallFunction;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,50 @@
/*--------------------------------*- 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;
location "0";
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 0.01;
boundaryField
{
ground
{
type epsilonWallFunction;
value uniform 0.01;
}
igloo_region0
{
type epsilonWallFunction;
value uniform 0.01;
}
twoFridgeFreezers_seal_0
{
type epsilonWallFunction;
value uniform 0.01;
}
twoFridgeFreezers_herring_1
{
type epsilonWallFunction;
value uniform 0.01;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,50 @@
/*--------------------------------*- 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;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.1;
boundaryField
{
ground
{
type kQRWallFunction;
value uniform 0.1;
}
igloo_region0
{
type kQRWallFunction;
value uniform 0.1;
}
twoFridgeFreezers_seal_0
{
type kQRWallFunction;
value uniform 0.1;
}
twoFridgeFreezers_herring_1
{
type kQRWallFunction;
value uniform 0.1;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,50 @@
/*--------------------------------*- 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;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
ground
{
type nutWallFunction;
value uniform 0;
}
igloo_region0
{
type nutWallFunction;
value uniform 0;
}
twoFridgeFreezers_seal_0
{
type nutWallFunction;
value uniform 0;
}
twoFridgeFreezers_herring_1
{
type nutWallFunction;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,52 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
ground
{
type fixedFluxBuoyantPressure;
rho rhok;
value uniform 0;
}
igloo_region0
{
type fixedFluxBuoyantPressure;
rho rhok;
value uniform 0;
}
twoFridgeFreezers_seal_0
{
type fixedFluxBuoyantPressure;
rho rhok;
value uniform 0;
}
twoFridgeFreezers_herring_1
{
type fixedFluxBuoyantPressure;
rho rhok;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,9 @@
#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
runApplication snappyHexMesh -overwrite
runApplication setFields
runApplication buoyantBoussinesqSimpleFoam

View File

@ -0,0 +1,100 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object RASProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RASModel kEpsilon;
turbulence on;
printCoeffs on;
laminarCoeffs
{
}
kEpsilonCoeffs
{
Cmu 0.09;
C1 1.44;
C2 1.92;
C3 0.85;
alphah 1;
alphak 1;
alphaEps 0.76923;
}
RNGkEpsilonCoeffs
{
Cmu 0.0845;
C1 1.42;
C2 1.68;
C3 -0.33;
alphah 1;
alphak 1.39;
alphaEps 1.39;
eta0 4.38;
beta 0.012;
}
LaunderSharmaKECoeffs
{
Cmu 0.09;
C1 1.44;
C2 1.92;
C3 -0.33;
alphah 1;
alphak 1;
alphaEps 0.76923;
}
LRRCoeffs
{
Cmu 0.09;
Clrr1 1.8;
Clrr2 0.6;
C1 1.44;
C2 1.92;
alphah 1;
Cs 0.25;
Ceps 0.15;
alphaR 1;
alphaEps 0.76923;
}
LaunderGibsonRSTMCoeffs
{
Cmu 0.09;
Clg1 1.8;
Clg2 0.6;
C1 1.44;
C2 1.92;
alphah 1;
C1Ref 0.5;
C2Ref 0.3;
Cs 0.25;
Ceps 0.15;
alphaR 1;
alphaEps 0.76923;
}
wallFunctionCoeffs
{
kappa 0.4187;
E 9;
}
// ************************************************************************* //

View File

@ -0,0 +1,20 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object environmentalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
g g [0 1 -2 0 0 0 0] (0 0 -9.81);
// ************************************************************************* //

View File

@ -40,27 +40,32 @@ edges
patches
(
patch maxY
empty maxY
(
(3 7 6 2)
)
patch minX
empty minX
(
(0 4 7 3)
)
patch maxX
empty maxX
(
(2 6 5 1)
)
patch minY
empty minY
(
(1 5 4 0)
)
patch minZ
wall ground
(
(0 3 2 1)
)
patch maxZ
empty maxZ
(
(4 5 6 7)
)

View File

@ -0,0 +1,42 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5.x |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
// Laminar viscosity
nu nu [0 2 -1 0 0 0 0] 1e-05;
// Thermal expansion coefficient
beta beta [0 0 0 -1 0 0 0] 3e-03;
// Reference temperature
TRef TRef [0 0 0 1 0 0 0] 300;
// Laminar Prandtl number
Pr Pr [0 0 0 0 0 0 0] 0.9;
// Turbulent Prandtl number
Prt Prt [0 0 0 0 0 0 0] 0.7;
// ************************************************************************* //

View File

@ -15,25 +15,25 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
startFrom latestTime;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 100;
endTime 1000;
deltaT 1;
writeControl timeStep;
writeInterval 1;
writeInterval 100;
purgeWrite 0;
writeFormat ascii;
writePrecision 7;
writePrecision 6;
writeCompression uncompressed;

View File

@ -17,33 +17,40 @@ FoamFile
ddtSchemes
{
default Euler;
default steadyState;
}
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss linear;
div(phi,U) Gauss upwind;
div(phi,T) Gauss upwind;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div((nuEff*dev(grad(U).T()))) Gauss linear;
}
laplacianSchemes
{
default none;
laplacian(nu,U) Gauss linear corrected;
laplacian(1|A(U),p) Gauss linear corrected;
laplacian(diffusivity,cellMotionU) Gauss linear uncorrected;
laplacian(nuEff,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
laplacian(kappaEff,T) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian(DREff,R) Gauss linear corrected;
}
interpolationSchemes
{
default linear;
interpolate(HbyA) linear;
}
snGradSchemes

View File

@ -16,15 +16,73 @@ FoamFile
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{}
PISO
{
nCorrectors 2;
p
{
solver PCG;
preconditioner DIC;
tolerance 1e-08;
relTol 0.01;
}
U
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}
T
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}
k
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}
epsilon
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}
R
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}
}
SIMPLE
{
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
}
relaxationFactors
{
rho 1;
p 0.3;
U 0.7;
T 0.7;
k 0.7;
epsilon 0.7;
R 0.7;
}
// ************************************************************************* //

View File

@ -42,12 +42,13 @@ geometry
min (0 0 0);
max (1 1 1);
}
fridgeFreezer
{
type searchableSurfaceCollection;
mergeSubRegions true;
freezer
{
surface box1;
@ -73,12 +74,13 @@ geometry
}
}
}
twoFridgeFreezers
{
type searchableSurfaceCollection;
mergeSubRegions true;
seal
{
surface fridgeFreezer;