ENH: TJunction: updated cases to use topoSet. Changed to relative pressure level

This commit is contained in:
mattijs
2011-07-22 17:39:19 +01:00
parent a0bc3bc4da
commit 48bf137f86
8 changed files with 110 additions and 32 deletions

View File

@ -16,17 +16,17 @@ FoamFile
dimensions [0 2 -2 0 0 0 0]; dimensions [0 2 -2 0 0 0 0];
internalField uniform 100000; internalField uniform 0;
boundaryField boundaryField
{ {
inlet inlet
{ {
//type totalPressure; //type totalPressure;
//p0 uniform 100040; //p0 uniform 40;
type timeVaryingTotalPressure; type timeVaryingTotalPressure;
p0 100040; // only used for restarts p0 40; // only used for restarts
outOfBounds clamp; outOfBounds clamp;
fileName "$FOAM_CASE/constant/p0vsTime"; fileName "$FOAM_CASE/constant/p0vsTime";
@ -35,19 +35,19 @@ boundaryField
rho none; rho none;
psi none; psi none;
gamma 1; gamma 1;
value uniform 100040; value uniform 40;
} }
outlet1 outlet1
{ {
type fixedValue; type fixedValue;
value uniform 100010; value uniform 10;
} }
outlet2 outlet2
{ {
type fixedValue; type fixedValue;
value uniform 100000; value uniform 0;
} }
defaultFaces defaultFaces

View File

@ -1,4 +1,4 @@
( (
(0 100010) (0 10)
(1 100040) (1 40)
) )

View File

@ -17,7 +17,7 @@ FoamFile
dimensions [0 2 -2 0 0 0 0]; dimensions [0 2 -2 0 0 0 0];
internalField uniform 100000; internalField uniform 0;
boundaryField boundaryField
{ {
@ -27,20 +27,20 @@ boundaryField
rho none; rho none;
psi none; psi none;
gamma 1; gamma 1;
p0 100040; p0 40;
fileName "$FOAM_CASE/constant/p0vsTime"; fileName "$FOAM_CASE/constant/p0vsTime";
outOfBounds clamp; outOfBounds clamp;
value uniform 100040; value uniform 40;
} }
outlet1 outlet1
{ {
type fixedValue; type fixedValue;
value uniform 100010; value uniform 10;
} }
outlet2 outlet2
{ {
type fixedValue; type fixedValue;
value uniform 100000; value uniform 0;
} }
baffles baffles
{ {
@ -50,6 +50,7 @@ boundaryField
{ {
type fan; type fan;
patchType cyclic; patchType cyclic;
jump uniform 0;
f 2(100 -0.1); f 2(100 -0.1);
value uniform 0; value uniform 0;
} }
@ -57,6 +58,7 @@ boundaryField
{ {
type fan; type fan;
patchType cyclic; patchType cyclic;
jump uniform 0;
f 2(100 -0.1); f 2(100 -0.1);
value uniform 0; value uniform 0;
} }

View File

@ -9,21 +9,16 @@ application=`getApplication`
runApplication blockMesh runApplication blockMesh
# Creating patches 'out of nothing' so willl get undefined value which # Creating patches 'out of nothing' so will get undefined value which
# might cause floating point error # might cause floating point error
unset FOAM_SIGFPE unset FOAM_SIGFPE
unset FOAM_SETNAN unset FOAM_SETNAN
# Add cyclic baffles for fan # Create faceZones for fan and baffles
runApplication setSet -batch selectCyclics.setSet runApplication topoSet
#runApplication createBaffles cyclicFaces '(fan_half0 fan_half1)' -overwrite # Create fan cyclics
createBaffles cyclicFaces '(fan_half0 fan_half1)' -overwrite > log.createBaffles 2>&1 createBaffles cyclicFaces '(fan_half0 fan_half1)' -overwrite > log.createBaffles 2>&1
# Create wall baffles
# Add wall baffles
rm log.setSet
runApplication setSet -batch selectBaffles.setSet
rm log.createBaffles
#runApplication createBaffles baffleFaces '(baffles baffles)' -overwrite
createBaffles baffleFaces '(baffles baffles)' -overwrite > log.createBaffles 2>&1 createBaffles baffleFaces '(baffles baffles)' -overwrite > log.createBaffles 2>&1
runApplication $application runApplication $application

View File

@ -1,4 +1,4 @@
( (
(0 100010) (0 10)
(1 100040) (1 40)
) )

View File

@ -1,4 +0,0 @@
faceSet baffleFaces new boxToFace (0.099 -10 -10)(0.101 10 10)
# Remove the centre faces that become fan
faceSet baffleFaces delete boxToFace (0.099 -0.006 0.004)(0.101 0.006 0.016)
faceZoneSet baffleFaces new setToFaceZone baffleFaces

View File

@ -1,3 +0,0 @@
faceSet cyclicFaces new boxToFace (0.099 -0.006 0.004)(0.101 0.006 0.016)
cellSet cyclicFacesSlaveCells new boxToCell (-10 -10 -10)(0.1 10 10)
faceZoneSet cyclicFaces new setsToFaceZone cyclicFaces cyclicFacesSlaveCells

View File

@ -0,0 +1,88 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.0.0 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name cyclicFaces;
type faceSet;
action new;
source boxToFace;
sourceInfo
{
box (0.099 -0.006 0.004)(0.101 0.006 0.016);
}
}
{
name cyclicFacesSlaveCells;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-10 -10 -10)(0.1 10 10);
}
}
{
name cyclicFaces;
type faceZoneSet;
action new;
source setsToFaceZone;
sourceInfo
{
faceSet cyclicFaces;
cellSet cyclicFacesSlaveCells;
}
}
{
name baffleFaces;
type faceSet;
action new;
source boxToFace;
sourceInfo
{
box (0.099 -10 -10)(0.101 10 10);
}
}
{
name baffleFaces;
type faceSet;
action delete;
source boxToFace;
sourceInfo
{
box (0.099 -0.006 0.004)(0.101 0.006 0.016);
}
}
{
name baffleFaces;
type faceZoneSet;
action new;
source setToFaceZone;
sourceInfo
{
faceSet baffleFaces;
}
}
);
// ************************************************************************* //