mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: TJunctionFan: rewrite to createBafflesDict
This commit is contained in:
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
dimensions [m s^-1];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
@ -38,19 +38,6 @@ boundaryField
|
||||
inletValue uniform (0 0 0);
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
baffles
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
fan_half0
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
fan_half1
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type fixedValue;
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -3 0 0 0 0];
|
||||
dimensions [m^2 s^-3];
|
||||
|
||||
internalField uniform 200;
|
||||
|
||||
@ -41,22 +41,6 @@ boundaryField
|
||||
inletValue uniform 200;
|
||||
value uniform 200;
|
||||
}
|
||||
baffles
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
value uniform 0;
|
||||
}
|
||||
fan_half0
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
fan_half1
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
dimensions [m^2 s^-2];
|
||||
|
||||
internalField uniform 0.375;
|
||||
|
||||
@ -25,8 +25,6 @@ boundaryField
|
||||
{
|
||||
type turbulentIntensityKineticEnergyInlet;
|
||||
intensity 0.05;
|
||||
U U;
|
||||
phi phi;
|
||||
value uniform 0.375;
|
||||
}
|
||||
outlet1
|
||||
@ -41,19 +39,6 @@ boundaryField
|
||||
inletValue uniform 0.375;
|
||||
value uniform 0.375;
|
||||
}
|
||||
baffles
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
fan_half0
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
fan_half1
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type kqRWallFunction;
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -1 0 0 0 0];
|
||||
dimensions [m^2 s^-1];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
@ -33,18 +33,6 @@ boundaryField
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
baffles
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
fan_half0
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
fan_half1
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type zeroGradient;
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -1 0 0 0 0];
|
||||
dimensions [m^2 s^-1];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
@ -36,22 +36,6 @@ boundaryField
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
baffles
|
||||
{
|
||||
type nutkWallFunction;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
value uniform 0;
|
||||
}
|
||||
fan_half0
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
fan_half1
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type nutkWallFunction;
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
dimensions [m^2 s^-2];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
@ -27,15 +27,13 @@ boundaryField
|
||||
rho none;
|
||||
psi none;
|
||||
gamma 1;
|
||||
p0 40;
|
||||
pressure table
|
||||
|
||||
2
|
||||
(
|
||||
(0 10)
|
||||
(1 40)
|
||||
)
|
||||
;
|
||||
2
|
||||
(
|
||||
(0 10)
|
||||
(1 40)
|
||||
)
|
||||
;
|
||||
value uniform 40;
|
||||
}
|
||||
outlet1
|
||||
@ -48,30 +46,6 @@ boundaryField
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
baffles
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
fan_half0
|
||||
{
|
||||
type fan;
|
||||
patchType cyclic;
|
||||
jumpTable polynomial
|
||||
|
||||
2
|
||||
(
|
||||
(100 0)
|
||||
(-0.1 1)
|
||||
)
|
||||
;
|
||||
value uniform 0;
|
||||
}
|
||||
fan_half1
|
||||
{
|
||||
type fan;
|
||||
patchType cyclic;
|
||||
value uniform 0;
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type zeroGradient;
|
||||
|
||||
@ -8,21 +8,10 @@ application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
|
||||
# Creating patches 'out of nothing' so will get undefined value which
|
||||
# might cause floating point error
|
||||
unset FOAM_SIGFPE
|
||||
unset FOAM_SETNAN
|
||||
|
||||
# Create faceZones for fan and baffles
|
||||
# Create faceZones for baffles and fan
|
||||
runApplication topoSet
|
||||
|
||||
# Create fan cyclics
|
||||
runApplication createBaffles cyclicFaces '(fan_half0 fan_half1)' -overwrite
|
||||
mv log.createBaffles log.createBaffles.1
|
||||
|
||||
# Create wall baffles
|
||||
runApplication createBaffles baffleFaces '(baffles baffles)' -overwrite
|
||||
mv log.createBaffles log.createBaffles.2
|
||||
# Create wall and cyclic baffles and the fields on them
|
||||
runApplication createBaffles -overwrite
|
||||
|
||||
runApplication $application
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
2010-04-16 T-junction with baffles and fan.
|
||||
Inlet on left, one outlet at bottom, one at top.
|
||||
To test multiple outlets.
|
||||
To test multiple outlets and fan cyclics
|
||||
|
||||
@ -104,25 +104,6 @@ boundary
|
||||
faces ((8 18 19 9));
|
||||
}
|
||||
|
||||
baffles
|
||||
{
|
||||
type wall;
|
||||
faces ();
|
||||
}
|
||||
|
||||
fan_half0
|
||||
{
|
||||
type cyclic;
|
||||
faces ();
|
||||
neighbourPatch fan_half1;
|
||||
}
|
||||
fan_half1
|
||||
{
|
||||
type cyclic;
|
||||
faces ();
|
||||
neighbourPatch fan_half0;
|
||||
}
|
||||
|
||||
defaultFaces
|
||||
{
|
||||
type wall;
|
||||
|
||||
@ -0,0 +1,186 @@
|
||||
/*--------------------------------*- 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 createBafflesDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Whether to convert internal faces only (so leave boundary faces intact).
|
||||
// This is only relevant if your face selection type can pick up boundary
|
||||
// faces.
|
||||
internalFacesOnly true;
|
||||
|
||||
|
||||
// Baffles to create.
|
||||
baffles
|
||||
{
|
||||
baffleFaces
|
||||
{
|
||||
//- Use predefined faceZone to select faces and orientation.
|
||||
type faceZone;
|
||||
zoneName baffleFaces;
|
||||
|
||||
|
||||
//- Optional flip
|
||||
//flip false;
|
||||
|
||||
patches
|
||||
{
|
||||
master
|
||||
{
|
||||
//- Master side patch
|
||||
name baffles;
|
||||
type wall;
|
||||
|
||||
patchFields
|
||||
{
|
||||
epsilon
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
value uniform 0;
|
||||
}
|
||||
k
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
nut
|
||||
{
|
||||
type nutkWallFunction;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
value uniform 0;
|
||||
}
|
||||
nuTilda
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
p
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
U
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
slave
|
||||
{
|
||||
//- Slave side patch
|
||||
name baffles;
|
||||
type wall;
|
||||
|
||||
patchFields
|
||||
{
|
||||
epsilon
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
value uniform 0;
|
||||
}
|
||||
k
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
nut
|
||||
{
|
||||
type nutkWallFunction;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
value uniform 0;
|
||||
}
|
||||
nuTilda
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
p
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
U
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
cyclicFaces
|
||||
{
|
||||
//- Select faces and orientation through a searchableSurface
|
||||
type searchableSurface;
|
||||
surface searchablePlate;
|
||||
origin (0.099 -0.006 0.004);
|
||||
span (0 0.012 0.012);
|
||||
|
||||
patches
|
||||
{
|
||||
master
|
||||
{
|
||||
//- Master side patch
|
||||
|
||||
name fan_half0;
|
||||
type cyclic;
|
||||
neighbourPatch fan_half1;
|
||||
|
||||
//- Optional override of added patchfields. If not specified
|
||||
// any added patchfields are of type calculated.
|
||||
patchFields
|
||||
{
|
||||
p
|
||||
{
|
||||
type fan;
|
||||
patchType cyclic;
|
||||
jump uniform 0;
|
||||
value uniform 0;
|
||||
jumpTable polynomial 1((100 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
slave
|
||||
{
|
||||
//- Slave side patch
|
||||
|
||||
name fan_half1;
|
||||
type cyclic;
|
||||
neighbourPatch fan_half0;
|
||||
|
||||
patchFields
|
||||
{
|
||||
p
|
||||
{
|
||||
type fan;
|
||||
patchType cyclic;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user