Changes to Hydro-Quebec PyFoam Scripts to account for new mixing plane syntax
This commit is contained in:
parent
a9d751b5f3
commit
ae8aad4588
3 changed files with 27 additions and 16 deletions
|
@ -33,6 +33,11 @@ Change MixingPlane boundary condition parameters
|
||||||
dest="shadowPatch",
|
dest="shadowPatch",
|
||||||
default=None,
|
default=None,
|
||||||
help='Name of the shadowPatch')
|
help='Name of the shadowPatch')
|
||||||
|
self.parser.add_option("--zone",
|
||||||
|
action="store",
|
||||||
|
dest="zone",
|
||||||
|
default=None,
|
||||||
|
help='Name of the zone for mixingPlanePatch')
|
||||||
self.parser.add_option("--coordinateSystemName",
|
self.parser.add_option("--coordinateSystemName",
|
||||||
action="store",
|
action="store",
|
||||||
dest="coordinateSystemName",
|
dest="coordinateSystemName",
|
||||||
|
@ -68,11 +73,11 @@ Change MixingPlane boundary condition parameters
|
||||||
dest="ribbonPatchStackAxis",
|
dest="ribbonPatchStackAxis",
|
||||||
default=None,
|
default=None,
|
||||||
help='ribbonPatch stackAxis (X|Y|Z|R|Theta')
|
help='ribbonPatch stackAxis (X|Y|Z|R|Theta')
|
||||||
self.parser.add_option("--ribbonPatchDiscretization",
|
self.parser.add_option("--ribbonPatchDiscretisation",
|
||||||
action="store",
|
action="store",
|
||||||
dest="ribbonPatchDiscretization",
|
dest="ribbonPatchDiscretisation",
|
||||||
default=None,
|
default=None,
|
||||||
help='ribbonPatch discretization (masterPatch|slavePatch|bothPatches|uniform|userDefined)')
|
help='ribbonPatch discretisation (masterPatch|slavePatch|bothPatches|uniform|userDefined)')
|
||||||
|
|
||||||
self.parser.add_option("--test",
|
self.parser.add_option("--test",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
|
@ -102,6 +107,9 @@ Change MixingPlane boundary condition parameters
|
||||||
if self.parser.getOptions().shadowPatch!=None:
|
if self.parser.getOptions().shadowPatch!=None:
|
||||||
val["shadowPatch"]=self.parser.getOptions().shadowPatch
|
val["shadowPatch"]=self.parser.getOptions().shadowPatch
|
||||||
|
|
||||||
|
if self.parser.getOptions().zone!=None:
|
||||||
|
val["zone"]=self.parser.getOptions().zone
|
||||||
|
|
||||||
if val.has_key("coordinateSystem")==False:
|
if val.has_key("coordinateSystem")==False:
|
||||||
val["coordinateSystem"]={}
|
val["coordinateSystem"]={}
|
||||||
|
|
||||||
|
@ -129,8 +137,8 @@ Change MixingPlane boundary condition parameters
|
||||||
if self.parser.getOptions().ribbonPatchStackAxis!=None:
|
if self.parser.getOptions().ribbonPatchStackAxis!=None:
|
||||||
val["ribbonPatch"]["stackAxis"]=self.parser.getOptions().ribbonPatchStackAxis
|
val["ribbonPatch"]["stackAxis"]=self.parser.getOptions().ribbonPatchStackAxis
|
||||||
|
|
||||||
if self.parser.getOptions().ribbonPatchDiscretization!=None:
|
if self.parser.getOptions().ribbonPatchDiscretisation!=None:
|
||||||
val["ribbonPatch"]["discretization"]=self.parser.getOptions().ribbonPatchDiscretization
|
val["ribbonPatch"]["discretisation"]=self.parser.getOptions().ribbonPatchDiscretisation
|
||||||
|
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
|
@ -118,21 +118,24 @@ Change MixingPlane boundary condition parameters
|
||||||
|
|
||||||
if bnd[indexDefPatch].has_key("ribbonPatch")==False:
|
if bnd[indexDefPatch].has_key("ribbonPatch")==False:
|
||||||
bnd[indexDefPatch]["ribbonPatch"]={}
|
bnd[indexDefPatch]["ribbonPatch"]={}
|
||||||
|
|
||||||
|
if bnd[indexDefPatch].has_key("zone")==False:
|
||||||
|
bnd[indexDefPatch]["zone"]=bnd[index] + "Zone"
|
||||||
|
|
||||||
if oldAssembly != "":
|
if oldAssembly != "":
|
||||||
# Converting "assembly" to ribbonPatch/discretization
|
# Converting "assembly" to ribbonPatch/discretisation
|
||||||
for case in switch(oldAssembly):
|
for case in switch(oldAssembly):
|
||||||
if case('master'):
|
if case('master'):
|
||||||
bnd[indexDefPatch]["ribbonPatch"]["discretization"]="masterPatch"
|
bnd[indexDefPatch]["ribbonPatch"]["discretisation"]="masterPatch"
|
||||||
break
|
break
|
||||||
if case('slave'):
|
if case('slave'):
|
||||||
bnd[indexDefPatch]["ribbonPatch"]["discretization"]="slavePatch"
|
bnd[indexDefPatch]["ribbonPatch"]["discretisation"]="slavePatch"
|
||||||
break
|
break
|
||||||
if case('both'):
|
if case('both'):
|
||||||
bnd[indexDefPatch]["ribbonPatch"]["discretization"]="bothPatches"
|
bnd[indexDefPatch]["ribbonPatch"]["discretisation"]="bothPatches"
|
||||||
break
|
break
|
||||||
if case('userdefined'):
|
if case('userdefined'):
|
||||||
bnd[indexDefPatch]["ribbonPatch"]["discretization"]="userDefined"
|
bnd[indexDefPatch]["ribbonPatch"]["discretisation"]="userDefined"
|
||||||
break
|
break
|
||||||
if case(): # default
|
if case(): # default
|
||||||
print "Unsupported assembly type: ", oldAssembly
|
print "Unsupported assembly type: ", oldAssembly
|
||||||
|
|
|
@ -72,11 +72,11 @@ Init MixingPlane boundary condition parameters
|
||||||
dest="ribbonPatchStackAxis",
|
dest="ribbonPatchStackAxis",
|
||||||
default=None,
|
default=None,
|
||||||
help='ribbonPatch stackAxis (X|Y|Z|R|Theta')
|
help='ribbonPatch stackAxis (X|Y|Z|R|Theta')
|
||||||
self.parser.add_option("--ribbonPatchDiscretization",
|
self.parser.add_option("--ribbonPatchDiscretisation",
|
||||||
action="store",
|
action="store",
|
||||||
dest="ribbonPatchDiscretization",
|
dest="ribbonPatchDiscretisation",
|
||||||
default=None,
|
default=None,
|
||||||
help='ribbonPatch discretization (masterPatch|slavePatch|bothPatches|uniform|userDefined)')
|
help='ribbonPatch discretisation (masterPatch|slavePatch|bothPatches|uniform|userDefined)')
|
||||||
|
|
||||||
self.parser.add_option("--timeDirs",
|
self.parser.add_option("--timeDirs",
|
||||||
action="store",
|
action="store",
|
||||||
|
@ -111,7 +111,7 @@ the current definition
|
||||||
'ribbonPatch' : {
|
'ribbonPatch' : {
|
||||||
'sweepAxis' : 'Theta',
|
'sweepAxis' : 'Theta',
|
||||||
'stackAxis' : 'Z',
|
'stackAxis' : 'Z',
|
||||||
'discretization' : 'bothPatches',
|
'discretisation' : 'bothPatches',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return newPatch
|
return newPatch
|
||||||
|
@ -151,8 +151,8 @@ Modify the definition of a mixingPlane patch
|
||||||
if self.parser.getOptions().ribbonPatchStackAxis!=None:
|
if self.parser.getOptions().ribbonPatchStackAxis!=None:
|
||||||
patch["ribbonPatch"]["stackAxis"]=self.parser.getOptions().ribbonPatchStackAxis
|
patch["ribbonPatch"]["stackAxis"]=self.parser.getOptions().ribbonPatchStackAxis
|
||||||
|
|
||||||
if self.parser.getOptions().ribbonPatchDiscretization!=None:
|
if self.parser.getOptions().ribbonPatchDiscretisation!=None:
|
||||||
patch["ribbonPatch"]["discretization"]=self.parser.getOptions().ribbonPatchDiscretization
|
patch["ribbonPatch"]["discretisation"]=self.parser.getOptions().ribbonPatchDiscretisation
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in a new issue