ENH: Moving circuitBoardCooling tutorial to buoyantSimpleFoam folder

and deleting old buoyantBaffleSimpleFoam
This commit is contained in:
Sergio Ferraris
2011-11-08 16:39:36 +00:00
parent fe068c3bc9
commit 8968d1d0ae
38 changed files with 711 additions and 435 deletions

View File

@ -1,27 +0,0 @@
#!/bin/sh
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application name
application=`getApplication`
cp -r 0.org 0
runApplication blockMesh
runApplication setSet -batch baffle.setSet
unset FOAM_SETNAN
unset FOAM_SIGFPE
# Add the patches for the baffles
runApplication changeDictionary -literalRE
rm log.changeDictionary
# Create first baffle
createBaffles baffleFaces '(baffle1Wall_0 baffle1Wall_1)' -overwrite > log.createBaffles 2>&1
# Create second baffle
createBaffles baffleFaces2 '(baffle2Wall_0 baffle2Wall_1)' -overwrite > log.createBaffles 2>&1
# Reset proper values at the baffles
runApplication changeDictionary
runApplication $application

View File

@ -1,6 +0,0 @@
# Create face set
faceSet baffleFaces new boxToFace (0.29 0 0) (0.31 0.18 2)
faceZoneSet baffleFaces new setToFaceZone baffleFaces
faceSet baffleFaces2 new boxToFace (0.59 0.0 0.0)(0.61 0.18 2.0)
faceZoneSet baffleFaces2 new setToFaceZone baffleFaces2

View File

@ -44,6 +44,10 @@ boundaryField
{
type empty;
}
"baffle1Wall.*"
{
type calculated;
}
}

View File

@ -46,6 +46,10 @@ boundaryField
{
type empty;
}
"baffle1Wall.*"
{
type calculated;
}
}

View File

