createNonConformalCouples: Support patchType overrides
Field settings can now be specified within
createNonConformalCouplesDict. This allows for patchType overrides; for
example to create a jump condition over the coupling.
An alternate syntax has been added to facilitate this. If patch fields
do not need overriding then the old syntax can be used where patches
that are to be coupled are specified as a pair of names; e.g.:
fields yes;
nonConformalCouples
{
fan
{
patches (fan0 fan1);
transform none;
}
}
If patch fields do need overriding, then instead of the "patches" entry,
separate "owner" and "neighbour" sub-dictionaries should be used. These
can both contain a "patchFields" section detailing the boundary
conditions that apply to the newly created patches:
fields yes;
nonConformalCouples
{
fan
{
owner
{
patch fan0;
patchFields
{
p
{
type fanPressureJump;
patchType nonConformalCyclic;
jump uniform 0;
value uniform 0;
jumpTable polynomial 1((100 0));
}
}
}
neighbour
{
patch fan1;
patchFields
{
$../../owner/patchFields;
}
}
transform none;
}
}
In this example, only the pressure boundary condition is overridden on
the newly created non-conformal cyclic. All other fields will have the
basic constraint type (i.e., nonConformalCyclic) applied.
This commit is contained in:
@ -11,7 +11,7 @@ runApplication blockMesh
|
||||
# Create faceZones for baffles and fan
|
||||
runApplication topoSet
|
||||
|
||||
# Create wall and cyclic baffles and the fields on them
|
||||
# Create baffles and the fields on them
|
||||
runApplication createBaffles -overwrite
|
||||
|
||||
runApplication $application
|
||||
|
||||
20
tutorials/modules/incompressibleFluid/TJunctionFan/Allrun-NCC
Executable file
20
tutorials/modules/incompressibleFluid/TJunctionFan/Allrun-NCC
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name
|
||||
application=$(getApplication)
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
# Create faceZones for baffles and fan
|
||||
runApplication topoSet
|
||||
|
||||
# Create baffles and the fields on them
|
||||
runApplication createBaffles -overwrite -dict system/createBafflesDict.NCC
|
||||
|
||||
# Create non-conformal couplings
|
||||
runApplication createNonConformalCouples -overwrite
|
||||
|
||||
runApplication $application
|
||||
@ -19,10 +19,10 @@ fields true;
|
||||
|
||||
baffles
|
||||
{
|
||||
baffleFaces
|
||||
baffle
|
||||
{
|
||||
type faceZone;
|
||||
zoneName baffleFaces;
|
||||
zoneName baffle;
|
||||
|
||||
owner
|
||||
{
|
||||
@ -80,18 +80,16 @@ baffles
|
||||
}
|
||||
}
|
||||
|
||||
cyclicFaces
|
||||
fan
|
||||
{
|
||||
type searchableSurface;
|
||||
surface searchablePlate;
|
||||
origin (0.099 -0.006 0.004);
|
||||
span (0 0.012 0.012);
|
||||
type faceZone;
|
||||
zoneName fan;
|
||||
|
||||
owner
|
||||
{
|
||||
name cyclic0;
|
||||
name fan0;
|
||||
type cyclic;
|
||||
neighbourPatch cyclic1;
|
||||
neighbourPatch fan1;
|
||||
|
||||
patchFields
|
||||
{
|
||||
@ -108,9 +106,9 @@ baffles
|
||||
|
||||
neighbour
|
||||
{
|
||||
name cyclic1;
|
||||
name fan1;
|
||||
type cyclic;
|
||||
neighbourPatch cyclic0;
|
||||
neighbourPatch fan0;
|
||||
|
||||
patchFields
|
||||
{
|
||||
|
||||
@ -0,0 +1,113 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object createBafflesDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
internalFacesOnly true;
|
||||
|
||||
fields true;
|
||||
|
||||
baffles
|
||||
{
|
||||
baffle
|
||||
{
|
||||
type faceZone;
|
||||
zoneName baffle;
|
||||
|
||||
owner
|
||||
{
|
||||
name baffle0;
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
neighbour
|
||||
{
|
||||
name baffle1;
|
||||
type wall;
|
||||
|
||||
patchFields
|
||||
{
|
||||
$../../owner/patchFields;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fan
|
||||
{
|
||||
type faceZone;
|
||||
zoneName fan;
|
||||
|
||||
owner
|
||||
{
|
||||
name fan0;
|
||||
type wall;
|
||||
|
||||
patchFields
|
||||
{
|
||||
$../../../baffle/owner/patchFields;
|
||||
}
|
||||
}
|
||||
|
||||
neighbour
|
||||
{
|
||||
name fan1;
|
||||
type wall;
|
||||
|
||||
patchFields
|
||||
{
|
||||
$../../owner/patchFields;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object createNonConformalCouplesDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
fields yes;
|
||||
|
||||
nonConformalCouples
|
||||
{
|
||||
fan
|
||||
{
|
||||
owner
|
||||
{
|
||||
patch fan0;
|
||||
|
||||
patchFields
|
||||
{
|
||||
p
|
||||
{
|
||||
type fanPressureJump;
|
||||
patchType nonConformalCyclic;
|
||||
jump uniform 0;
|
||||
value uniform 0;
|
||||
jumpTable polynomial 1((100 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
neighbour
|
||||
{
|
||||
patch fan1;
|
||||
|
||||
patchFields
|
||||
{
|
||||
$../../owner/patchFields;
|
||||
}
|
||||
}
|
||||
|
||||
transform none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -17,52 +17,28 @@ FoamFile
|
||||
actions
|
||||
(
|
||||
{
|
||||
name cyclicFacesFaceSet;
|
||||
type faceSet;
|
||||
action new;
|
||||
source boxToFace;
|
||||
box (0.099 -0.006 0.004)(0.101 0.006 0.016);
|
||||
}
|
||||
|
||||
{
|
||||
name cyclicFacesSlaveCells;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
box (-10 -10 -10)(0.1 10 10);
|
||||
}
|
||||
|
||||
{
|
||||
name cyclicFaces;
|
||||
name baffle;
|
||||
type faceZoneSet;
|
||||
action new;
|
||||
source setsToFaceZone;
|
||||
faceSet cyclicFacesFaceSet;
|
||||
cellSet cyclicFacesSlaveCells;
|
||||
source planeToFaceZone;
|
||||
point (0.1 0 0);
|
||||
normal (1 0 0);
|
||||
}
|
||||
|
||||
{
|
||||
name baffleFaceSet;
|
||||
type faceSet;
|
||||
name fan;
|
||||
type faceZoneSet;
|
||||
action new;
|
||||
source boxToFace;
|
||||
box (0.099 -10 -10)(0.101 10 10);
|
||||
source searchableSurfaceToFaceZone;
|
||||
surface searchablePlate;
|
||||
origin (0.1 -0.006 0.004);
|
||||
span (0 0.012 0.012);
|
||||
}
|
||||
|
||||
{
|
||||
name baffleFaceSet;
|
||||
type faceSet;
|
||||
name baffle;
|
||||
type faceZoneSet;
|
||||
action delete;
|
||||
source boxToFace;
|
||||
box (0.099 -0.006 0.004)(0.101 0.006 0.016);
|
||||
}
|
||||
|
||||
{
|
||||
name baffleFaces;
|
||||
type faceZoneSet;
|
||||
action new;
|
||||
source setToFaceZone;
|
||||
faceSet baffleFaceSet;
|
||||
source faceZoneToFaceZone;
|
||||
zone fan;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user