@ -0,0 +1,30 @@
/*--------------------------------*- 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 Q;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -3 0 0 0 0];
internalField uniform 17000;
boundaryField
{
".*"
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,27 @@
/*--------------------------------*- 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 T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 0 0 1 0 0 0 ];
internalField uniform 300;
boundaryField
{
}
// ************************************************************************* //

View File

@ -44,6 +44,10 @@ boundaryField
{
type empty;
}
"baffle1Wall.*"
{
type calculated;
}
}

View File

@ -45,6 +45,10 @@ boundaryField
{
type empty;
}
"baffle1Wall.*"
{
type calculated;
}
}

View File

@ -24,27 +24,31 @@ boundaryField
floor
{
type calculated;
value uniform 101325;
value $internalField;
}
ceiling
{
type calculated;
value uniform 101325;
value $internalField;
}
inlet
{
type calculated;
value uniform 101325;
value $internalField;
}
outlet
{
type calculated;
value uniform 101325;
value $internalField;
}
fixedWalls
{
type empty;
}
"baffle1Wall.*"
{
type calculated;
}
}

View File

@ -17,38 +17,38 @@ FoamFile
dimensions [ 1 -1 -2 0 0 0 0 ];
internalField uniform 0;
internalField uniform 101325;
boundaryField
{
floor
{
type buoyantPressure;
gradient uniform 0;
value uniform 0;
value $internalField;
}
ceiling
{
type buoyantPressure;
gradient uniform 0;
value uniform 0;
value $internalField;
}
inlet
{
type buoyantPressure;
gradient uniform 0;
value uniform 0;
value $internalField;
}
outlet
{
type buoyantPressure;
gradient uniform 0;
value uniform 0;
value $internalField;
}
fixedWalls
{
type empty;
}
"baffle1Wall.*"
{
type calculated;
}
}

View File

@ -5,6 +5,7 @@ cd ${0%/*} || exit 1 # run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
rm -rf constant/baffleRegion/polyMesh
rm -rf sets 0
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +1,32 @@
#!/bin/sh
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application name
application=`getApplication`
cp -r 0.org 0
runApplication blockMesh
runApplication topoSet
unset FOAM_SETNAN
unset FOAM_SIGFPE
# Create first baffle
createBaffles baffleFaces '(baffle1Wall_0 baffle1Wall_1)' -overwrite > log.createBaffles 2>&1
# Create region
runApplication extrudeToRegionMesh -overwrite
# Set the BC's for the baffle
runApplication changeDictionary -dict system/changeDictionaryDict.baffle
rm log.changeDictionary
# Set Bc's for the region baffle
runApplication changeDictionary -dict system/changeDictionaryDict.baffleRegion -literalRE
rm log.changeDictionary
# Reset proper values at the region
runApplication changeDictionary -region baffleRegion -literalRE
runApplication $application

View File

@ -30,7 +30,7 @@ vertices
blocks
(
hex (0 1 2 3 4 5 6 7) (40 20 1) simpleGrading (1 1 1)
hex (0 1 2 3 4 5 6 7) (50 40 1) simpleGrading (1 1 1)
);
edges
@ -87,7 +87,7 @@ boundary
baffle1Wall_0
{
type mappedWall;
type directMappedWall;
sampleMode nearestPatchFace;
sampleRegion region0;
samplePatch baffle1Wall_1;
@ -98,7 +98,7 @@ boundary
baffle1Wall_1
{
type mappedWall;
type directMappedWall;
sampleMode nearestPatchFace;
sampleRegion region0;
samplePatch baffle1Wall_0;
@ -106,28 +106,6 @@ boundary
offset (0 0 0);
faces ();
}
baffle2Wall_0
{
type mappedWall;
sampleMode nearestPatchFace;
sampleRegion region0;
samplePatch baffle2Wall_1;
offsetMode uniform;
offset (0 0 0);
faces ();
}
baffle2Wall_1
{
type mappedWall;
sampleMode nearestPatchFace;
sampleRegion region0;
samplePatch baffle2Wall_0;
offsetMode uniform;
offset (0 0 0);
faces ();
}
);
mergePatchPairs

View File

@ -15,81 +15,61 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
9
7
(
floor
{
type wall;
nFaces 40;
startFace 1526;
nFaces 50;
startFace 3896;
}
ceiling
{
type wall;
nFaces 40;
startFace 1566;
nFaces 50;
startFace 3946;
}
inlet
{
type patch;
nFaces 20;
startFace 1606;
nFaces 40;
startFace 3996;
}
outlet
{
type patch;
nFaces 20;
startFace 1626;
nFaces 40;
startFace 4036;
}
fixedWalls
{
type empty;
nFaces 1600;
startFace 1646;
nFaces 4000;
startFace 4076;
}
baffle1Wall_0
{
type mappedWall;
nFaces 7;
startFace 3246;
type directMappedWall;
nFaces 14;
startFace 8076;
sampleMode nearestPatchFace;
sampleRegion region0;
samplePatch baffle1Wall_1;
offsetMode uniform;
offset (0 0 0);
offset ( 0 0 0 );
faces ( );
}
baffle1Wall_1
{
type mappedWall;
nFaces 7;
startFace 3253;
type directMappedWall;
nFaces 14;
startFace 8090;
sampleMode nearestPatchFace;
sampleRegion region0;
samplePatch baffle1Wall_0;
offsetMode uniform;
offset (0 0 0);
}
baffle2Wall_0
{
type mappedWall;
nFaces 7;
startFace 3260;
sampleMode nearestPatchFace;
sampleRegion region0;
samplePatch baffle2Wall_1;
offsetMode uniform;
offset (0 0 0);
}
baffle2Wall_1
{
type mappedWall;
nFaces 7;
startFace 3267;
sampleMode nearestPatchFace;
sampleRegion region0;
samplePatch baffle2Wall_0;
offsetMode uniform;
offset (0 0 0);
offset ( 0 0 0 );
faces ( );
}
)

View File

@ -0,0 +1,57 @@
/*--------------------------------*- 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;
object changeDictionaryDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dictionaryReplacement
{
T
{
boundaryField
{
"region0_to.*"
{
type compressible::temperatureThermoBaffle;
neighbourFieldName T;
K solidThermo;
KName none;
value uniform 300;
}
baffleFaces2_side
{
type zeroGradient;
}
floor
{
type fixedValue;
value uniform 300;
}
fixedWalls
{
type empty;
}
}
}
boundary
{
floor
{
type patch;
}
}
}
// ************************************************************************* //

View File

@ -0,0 +1,40 @@
/*--------------------------------*- 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 "system/baffleRegion";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default steadyState;
}
divSchemes
{
default none;
}
gradSchemes
{
default Gauss linear;
}
laplacianSchemes
{
default none;
laplacian(K,T) Gauss linear uncorrected;
}
// ************************************************************************* //

View File

@ -0,0 +1,37 @@
/*--------------------------------*- 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 "system/baffleRegion";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
T
{
solver PCG;
smoother GaussSeidel;
preconditioner DIC;
tolerance 1e-06;
relTol 0;
}
}
nNonOrthCorr 0;
relaxationFactors
{
T 1;
}
// ************************************************************************* //

View File

@ -0,0 +1,131 @@
/*--------------------------------*- 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;
object changeDictionaryDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dictionaryReplacement
{
alphat
{
boundaryField
{
"baffle1.*"
{
type alphatWallFunction;
value uniform 0;
}
}
}
epsilon
{
boundaryField
{
"baffle1.*"
{
type compressible::epsilonWallFunction;
value uniform 0.01;
}
}
}
k
{
boundaryField
{
"baffle1.*"
{
type compressible::kqRWallFunction;
value uniform 0.01;
}
}
}
mut
{
boundaryField
{
"baffle1.*"
{
type mutkWallFunction;
value uniform 0.0;
}
}
}
p
{
boundaryField
{
"baffle1.*"
{
type calculated;
value $internalField;
}
}
}
p_rgh
{
boundaryField
{
"baffle1.*"
{
type buoyantPressure;
value $internalField;
}
}
}
T
{
boundaryField
{
"baffle1Wall.*"
{
type compressible::temperatureThermoBaffle1D<constSolidThermoPhysics>;
baffleActivated yes;
thickness uniform 0.005; // thickness [m]
Qs uniform 300; // heat flux [W/m2]
transport
{
K 1.0;
}
radiation
{
sigmaS 0;
kappa 0;
emissivity 0;
}
thermodynamics
{
Hf 0;
Cp 10;
}
density
{
rho 10;
}
value uniform 300;
}
}
}
U
{
boundaryField
{
"baffle1.*"
{
type fixedValue;
value uniform (0 0 0);
}
}
}
}
// ************************************************************************* //

View File

@ -0,0 +1,149 @@
/*--------------------------------*- 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;
object changeDictionaryDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dictionaryReplacement
{
alphat
{
boundaryField
{
"region0_to_.*"
{
type alphatWallFunction;
value uniform 0;
}
}
}
epsilon
{
boundaryField
{
"region0_to_.*"
{
type compressible::epsilonWallFunction;
value uniform 0.01;
}
}
}
k
{
boundaryField
{
"region0_to_.*"
{
type compressible::kqRWallFunction;
value uniform 0.01;
}
}
}
mut
{
boundaryField
{
"region0_to_.*"
{
type mutkWallFunction;
value uniform 0.0;
}
}
}
p
{
boundaryField
{
"region0_to_.*"
{
type calculated;
value $internalField;
}
}
}
p_rgh
{
boundaryField
{
"region0_to_.*"
{
type buoyantPressure;
value $internalField;
}
}
}
T
{
boundaryField
{
"region0_to.*"
{
type compressible::temperatureThermoBaffle;
// Coupled BC.
neighbourFieldName T;
K basicThermo;
KName none;
// Thermo baffle model
thermoBaffleModel thermoBaffle2D;
regionName baffleRegion;
infoOutput yes;
active yes;
thermoBaffle2DCoeffs
{
}
// Solid thermo
thermoType constSolidThermo;
constSolidThermoCoeffs
{
//- thermo properties
rho rho [1 -3 0 0 0 0 0] 80;
Cp Cp [0 2 -2 -1 0 0 0] 15;
K K [1 1 -3 -1 0 0 0] 0.01;
//- radiative properties
kappa kappa [0 -1 0 0 0 0 0] 0;
sigmaS sigmaS [0 -1 0 0 0 0 0] 0;
emissivity emissivity [0 0 0 0 0 0 0] 1;
//- chemical properties
Hf Hf [0 2 -2 0 0 0 0] 0;
}
value uniform 300;
}
}
}
U
{
boundaryField
{
"region0_to_.*"
{
type fixedValue;
value uniform (0 0 0);
}
}
}
}
// ************************************************************************* //

View File

@ -14,9 +14,9 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application buoyantBaffleSimpleFoam;
application buoyantSimpleFoam;
startFrom latestTime;
startFrom startTime;
startTime 0;
@ -44,5 +44,6 @@ timePrecision 6;
runTimeModifiable true;
libs ("libthermoBaffleModels.so");
// ************************************************************************* //

View File

@ -0,0 +1,38 @@
/*--------------------------------*- 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;
object extrudeToRegionMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
region baffleRegion;
faceZones (baffleFaces2);
oneD false;
extrudeModel linearNormal;
nLayers 10;
expansionRatio 1;
adaptMesh yes; // apply directMapped to both regions
sampleMode nearestPatchFace;
linearNormalCoeffs
{
thickness 0.02;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -35,42 +35,36 @@ solvers
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-8;
relTol 0.1;
tolerance 1e-7;
relTol 0.01;
}
}
SIMPLE
{
momentumPredictor yes;
momentumPredictor no;
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
residualControl
{
p_rgh 1e-2;
U 1e-3;
h 1e-3;
p_rgh 5e-3;
U 3e-4;
h 3e-4;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
"(k|epsilon|omega)" 5e-3;
}
}
relaxationFactors
{
fields
{
rho 1.0;
p_rgh 0.7;
}
equations
{
U 0.3;
h 0.3;
"(k|epsilon|omega)" 0.7;
}
rho 1.0;
p_rgh 0.7;
U 0.7;
h 0.3;
"(k|epsilon|omega)" 0.3;
}

View File

@ -0,0 +1,89 @@
/*--------------------------------*- 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;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name baffleFaces;
type faceSet;
action new;
source boxToFace;
sourceInfo
{
box (0.296 0 0) (0.306 0.18 2);
}
}
{
name baffleFacesSlaveCells;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (0 0 0) (0.295 0.2 2);
}
}
{
name baffleFaces;
type faceZoneSet;
action new;
source setsToFaceZone;
sourceInfo
{
faceSet baffleFaces;
cellSet baffleFacesSlaveCells;
}
}
{
name baffleFaces2;
type faceSet;
action new;
source boxToFace;
sourceInfo
{
box (0.5944 0 0) (0.605 0.18 2);
}
}
{
name baffleFacesSlaveCells2;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (0 0 0) (0.594 0.2 2);
}
}
{
name baffleFaces2;
type faceZoneSet;
action new;
source setsToFaceZone;
sourceInfo
{
faceSet baffleFaces2;
cellSet baffleFacesSlaveCells2;
}
}
);
// ************************************************************************* //