New PyFoam scripts for modifying GGI and mixingPlane interfaces definitions in the 'boundary' dictionary. Adjustement to the mixingPlane tutorials
This commit is contained in:
parent
82c2eb53ea
commit
5f2900413d
40 changed files with 1037 additions and 500 deletions
68
ThirdParty/AllMake.stage6
vendored
Executable file
68
ThirdParty/AllMake.stage6
vendored
Executable file
|
@ -0,0 +1,68 @@
|
|||
#!/bin/bash
|
||||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright held by original author
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
#
|
||||
# OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Script
|
||||
# AllMake.stage6
|
||||
#
|
||||
# Description
|
||||
# Build script for ThirdParty packages located under LocalDev
|
||||
#
|
||||
#
|
||||
# Requirements:
|
||||
# 1: Your OpenFOAM environment must be properly initialized
|
||||
#
|
||||
# Author:
|
||||
# Martin Beaudoin, Hydro-Quebec, (2012)
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
# run from Third-party directory only
|
||||
cd ${0%/*} || exit 1
|
||||
|
||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
||||
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
||||
echo " The environment variables are inconsistent with the installation."
|
||||
echo " Check the OpenFOAM entries in your dot-files and source them."
|
||||
exit 1
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
echo "========================================"
|
||||
echo "Starting ThirdParty AllMake: Stage6 "
|
||||
echo "========================================"
|
||||
echo
|
||||
|
||||
# Local developments from Hydro-Quebec (Turbomachinery)
|
||||
# Temporary solution until we find a more suitable place
|
||||
# for this. MB
|
||||
(cd ./LocalDev/Hydro-Quebec/PyFoam; ./AllMake)
|
||||
|
||||
echo "========================================"
|
||||
echo "Done ThirdParty AllMake: Stage6 "
|
||||
echo "========================================"
|
||||
echo
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
|
73
ThirdParty/LocalDev/Hydro-Quebec/PyFoam/AllMake
vendored
Executable file
73
ThirdParty/LocalDev/Hydro-Quebec/PyFoam/AllMake
vendored
Executable file
|
@ -0,0 +1,73 @@
|
|||
#!/bin/bash
|
||||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright held by original author
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
#
|
||||
# OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Script
|
||||
# AllMake
|
||||
#
|
||||
# Description
|
||||
# Installation script for local development
|
||||
#
|
||||
# Author:
|
||||
# Martin Beaudoin, Hydro-Quebec, (2012)
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
command -v python -V >/dev/null
|
||||
if [ ! $? -eq 0 ];
|
||||
then
|
||||
echo "Error: You need to install python in order to run these PyFoam scripts"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [ -z "$PYFOAM_DIR" ]
|
||||
then
|
||||
echo "Error: Missing environment variable \$PYFOAM_DIR."
|
||||
echo " Please execute the script ThirdParty/AllMake.stage5 to install PyFoam."
|
||||
echo " Then, make sure to freshen your OpenFOAM environment by sourcing your main"
|
||||
echo " OpenFOAM configuration file."
|
||||
exit -1
|
||||
fi
|
||||
|
||||
pythonVersion=$(python -V 2>&1 | awk -F ' ' {'print $2'} | awk -F \. {'print $1 "." $2'})
|
||||
|
||||
set -x
|
||||
|
||||
# pyFoamChangeMixingPlaneBoundary.py
|
||||
cp pyFoamChangeMixingPlaneBoundary.py $PYFOAM_DIR/bin
|
||||
cp ChangeMixingPlaneBoundary.py $PYFOAM_DIR/lib/python$pythonVersion/site-packages/PyFoam/Applications
|
||||
|
||||
# pyFoamChangeGGIBoundary.py
|
||||
# Same as pyFoamModifyGGIBoundary.py. We just harmonize the name with rest of PyFoam
|
||||
cp pyFoamChangeGGIBoundary.py $PYFOAM_DIR/bin
|
||||
cp ChangeGGIBoundary.py $PYFOAM_DIR/lib/python$pythonVersion/site-packages/PyFoam/Applications
|
||||
|
||||
set +x
|
||||
echo ========================================
|
||||
echo Done
|
||||
echo ========================================
|
||||
echo
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
|
156
ThirdParty/LocalDev/Hydro-Quebec/PyFoam/ChangeGGIBoundary.py
vendored
Normal file
156
ThirdParty/LocalDev/Hydro-Quebec/PyFoam/ChangeGGIBoundary.py
vendored
Normal file
|
@ -0,0 +1,156 @@
|
|||
"""
|
||||
Application-class that implements pyFoamChangeGGIBoundary.py
|
||||
|
||||
Modification of GGI and cyclicGGI interface parameters in
|
||||
constant/polymesh/boundary file.
|
||||
|
||||
Author:
|
||||
Martin Beaudoin, Hydro-Quebec, 2009. All rights reserved
|
||||
|
||||
"""
|
||||
|
||||
from PyFoamApplication import PyFoamApplication
|
||||
from PyFoam.RunDictionary.ParsedParameterFile import ParsedParameterFile
|
||||
from os import path
|
||||
import sys
|
||||
import re
|
||||
|
||||
class ChangeGGIBoundary(PyFoamApplication):
|
||||
def __init__(self,args=None):
|
||||
description="""\
|
||||
Change GGI boundary condition parameters
|
||||
"""
|
||||
PyFoamApplication.__init__(self,
|
||||
args=args,
|
||||
description=description,
|
||||
usage="%prog <caseDirectory> ggiPatchName",
|
||||
interspersed=True,
|
||||
changeVersion=False,
|
||||
nr=2)
|
||||
|
||||
def addOptions(self):
|
||||
self.parser.add_option("--shadowPatch",
|
||||
action="store",
|
||||
dest="shadowPatch",
|
||||
default=None,
|
||||
help='Name of the shadowPatch')
|
||||
self.parser.add_option("--shadowName",
|
||||
action="store",
|
||||
dest="shadowName",
|
||||
default=None,
|
||||
help='Name of the shadowPatch. Deprecated. Use --shadowPatch instead')
|
||||
self.parser.add_option("--zone",
|
||||
action="store",
|
||||
dest="zone",
|
||||
default=None,
|
||||
help='Name of the zone for the GGI patch')
|
||||
self.parser.add_option("--patchZoneName",
|
||||
action="store",
|
||||
dest="patchZoneName",
|
||||
default=None,
|
||||
help='Name of the zone for the GGI patch. Deprecated. Use --zone instead')
|
||||
self.parser.add_option("--bridgeOverlap",
|
||||
action="store",
|
||||
dest="bridgeOverlap",
|
||||
default=None,
|
||||
help='bridgeOverlap flag (on/off)')
|
||||
self.parser.add_option("--bridgeOverlapFlag",
|
||||
action="store",
|
||||
dest="bridgeOverlapFlag",
|
||||
default=None,
|
||||
help='bridgeOverlap flag (on/off). Deprecated. Use --bridgeOverlap instead')
|
||||
self.parser.add_option("--rotationAxis",
|
||||
action="store",
|
||||
dest="rotationAxis",
|
||||
default=None,
|
||||
help='rotation axis for cyclicGgi')
|
||||
self.parser.add_option("--rotationAngle",
|
||||
action="store",
|
||||
dest="rotationAngle",
|
||||
default=None,
|
||||
help='rotation axis angle for cyclicGgi')
|
||||
self.parser.add_option("--separationOffset",
|
||||
action="store",
|
||||
dest="separationOffset",
|
||||
default=None,
|
||||
help='separation offset for cyclicGgi')
|
||||
|
||||
self.parser.add_option("--test",
|
||||
action="store_true",
|
||||
default=False,
|
||||
dest="test",
|
||||
help="Only print the new boundary file")
|
||||
|
||||
def run(self):
|
||||
fName=self.parser.getArgs()[0]
|
||||
bName=self.parser.getArgs()[1]
|
||||
|
||||
boundary=ParsedParameterFile(path.join(".",fName,"constant","polyMesh","boundary"),debug=False,boundaryDict=True)
|
||||
|
||||
bnd=boundary.content
|
||||
|
||||
if type(bnd)!=list:
|
||||
self.error("Problem with boundary file (not a list)")
|
||||
|
||||
found=False
|
||||
|
||||
for val in bnd:
|
||||
if val==bName:
|
||||
found=True
|
||||
elif found:
|
||||
bcType=val["type"]
|
||||
if re.match("cyclicGgi", bcType)!= None or re.match("ggi", bcType)!= None:
|
||||
if self.parser.getOptions().shadowPatch!=None:
|
||||
shadowPatch=self.parser.getOptions().shadowPatch
|
||||
val["shadowPatch"]=shadowPatch
|
||||
if shadowPatch not in bnd:
|
||||
self.error("\n Option --shadowPatch for patch:",bName,": there is no patch called",shadowPatch,"\n")
|
||||
|
||||
if self.parser.getOptions().zone!=None:
|
||||
val["zone"]=self.parser.getOptions().zone
|
||||
|
||||
if self.parser.getOptions().bridgeOverlap!=None:
|
||||
val["bridgeOverlap"]=self.parser.getOptions().bridgeOverlap
|
||||
|
||||
if val["type"]=="cyclicGgi":
|
||||
if self.parser.getOptions().rotationAxis!=None:
|
||||
val["rotationAxis"]=self.parser.getOptions().rotationAxis
|
||||
|
||||
if self.parser.getOptions().rotationAngle!=None:
|
||||
val["rotationAngle"]=self.parser.getOptions().rotationAngle
|
||||
|
||||
if self.parser.getOptions().separationOffset!=None:
|
||||
val["separationOffset"]=self.parser.getOptions().separationOffset
|
||||
|
||||
|
||||
# Deprecated
|
||||
if self.parser.getOptions().shadowName!=None:
|
||||
self.warning("\n PatchName:",bName,": Option --shadowName is deprecated. Use --shadowPatch instead\n")
|
||||
shadowName=self.parser.getOptions().shadowName
|
||||
val["shadowPatch"]=shadowName
|
||||
if shadowName not in bnd:
|
||||
self.error("\n Option --shadowName for patch:",bName,": there is no patch called",shadowName,"\n")
|
||||
|
||||
# Deprecated
|
||||
if self.parser.getOptions().patchZoneName!=None:
|
||||
self.warning("\n PatchName:",bName,": Option --patchZoneName is deprecated. Use --zone instead\n")
|
||||
val["zone"]=self.parser.getOptions().patchZoneName
|
||||
|
||||
# Deprecated
|
||||
if self.parser.getOptions().bridgeOverlapFlag!=None:
|
||||
self.warning("\n PatchName:",bName,": Option --bridgeOverlapFlag is deprecated. Use --bridgeOverlap instead\n")
|
||||
val["bridgeOverlap"]=self.parser.getOptions().bridgeOverlapFlag
|
||||
|
||||
|
||||
else:
|
||||
print "Unsupported GGI type '",bcType,"' for patch",bName
|
||||
break
|
||||
|
||||
if not found:
|
||||
self.error("Boundary",bName,"not found in",bnd[::2])
|
||||
|
||||
if self.parser.getOptions().test:
|
||||
print boundary
|
||||
else:
|
||||
boundary.writeFile()
|
||||
|
139
ThirdParty/LocalDev/Hydro-Quebec/PyFoam/ChangeMixingPlaneBoundary.py
vendored
Normal file
139
ThirdParty/LocalDev/Hydro-Quebec/PyFoam/ChangeMixingPlaneBoundary.py
vendored
Normal file
|
@ -0,0 +1,139 @@
|
|||
"""
|
||||
Application-class that implements pyFoamChangeMixingPlaneBoundary.py
|
||||
|
||||
Change various mixingPlane interface attributes in
|
||||
constant/polymesh/boundary file.
|
||||
|
||||
Author:
|
||||
Martin Beaudoin, Hydro-Quebec, 2012. All rights reserved
|
||||
|
||||
"""
|
||||
|
||||
from PyFoamApplication import PyFoamApplication
|
||||
from PyFoam.RunDictionary.ParsedParameterFile import ParsedParameterFile
|
||||
from os import path
|
||||
import sys
|
||||
|
||||
class ChangeMixingPlaneBoundary(PyFoamApplication):
|
||||
def __init__(self,args=None):
|
||||
description="""
|
||||
Change MixingPlane boundary condition parameters
|
||||
"""
|
||||
PyFoamApplication.__init__(self,
|
||||
args=args,
|
||||
description=description,
|
||||
usage="%prog <caseDirectory> mixingPlanePatchName",
|
||||
interspersed=True,
|
||||
changeVersion=False,
|
||||
nr=2)
|
||||
|
||||
def addOptions(self):
|
||||
self.parser.add_option("--shadowPatch",
|
||||
action="store",
|
||||
dest="shadowPatch",
|
||||
default=None,
|
||||
help='Name of the shadowPatch')
|
||||
self.parser.add_option("--coordinateSystemName",
|
||||
action="store",
|
||||
dest="coordinateSystemName",
|
||||
default="mixingCS",
|
||||
help='coordinateSystemName (mixingCS)')
|
||||
self.parser.add_option("--coordinateSystemType",
|
||||
action="store",
|
||||
dest="coordinateSystemType",
|
||||
default=None,
|
||||
help='coordinateSystemType (cyindrical/spherical)')
|
||||
self.parser.add_option("--coordinateSystemOrigin",
|
||||
action="store",
|
||||
dest="coordinateSystemOrigin",
|
||||
default=None,
|
||||
help='origin for coordinate system of mixingPlane')
|
||||
self.parser.add_option("--coordinateSystemE1",
|
||||
action="store",
|
||||
dest="coordinateSystemE1",
|
||||
default=None,
|
||||
help='axis E1 for coordinate system of mixingPlane')
|
||||
self.parser.add_option("--coordinateSystemE3",
|
||||
action="store",
|
||||
dest="coordinateSystemE3",
|
||||
default=None,
|
||||
help='axis E3 for coordinate system of mixingPlane')
|
||||
self.parser.add_option("--assembly",
|
||||
action="store",
|
||||
dest="assembly",
|
||||
default=None,
|
||||
help='Assembly (master|slave|both|userdefined')
|
||||
self.parser.add_option("--orientation",
|
||||
action="store",
|
||||
dest="orientation",
|
||||
default=None,
|
||||
help='Orientation of profile (\
|
||||
dirX_spanY| \
|
||||
dirX_spanZ|dirY_spanX|dirY_spanZ|dirZ_spanX|dirZ_spanY|dirR_spanTheta|dirR_spanZ|dirTheta_spanZ|dirTheta_spanR|dirZ_spanTheta|dirZ_spanR|unknown)')
|
||||
|
||||
self.parser.add_option("--test",
|
||||
action="store_true",
|
||||
default=False,
|
||||
dest="test",
|
||||
help="Only print the new boundary file")
|
||||
|
||||
def run(self):
|
||||
fName=self.parser.getArgs()[0]
|
||||
bName=self.parser.getArgs()[1]
|
||||
|
||||
boundary=ParsedParameterFile(path.join(".",fName,"constant","polyMesh","boundary"),debug=False,boundaryDict=True)
|
||||
|
||||
bnd=boundary.content
|
||||
|
||||
if type(bnd)!=list:
|
||||
print "Problem with boundary file (not a list)"
|
||||
sys.exit(-1)
|
||||
|
||||
found=False
|
||||
|
||||
for val in bnd:
|
||||
if val==bName:
|
||||
found=True
|
||||
elif found:
|
||||
if val["type"]=="mixingPlane":
|
||||
if self.parser.getOptions().shadowPatch!=None:
|
||||
val["shadowPatch"]=self.parser.getOptions().shadowPatch
|
||||
|
||||
if self.parser.getOptions().orientation!=None:
|
||||
val["orientation"]=self.parser.getOptions().orientation
|
||||
|
||||
if val.has_key("coordinateSystem")==False:
|
||||
val["coordinateSystem"]={}
|
||||
|
||||
if self.parser.getOptions().coordinateSystemName!=None:
|
||||
val["coordinateSystem"]["name"]=self.parser.getOptions().coordinateSystemName
|
||||
|
||||
if self.parser.getOptions().coordinateSystemType!=None:
|
||||
val["coordinateSystem"]["type"]=self.parser.getOptions().coordinateSystemType
|
||||
|
||||
if self.parser.getOptions().coordinateSystemOrigin!=None:
|
||||
val["coordinateSystem"]["origin"]=self.parser.getOptions().coordinateSystemOrigin
|
||||
|
||||
if self.parser.getOptions().coordinateSystemE1!=None:
|
||||
val["coordinateSystem"]["e1"]=self.parser.getOptions().coordinateSystemE1
|
||||
|
||||
if self.parser.getOptions().coordinateSystemE3!=None:
|
||||
val["coordinateSystem"]["e3"]=self.parser.getOptions().coordinateSystemE3
|
||||
|
||||
if self.parser.getOptions().assembly!=None:
|
||||
val["assembly"]=self.parser.getOptions().assembly
|
||||
|
||||
if self.parser.getOptions().orientation!=None:
|
||||
val["orientation"]=self.parser.getOptions().orientation
|
||||
|
||||
break
|
||||
|
||||
if not found:
|
||||
print "Boundary",bName,"not found in",bnd[::2]
|
||||
sys.exit(-1)
|
||||
|
||||
if self.parser.getOptions().test:
|
||||
print boundary
|
||||
else:
|
||||
boundary.writeFile()
|
||||
|
6
ThirdParty/LocalDev/Hydro-Quebec/PyFoam/Readme.txt
vendored
Normal file
6
ThirdParty/LocalDev/Hydro-Quebec/PyFoam/Readme.txt
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
PyFoam scripts for handling GGI and mixingPlane cases.
|
||||
|
||||
--
|
||||
Martin Beaudoin
|
||||
Hydro-Quebec
|
||||
April 2012
|
5
ThirdParty/LocalDev/Hydro-Quebec/PyFoam/pyFoamChangeGGIBoundary.py
vendored
Executable file
5
ThirdParty/LocalDev/Hydro-Quebec/PyFoam/pyFoamChangeGGIBoundary.py
vendored
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from PyFoam.Applications.ChangeGGIBoundary import ChangeGGIBoundary
|
||||
|
||||
ChangeGGIBoundary()
|
5
ThirdParty/LocalDev/Hydro-Quebec/PyFoam/pyFoamChangeMixingPlaneBoundary.py
vendored
Executable file
5
ThirdParty/LocalDev/Hydro-Quebec/PyFoam/pyFoamChangeMixingPlaneBoundary.py
vendored
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from PyFoam.Applications.ChangeMixingPlaneBoundary import ChangeMixingPlaneBoundary
|
||||
|
||||
ChangeMixingPlaneBoundary()
|
13
ThirdParty/LocalDev/Readme.txt
vendored
Normal file
13
ThirdParty/LocalDev/Readme.txt
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
This directory contains ThirdParty developments specific to the mixingPlane_RC1 branch.
|
||||
Those developments might eventually find a more suitable home elsewhere.
|
||||
|
||||
Instead of spreading these developments around in various repositories, I find
|
||||
it more convenient to regroup them under this directory.
|
||||
|
||||
So expect this ThirdParty/LocalDev directory to disappear eventually, once its
|
||||
content will prove it usefulness.
|
||||
|
||||
--
|
||||
Martin Beaudoin
|
||||
Hydro-Quebec
|
||||
April 2012
|
|
@ -10,7 +10,7 @@
|
|||
export caseName=`basename $PWD`
|
||||
|
||||
#We stop this script when we encounter a problem
|
||||
trap "exit -1" ERR
|
||||
#trap "exit -1" ERR
|
||||
|
||||
echo "$caseName: Creating the file blockMeshDict using m4"
|
||||
(cd constant/polyMesh; m4 -P blockMeshDict.m4 > blockMeshDict)
|
||||
|
@ -18,38 +18,48 @@ echo "$caseName: Creating the file blockMeshDict using m4"
|
|||
echo "$caseName: Running blockMesh"
|
||||
runApplicationAndReportOnError blockMesh
|
||||
|
||||
echo "$caseName: Updating the boundary file"
|
||||
#if not using PyFOAM, use this pre-configured boundary file
|
||||
echo "$caseName: Updating the GGI and mixingPlane interfaces parameters"
|
||||
|
||||
# Let's see if pyFoamChangeMixingPlaneBoundary.py is available
|
||||
command -v pyFoamChangeMixingPlaneBoundary.py >/dev/null
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "Using pyFoamChangeMixingPlaneBoundary.py"
|
||||
pyFoamChangeMixingPlaneBoundary.py . B_UPSTREAM \
|
||||
--shadowPatch B_DOWNSTREAM \
|
||||
--coordinateSystemType cylindrical \
|
||||
--coordinateSystemOrigin "(0 0 0)" \
|
||||
--coordinateSystemE1 "(1 0 0)" \
|
||||
--coordinateSystemE3 "(0 0 1)" \
|
||||
--assembly both \
|
||||
--orientation dirR_spanTheta
|
||||
|
||||
pyFoamChangeMixingPlaneBoundary.py . B_DOWNSTREAM \
|
||||
--shadowPatch B_UPSTREAM \
|
||||
--coordinateSystemType cylindrical \
|
||||
--coordinateSystemOrigin "(0 0 0)" \
|
||||
--coordinateSystemE1 "(1 0 0)" \
|
||||
--coordinateSystemE3 "(0 0 1)" \
|
||||
--assembly both \
|
||||
--orientation dirR_spanTheta
|
||||
|
||||
echo "Using pyFoamChangeGGIBoundary.py"
|
||||
pyFoamChangeGGIBoundary.py . sideWallA_BB_cyclic1 \
|
||||
--shadowPatch sideWallA_BB_cyclic2 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle 60 \
|
||||
--zone sideWallA_BB_cyclic1Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallA_BB_cyclic2 \
|
||||
--shadowPatch sideWallA_BB_cyclic1 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle -60 \
|
||||
--zone sideWallA_BB_cyclic2Zone
|
||||
|
||||
else
|
||||
echo "pyFoamChangeMixingPlaneBoundary.py is missing. Using the file constant/polyMesh/boundary.preconfigured"
|
||||
cp constant/polyMesh/boundary.preconfigured constant/polyMesh/boundary
|
||||
|
||||
# if using PyFOAM, use these commands instead
|
||||
# pyFoamModifyMixingPlaneBoundary.py . B_UPSTREAM \
|
||||
# --shadowName B_DOWNSTREAM \
|
||||
# --profileType radial \
|
||||
# --coordinateSystemType cylindrical \
|
||||
# --coordinateSystemOrigin "(0 0 0)" \
|
||||
# --coordinateSystemAxis "(0 0 1)" \
|
||||
# --coordinateSystemDirection "(1 0 0)"
|
||||
|
||||
# pyFoamModifyMixingPlaneBoundary.py . B_DOWNSTREAM \
|
||||
# --shadowName B_UPSTREAM \
|
||||
# --profileType radial \
|
||||
# --coordinateSystemType cylindrical \
|
||||
# --coordinateSystemOrigin "(0 0 0)" \
|
||||
# --coordinateSystemAxis "(0 0 1)" \
|
||||
# --coordinateSystemDirection "(1 0 0)"
|
||||
|
||||
# pyFoamModifyGGIBoundary.py . sideWallA_BB_cyclic1 \
|
||||
# --shadowName sideWallA_BB_cyclic2 \
|
||||
# --rotationAxis "(0 0 1)" \
|
||||
# --patchZoneName sideWallA_BB_cyclic1Zone \
|
||||
# --rotationAngle 60
|
||||
|
||||
# pyFoamModifyGGIBoundary.py . sideWallA_BB_cyclic2 \
|
||||
# --shadowName sideWallA_BB_cyclic1 \
|
||||
# --rotationAxis "(0 0 1)" \
|
||||
# --patchZoneName sideWallA_BB_cyclic2Zone \
|
||||
# --rotationAngle -60
|
||||
fi
|
||||
|
||||
echo "$caseName: Creating the starting time directory"
|
||||
cp -r 0_orig 0
|
||||
|
|
|
@ -5,6 +5,11 @@
|
|||
|
||||
#set -x
|
||||
|
||||
cleanBoundary ()
|
||||
{
|
||||
rm -f ./constant/polyMesh/boundary > /dev/null 2>&1
|
||||
}
|
||||
|
||||
cleanTimeZero ()
|
||||
{
|
||||
rm -rf 0 > /dev/null 2>&1
|
||||
|
@ -22,6 +27,7 @@ cleanVTK ()
|
|||
|
||||
# Cleaning up the case
|
||||
cleanCase
|
||||
cleanBoundary
|
||||
cleanTimeZero
|
||||
cleanPyFoam
|
||||
cleanVTK
|
||||
|
|
|
@ -10,14 +10,39 @@
|
|||
export caseName=`basename $PWD`
|
||||
|
||||
#We stop this script when we encounter a problem
|
||||
trap "exit -1" ERR
|
||||
#trap "exit -1" ERR
|
||||
|
||||
echo "$caseName: Running blockMesh"
|
||||
runApplicationAndReportOnError blockMesh
|
||||
|
||||
echo "$caseName: Updating the boundary file"
|
||||
#if not using PyFOAM, use this pre-configured boundary file
|
||||
# Let's see if pyFoamChangeMixingPlaneBoundary.py is available
|
||||
command -v pyFoamChangeMixingPlaneBoundary.py >/dev/null
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "Using pyFoamChangeMixingPlaneBoundary.py"
|
||||
pyFoamChangeMixingPlaneBoundary.py . mixpLeftOut \
|
||||
--shadowPatch mixpRightIn \
|
||||
--assembly both \
|
||||
--orientation dirY_spanZ \
|
||||
--coordinateSystemType coordinateSystem \
|
||||
--coordinateSystemOrigin "(0 0 0.005)" \
|
||||
--coordinateSystemE1 "(1 0 0)" \
|
||||
--coordinateSystemE3 "(0 0 1)"
|
||||
|
||||
pyFoamChangeMixingPlaneBoundary.py . mixpRightIn \
|
||||
--shadowPatch mixpLeftOut \
|
||||
--assembly both \
|
||||
--orientation dirY_spanZ \
|
||||
--coordinateSystemType coordinateSystem \
|
||||
--coordinateSystemOrigin "(0 0 0.005)" \
|
||||
--coordinateSystemE1 "(1 0 0)" \
|
||||
--coordinateSystemE3 "(0 0 1)"
|
||||
else
|
||||
echo "pyFoamChangeMixingPlaneBoundary.py is missing. Using the file constant/polyMesh/boundary.preconfigured"
|
||||
cp constant/polyMesh/boundary.preconfigured constant/polyMesh/boundary
|
||||
fi
|
||||
|
||||
|
||||
echo "$caseName: Creating the starting time directory"
|
||||
cp -r 0_orig 0
|
||||
|
|
|
@ -1,84 +0,0 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5-dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
7
|
||||
(
|
||||
top
|
||||
{
|
||||
type wall;
|
||||
nFaces 20;
|
||||
startFace 360;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type wall;
|
||||
nFaces 20;
|
||||
startFace 380;
|
||||
}
|
||||
leftIn
|
||||
{
|
||||
type patch;
|
||||
nFaces 10;
|
||||
startFace 400;
|
||||
}
|
||||
mixpLeftOut
|
||||
{
|
||||
type mixingPlane;
|
||||
nFaces 10;
|
||||
startFace 410;
|
||||
shadowPatch mixpRightIn;
|
||||
orientation dirY_spanZ;
|
||||
assembly both;
|
||||
coordinateSystem
|
||||
{
|
||||
type coordinateSystem;
|
||||
origin (0 0 0.005);
|
||||
axis (0 0 1);
|
||||
direction (1 0 0);
|
||||
}
|
||||
}
|
||||
mixpRightIn
|
||||
{
|
||||
type mixingPlane;
|
||||
nFaces 10;
|
||||
startFace 420;
|
||||
shadowPatch mixpLeftOut;
|
||||
orientation dirY_spanZ;
|
||||
assembly both;
|
||||
coordinateSystem
|
||||
{
|
||||
type coordinateSystem;
|
||||
origin (0 0 0.005);
|
||||
axis (0 0 1);
|
||||
direction (1 0 0);
|
||||
}
|
||||
}
|
||||
rightOut
|
||||
{
|
||||
type patch;
|
||||
nFaces 10;
|
||||
startFace 430;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
nFaces 400;
|
||||
startFace 440;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
|
@ -5,6 +5,11 @@
|
|||
|
||||
#set -x
|
||||
|
||||
cleanBoundary ()
|
||||
{
|
||||
rm -f ./constant/polyMesh/boundary > /dev/null 2>&1
|
||||
}
|
||||
|
||||
cleanTimeZero ()
|
||||
{
|
||||
rm -rf 0 > /dev/null 2>&1
|
||||
|
@ -22,6 +27,7 @@ cleanVTK ()
|
|||
|
||||
# Cleaning up the case
|
||||
cleanCase
|
||||
cleanBoundary
|
||||
cleanTimeZero
|
||||
cleanPyFoam
|
||||
cleanVTK
|
||||
|
|
|
@ -10,14 +10,39 @@
|
|||
export caseName=`basename $PWD`
|
||||
|
||||
#We stop this script when we encounter a problem
|
||||
trap "exit -1" ERR
|
||||
#trap "exit -1" ERR
|
||||
|
||||
echo "$caseName: Running blockMesh"
|
||||
runApplicationAndReportOnError blockMesh
|
||||
|
||||
echo "$caseName: Updating the boundary file"
|
||||
#if not using PyFOAM, use this pre-configured boundary file
|
||||
# Let's see if pyFoamChangeMixingPlaneBoundary.py is available
|
||||
command -v pyFoamChangeMixingPlaneBoundary.py >/dev/null
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "Using pyFoamChangeMixingPlaneBoundary.py"
|
||||
pyFoamChangeMixingPlaneBoundary.py . mixpLeftOut \
|
||||
--shadowPatch mixpRightIn \
|
||||
--assembly both \
|
||||
--orientation dirY_spanZ \
|
||||
--coordinateSystemType coordinateSystem \
|
||||
--coordinateSystemOrigin "(0 0 0.005)" \
|
||||
--coordinateSystemE1 "(1 0 0)" \
|
||||
--coordinateSystemE3 "(0 0 1)"
|
||||
|
||||
pyFoamChangeMixingPlaneBoundary.py . mixpRightIn \
|
||||
--shadowPatch mixpLeftOut \
|
||||
--assembly both \
|
||||
--orientation dirY_spanZ \
|
||||
--coordinateSystemType coordinateSystem \
|
||||
--coordinateSystemOrigin "(0 0 0.005)" \
|
||||
--coordinateSystemE1 "(1 0 0)" \
|
||||
--coordinateSystemE3 "(0 0 1)"
|
||||
else
|
||||
echo "pyFoamChangeMixingPlaneBoundary.py is missing. Using the file constant/polyMesh/boundary.preconfigured"
|
||||
cp constant/polyMesh/boundary.preconfigured constant/polyMesh/boundary
|
||||
fi
|
||||
|
||||
|
||||
echo "$caseName: Creating the starting time directory"
|
||||
cp -r 0_orig 0
|
||||
|
|
|
@ -1,84 +0,0 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
|
||||
| \\ / O peration | Version: 1.6-ext |
|
||||
| \\ / A nd | Web: www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
7
|
||||
(
|
||||
top
|
||||
{
|
||||
type wall;
|
||||
nFaces 20;
|
||||
startFace 227;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type wall;
|
||||
nFaces 20;
|
||||
startFace 247;
|
||||
}
|
||||
leftIn
|
||||
{
|
||||
type patch;
|
||||
nFaces 10;
|
||||
startFace 267;
|
||||
}
|
||||
mixpLeftOut
|
||||
{
|
||||
type mixingPlane;
|
||||
nFaces 10;
|
||||
startFace 277;
|
||||
shadowPatch mixpRightIn;
|
||||
orientation dirY_spanZ;
|
||||
assembly both;
|
||||
coordinateSystem
|
||||
{
|
||||
type coordinateSystem;
|
||||
origin (0 0 0.005);
|
||||
axis (0 0 1);
|
||||
direction (1 0 0);
|
||||
}
|
||||
}
|
||||
mixpRightIn
|
||||
{
|
||||
type mixingPlane;
|
||||
nFaces 3;
|
||||
startFace 287;
|
||||
shadowPatch mixpLeftOut;
|
||||
orientation dirY_spanZ;
|
||||
assembly both;
|
||||
coordinateSystem
|
||||
{
|
||||
type coordinateSystem;
|
||||
origin (0 0 0.005);
|
||||
axis (0 0 1);
|
||||
direction (1 0 0);
|
||||
}
|
||||
}
|
||||
rightOut
|
||||
{
|
||||
type patch;
|
||||
nFaces 3;
|
||||
startFace 290;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
nFaces 260;
|
||||
startFace 293;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
|
@ -5,6 +5,11 @@
|
|||
|
||||
#set -x
|
||||
|
||||
cleanBoundary ()
|
||||
{
|
||||
rm -f ./constant/polyMesh/boundary > /dev/null 2>&1
|
||||
}
|
||||
|
||||
cleanTimeZero ()
|
||||
{
|
||||
rm -rf 0 > /dev/null 2>&1
|
||||
|
@ -22,6 +27,7 @@ cleanVTK ()
|
|||
|
||||
# Cleaning up the case
|
||||
cleanCase
|
||||
cleanBoundary
|
||||
cleanTimeZero
|
||||
cleanPyFoam
|
||||
cleanVTK
|
||||
|
|
|
@ -10,13 +10,39 @@
|
|||
export caseName=`basename $PWD`
|
||||
|
||||
#We stop this script when we encounter a problem
|
||||
trap "exit -1" ERR
|
||||
#trap "exit -1" ERR
|
||||
|
||||
echo "$caseName: Running blockMesh"
|
||||
runApplicationAndReportOnError blockMesh
|
||||
|
||||
echo "$caseName: Updating the boundary file"
|
||||
# Let's see if pyFoamChangeMixingPlaneBoundary.py is available
|
||||
command -v pyFoamChangeMixingPlaneBoundary.py >/dev/null
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "Using pyFoamChangeMixingPlaneBoundary.py"
|
||||
pyFoamChangeMixingPlaneBoundary.py . mixpLeftOut \
|
||||
--shadowPatch mixpRightIn \
|
||||
--assembly both \
|
||||
--orientation dirY_spanZ \
|
||||
--coordinateSystemType coordinateSystem \
|
||||
--coordinateSystemOrigin "(0 0 0.005)" \
|
||||
--coordinateSystemE1 "(1 0 0)" \
|
||||
--coordinateSystemE3 "(0 0 1)"
|
||||
|
||||
pyFoamChangeMixingPlaneBoundary.py . mixpRightIn \
|
||||
--shadowPatch mixpLeftOut \
|
||||
--assembly both \
|
||||
--orientation dirY_spanZ \
|
||||
--coordinateSystemType coordinateSystem \
|
||||
--coordinateSystemOrigin "(0 0 0.005)" \
|
||||
--coordinateSystemE1 "(1 0 0)" \
|
||||
--coordinateSystemE3 "(0 0 1)"
|
||||
else
|
||||
echo "pyFoamChangeMixingPlaneBoundary.py is missing. Using the file constant/polyMesh/boundary.preconfigured"
|
||||
cp constant/polyMesh/boundary.preconfigured constant/polyMesh/boundary
|
||||
fi
|
||||
|
||||
|
||||
echo "$caseName: Creating the starting time directory"
|
||||
cp -r 0_orig 0
|
||||
|
|
|
@ -63,11 +63,11 @@ patches
|
|||
(
|
||||
(0 4 7 3)
|
||||
)
|
||||
patch mixpLeftOut
|
||||
mixingPlane mixpLeftOut
|
||||
(
|
||||
(2 6 5 1)
|
||||
)
|
||||
patch mixpRightIn
|
||||
mixingPlane mixpRightIn
|
||||
(
|
||||
(8 12 15 11)
|
||||
)
|
||||
|
|
|
@ -1,84 +0,0 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
|
||||
| \\ / O peration | Version: 1.6-ext |
|
||||
| \\ / A nd | Web: www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
7
|
||||
(
|
||||
top
|
||||
{
|
||||
type wall;
|
||||
nFaces 20;
|
||||
startFace 227;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type wall;
|
||||
nFaces 20;
|
||||
startFace 247;
|
||||
}
|
||||
leftIn
|
||||
{
|
||||
type patch;
|
||||
nFaces 10;
|
||||
startFace 267;
|
||||
}
|
||||
mixpLeftOut
|
||||
{
|
||||
type mixingPlane;
|
||||
nFaces 10;
|
||||
startFace 277;
|
||||
shadowPatch mixpRightIn;
|
||||
orientation dirY_spanZ;
|
||||
assembly both;
|
||||
coordinateSystem
|
||||
{
|
||||
type coordinateSystem;
|
||||
origin (0 0 0.005);
|
||||
axis (0 0 1);
|
||||
direction (1 0 0);
|
||||
}
|
||||
}
|
||||
mixpRightIn
|
||||
{
|
||||
type mixingPlane;
|
||||
nFaces 3;
|
||||
startFace 287;
|
||||
shadowPatch mixpLeftOut;
|
||||
orientation dirY_spanZ;
|
||||
assembly both;
|
||||
coordinateSystem
|
||||
{
|
||||
type coordinateSystem;
|
||||
origin (0 0 0.005);
|
||||
axis (0 0 1);
|
||||
direction (1 0 0);
|
||||
}
|
||||
}
|
||||
rightOut
|
||||
{
|
||||
type patch;
|
||||
nFaces 3;
|
||||
startFace 290;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
nFaces 260;
|
||||
startFace 293;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
|
@ -5,6 +5,11 @@
|
|||
|
||||
#set -x
|
||||
|
||||
cleanBoundary ()
|
||||
{
|
||||
rm -f ./constant/polyMesh/boundary > /dev/null 2>&1
|
||||
}
|
||||
|
||||
cleanTimeZero ()
|
||||
{
|
||||
rm -rf 0 > /dev/null 2>&1
|
||||
|
@ -22,6 +27,7 @@ cleanVTK ()
|
|||
|
||||
# Cleaning up the case
|
||||
cleanCase
|
||||
cleanBoundary
|
||||
cleanTimeZero
|
||||
cleanPyFoam
|
||||
cleanVTK
|
||||
|
|
|
@ -10,13 +10,39 @@
|
|||
export caseName=`basename $PWD`
|
||||
|
||||
#We stop this script when we encounter a problem
|
||||
trap "exit -1" ERR
|
||||
#trap "exit -1" ERR
|
||||
|
||||
echo "$caseName: Running blockMesh"
|
||||
runApplicationAndReportOnError blockMesh
|
||||
|
||||
echo "$caseName: Updating the boundary file"
|
||||
# Let's see if pyFoamChangeMixingPlaneBoundary.py is available
|
||||
command -v pyFoamChangeMixingPlaneBoundary.py >/dev/null
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "Using pyFoamChangeMixingPlaneBoundary.py"
|
||||
pyFoamChangeMixingPlaneBoundary.py . mixpLeftOut \
|
||||
--shadowPatch mixpRightIn \
|
||||
--assembly both \
|
||||
--orientation dirY_spanZ \
|
||||
--coordinateSystemType coordinateSystem \
|
||||
--coordinateSystemOrigin "(0 0 0.005)" \
|
||||
--coordinateSystemE1 "(1 0 0)" \
|
||||
--coordinateSystemE3 "(0 0 1)"
|
||||
|
||||
pyFoamChangeMixingPlaneBoundary.py . mixpRightIn \
|
||||
--shadowPatch mixpLeftOut \
|
||||
--assembly both \
|
||||
--orientation dirY_spanZ \
|
||||
--coordinateSystemType coordinateSystem \
|
||||
--coordinateSystemOrigin "(0 0 0.005)" \
|
||||
--coordinateSystemE1 "(1 0 0)" \
|
||||
--coordinateSystemE3 "(0 0 1)"
|
||||
else
|
||||
echo "pyFoamChangeMixingPlaneBoundary.py is missing. Using the file constant/polyMesh/boundary.preconfigured"
|
||||
cp constant/polyMesh/boundary.preconfigured constant/polyMesh/boundary
|
||||
fi
|
||||
|
||||
|
||||
echo "$caseName: Creating the starting time directory"
|
||||
cp -r 0_orig 0
|
||||
|
|
|
@ -63,11 +63,11 @@ patches
|
|||
(
|
||||
(0 4 7 3)
|
||||
)
|
||||
patch mixpLeftOut
|
||||
mixingPlane mixpLeftOut
|
||||
(
|
||||
(2 6 5 1)
|
||||
)
|
||||
patch mixpRightIn
|
||||
mixingPlane mixpRightIn
|
||||
(
|
||||
(8 12 15 11)
|
||||
)
|
||||
|
|
|
@ -1,84 +0,0 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5-dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
7
|
||||
(
|
||||
top
|
||||
{
|
||||
type wall;
|
||||
nFaces 20;
|
||||
startFace 360;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type wall;
|
||||
nFaces 20;
|
||||
startFace 380;
|
||||
}
|
||||
leftIn
|
||||
{
|
||||
type patch;
|
||||
nFaces 10;
|
||||
startFace 400;
|
||||
}
|
||||
mixpLeftOut
|
||||
{
|
||||
type mixingPlane;
|
||||
nFaces 10;
|
||||
startFace 410;
|
||||
shadowPatch mixpRightIn;
|
||||
orientation dirY_spanZ;
|
||||
assembly both;
|
||||
coordinateSystem
|
||||
{
|
||||
type coordinateSystem;
|
||||
origin (0 0 0.005);
|
||||
axis (0 0 1);
|
||||
direction (1 0 0);
|
||||
}
|
||||
}
|
||||
mixpRightIn
|
||||
{
|
||||
type mixingPlane;
|
||||
nFaces 10;
|
||||
startFace 420;
|
||||
shadowPatch mixpLeftOut;
|
||||
orientation dirY_spanZ;
|
||||
assembly both;
|
||||
coordinateSystem
|
||||
{
|
||||
type coordinateSystem;
|
||||
origin (0 0 0.005);
|
||||
axis (0 0 1);
|
||||
direction (1 0 0);
|
||||
}
|
||||
}
|
||||
rightOut
|
||||
{
|
||||
type patch;
|
||||
nFaces 10;
|
||||
startFace 430;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
nFaces 400;
|
||||
startFace 440;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
|
@ -5,6 +5,11 @@
|
|||
|
||||
#set -x
|
||||
|
||||
cleanBoundary ()
|
||||
{
|
||||
rm -f ./constant/polyMesh/boundary > /dev/null 2>&1
|
||||
}
|
||||
|
||||
cleanTimeZero ()
|
||||
{
|
||||
rm -rf 0 > /dev/null 2>&1
|
||||
|
@ -22,6 +27,7 @@ cleanVTK ()
|
|||
|
||||
# Cleaning up the case
|
||||
cleanCase
|
||||
cleanBoundary
|
||||
cleanTimeZero
|
||||
cleanPyFoam
|
||||
cleanVTK
|
||||
|
|
|
@ -10,13 +10,39 @@
|
|||
export caseName=`basename $PWD`
|
||||
|
||||
#We stop this script when we encounter a problem
|
||||
trap "exit -1" ERR
|
||||
#trap "exit -1" ERR
|
||||
|
||||
echo "$caseName: Running blockMesh"
|
||||
runApplicationAndReportOnError blockMesh
|
||||
|
||||
echo "$caseName: Updating the boundary file"
|
||||
# Let's see if pyFoamChangeMixingPlaneBoundary.py is available
|
||||
command -v pyFoamChangeMixingPlaneBoundary.py >/dev/null
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "Using pyFoamChangeMixingPlaneBoundary.py"
|
||||
pyFoamChangeMixingPlaneBoundary.py . mixpLeftOut \
|
||||
--shadowPatch mixpRightIn \
|
||||
--assembly both \
|
||||
--orientation dirZ_spanY \
|
||||
--coordinateSystemType coordinateSystem \
|
||||
--coordinateSystemOrigin "(0 0 0.005)" \
|
||||
--coordinateSystemE1 "(1 0 0)" \
|
||||
--coordinateSystemE3 "(0 0 1)"
|
||||
|
||||
pyFoamChangeMixingPlaneBoundary.py . mixpRightIn \
|
||||
--shadowPatch mixpLeftOut \
|
||||
--assembly both \
|
||||
--orientation dirZ_spanY \
|
||||
--coordinateSystemType coordinateSystem \
|
||||
--coordinateSystemOrigin "(0 0 0.005)" \
|
||||
--coordinateSystemE1 "(1 0 0)" \
|
||||
--coordinateSystemE3 "(0 0 1)"
|
||||
else
|
||||
echo "pyFoamChangeMixingPlaneBoundary.py is missing. Using the file constant/polyMesh/boundary.preconfigured"
|
||||
cp constant/polyMesh/boundary.preconfigured constant/polyMesh/boundary
|
||||
fi
|
||||
|
||||
|
||||
echo "$caseName: Creating the starting time directory"
|
||||
cp -r 0_orig 0
|
||||
|
|
|
@ -63,11 +63,11 @@ patches
|
|||
(
|
||||
(0 4 7 3)
|
||||
)
|
||||
patch mixpLeftOut
|
||||
mixingPlane mixpLeftOut
|
||||
(
|
||||
(2 6 5 1)
|
||||
)
|
||||
patch mixpRightIn
|
||||
mixingPlane mixpRightIn
|
||||
(
|
||||
(8 12 15 11)
|
||||
)
|
||||
|
|
|
@ -1,84 +0,0 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5-dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
7
|
||||
(
|
||||
top
|
||||
{
|
||||
type wall;
|
||||
nFaces 20;
|
||||
startFace 360;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type wall;
|
||||
nFaces 20;
|
||||
startFace 380;
|
||||
}
|
||||
leftIn
|
||||
{
|
||||
type patch;
|
||||
nFaces 10;
|
||||
startFace 400;
|
||||
}
|
||||
mixpLeftOut
|
||||
{
|
||||
type mixingPlane;
|
||||
nFaces 10;
|
||||
startFace 410;
|
||||
shadowPatch mixpRightIn;
|
||||
orientation dirZ_spanY;
|
||||
assembly both;
|
||||
coordinateSystem
|
||||
{
|
||||
type coordinateSystem;
|
||||
origin (0 0 0.005);
|
||||
axis (0 0 1);
|
||||
direction (1 0 0);
|
||||
}
|
||||
}
|
||||
mixpRightIn
|
||||
{
|
||||
type mixingPlane;
|
||||
nFaces 10;
|
||||
startFace 420;
|
||||
shadowPatch mixpLeftOut;
|
||||
orientation dirZ_spanY;
|
||||
assembly both;
|
||||
coordinateSystem
|
||||
{
|
||||
type coordinateSystem;
|
||||
origin (0 0 0.005);
|
||||
axis (0 0 1);
|
||||
direction (1 0 0);
|
||||
}
|
||||
}
|
||||
rightOut
|
||||
{
|
||||
type patch;
|
||||
nFaces 10;
|
||||
startFace 430;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
nFaces 400;
|
||||
startFace 440;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
|
@ -18,6 +18,7 @@ cleanPostProcessing ()
|
|||
rm -rf postProcessing/log.gnuplotPlotResiduals > /dev/null 2>&1
|
||||
rm -rf postProcessing/log.gnuplotCompareAll > /dev/null 2>&1
|
||||
rm -rf postProcessing/logs > /dev/null 2>&1
|
||||
rm -rf postProcessing/compareAll.gplt.old > /dev/null 2>&1
|
||||
}
|
||||
|
||||
cleanFilesFromM4 ()
|
||||
|
|
|
@ -18,11 +18,13 @@ cleanPostProcessing ()
|
|||
rm -rf postProcessing/log.gnuplotPlotResiduals > /dev/null 2>&1
|
||||
rm -rf postProcessing/log.gnuplotCompareAll > /dev/null 2>&1
|
||||
rm -rf postProcessing/logs > /dev/null 2>&1
|
||||
rm -rf postProcessing/compareAll.gplt.old > /dev/null 2>&1
|
||||
}
|
||||
|
||||
cleanFilesFromM4 ()
|
||||
{
|
||||
rm {constant/polyMesh/boundary,constant/polyMesh/blockMeshDict} > /dev/null 2>&1
|
||||
rm constant/polyMesh/boundary > /dev/null 2>&1
|
||||
rm constant/polyMesh/blockMeshDict > /dev/null 2>&1
|
||||
}
|
||||
|
||||
cleanTimeZero ()
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
export caseName=`basename $PWD`
|
||||
|
||||
#We stop this script when we encounter a problem
|
||||
trap "exit -1" ERR
|
||||
#trap "exit -1" ERR
|
||||
|
||||
echo "$caseName: Creating the file blockMeshDict using m4"
|
||||
(cd constant/polyMesh; m4 -P blockMeshDict.m4 > blockMeshDict)
|
||||
|
@ -19,7 +19,25 @@ echo "$caseName: Running blockMesh"
|
|||
runApplicationAndReportOnError blockMesh
|
||||
|
||||
echo "$caseName: Updating the boundary file"
|
||||
# Let's see if pyFoamChangeGGIBoundary.py is available
|
||||
command -v pyFoamChangeGGIBoundary.py >/dev/null
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "Using pyFoamChangeGGIBoundary.py"
|
||||
pyFoamChangeGGIBoundary.py . B_UPSTREAM \
|
||||
--shadowPatch B_DOWNSTREAM \
|
||||
--zone B_UPSTREAMZone \
|
||||
--bridgeOverlap false
|
||||
|
||||
pyFoamChangeGGIBoundary.py . B_DOWNSTREAM \
|
||||
--shadowPatch B_UPSTREAM \
|
||||
--zone B_DOWNSTREAMZone \
|
||||
--bridgeOverlap false
|
||||
|
||||
else
|
||||
echo "pyFoamChangeGGIBoundary.py is missing. Using the file constant/polyMesh/boundary.preconfigured"
|
||||
cp constant/polyMesh/boundary.preconfigured constant/polyMesh/boundary
|
||||
fi
|
||||
|
||||
echo "$caseName: Creating the starting time directory"
|
||||
cp -r 0_orig 0
|
||||
|
|
|
@ -18,11 +18,13 @@ cleanPostProcessing ()
|
|||
rm -rf postProcessing/log.gnuplotPlotResiduals > /dev/null 2>&1
|
||||
rm -rf postProcessing/log.gnuplotCompareAll > /dev/null 2>&1
|
||||
rm -rf postProcessing/logs > /dev/null 2>&1
|
||||
rm -rf postProcessing/compareAll.gplt.old > /dev/null 2>&1
|
||||
}
|
||||
|
||||
cleanFilesFromM4 ()
|
||||
{
|
||||
rm {constant/polyMesh/boundary,constant/polyMesh/blockMeshDict} > /dev/null 2>&1
|
||||
rm constant/polyMesh/boundary > /dev/null 2>&1
|
||||
rm constant/polyMesh/blockMeshDict > /dev/null 2>&1
|
||||
}
|
||||
|
||||
cleanTimeZero ()
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
export caseName=`basename $PWD`
|
||||
|
||||
#We stop this script when we encounter a problem
|
||||
trap "exit -1" ERR
|
||||
#trap "exit -1" ERR
|
||||
|
||||
echo "$caseName: Creating the file blockMeshDict using m4"
|
||||
(cd constant/polyMesh; m4 -P blockMeshDict.m4 > blockMeshDict)
|
||||
|
@ -19,7 +19,85 @@ echo "$caseName: Running blockMesh"
|
|||
runApplicationAndReportOnError blockMesh
|
||||
|
||||
echo "$caseName: Updating the boundary file"
|
||||
# Let's see if pyFoamChangeGGIBoundary.py is available
|
||||
command -v pyFoamChangeGGIBoundary.py >/dev/null
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "Using pyFoamChangeGGIBoundary.py"
|
||||
pyFoamChangeGGIBoundary.py . B_UPSTREAM \
|
||||
--shadowPatch B_DOWNSTREAM \
|
||||
--zone B_UPSTREAMZone \
|
||||
--bridgeOverlap false
|
||||
|
||||
pyFoamChangeGGIBoundary.py . B_DOWNSTREAM \
|
||||
--shadowPatch B_UPSTREAM \
|
||||
--zone B_DOWNSTREAMZone \
|
||||
--bridgeOverlap false
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallA_BB_cyclic1 \
|
||||
--shadowPatch sideWallA_BB_cyclic2 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle 90 \
|
||||
--zone sideWallA_BB_cyclic1Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallA_BB_cyclic2 \
|
||||
--shadowPatch sideWallA_BB_cyclic1 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle -90 \
|
||||
--zone sideWallA_BB_cyclic2Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallB_C_cyclic1 \
|
||||
--shadowPatch sideWallB_C_cyclic2 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle 90 \
|
||||
--zone sideWallB_C_cyclic1Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallB_C_cyclic2 \
|
||||
--shadowPatch sideWallB_C_cyclic1 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle -90 \
|
||||
--zone sideWallB_C_cyclic2Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallC_D_cyclic1 \
|
||||
--shadowPatch sideWallC_D_cyclic2 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle 90 \
|
||||
--zone sideWallC_D_cyclic1Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallC_D_cyclic2 \
|
||||
--shadowPatch sideWallC_D_cyclic1 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle -90 \
|
||||
--zone sideWallC_D_cyclic2Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallD_E_cyclic1 \
|
||||
--shadowPatch sideWallD_E_cyclic2 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle 90 \
|
||||
--zone sideWallD_E_cyclic1Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallD_E_cyclic2 \
|
||||
--shadowPatch sideWallD_E_cyclic1 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle -90 \
|
||||
--zone sideWallD_E_cyclic2Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallE_F_cyclic1 \
|
||||
--shadowPatch sideWallE_F_cyclic2 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle 90 \
|
||||
--zone sideWallE_F_cyclic1Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallE_F_cyclic2 \
|
||||
--shadowPatch sideWallE_F_cyclic1 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle -90 \
|
||||
--zone sideWallE_F_cyclic2Zone
|
||||
|
||||
else
|
||||
echo "pyFoamChangeGGIBoundary.py is missing. Using the file constant/polyMesh/boundary.preconfigured"
|
||||
cp constant/polyMesh/boundary.preconfigured constant/polyMesh/boundary
|
||||
fi
|
||||
|
||||
echo "$caseName: Creating the starting time directory"
|
||||
cp -r 0_orig 0
|
||||
|
|
|
@ -18,6 +18,7 @@ cleanPostProcessing ()
|
|||
rm -rf postProcessing/log.gnuplotPlotResiduals > /dev/null 2>&1
|
||||
rm -rf postProcessing/log.gnuplotCompareAll > /dev/null 2>&1
|
||||
rm -rf postProcessing/logs > /dev/null 2>&1
|
||||
rm -rf postProcessing/compareAll.gplt.old > /dev/null 2>&1
|
||||
}
|
||||
|
||||
cleanFilesFromM4 ()
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
export caseName=`basename $PWD`
|
||||
|
||||
#We stop this script when we encounter a problem
|
||||
trap "exit -1" ERR
|
||||
#trap "exit -1" ERR
|
||||
|
||||
echo "$caseName: Creating the file blockMeshDict using m4"
|
||||
(cd constant/polyMesh; m4 -P blockMeshDict.m4 > blockMeshDict)
|
||||
|
@ -19,7 +19,32 @@ echo "$caseName: Running blockMesh"
|
|||
runApplicationAndReportOnError blockMesh
|
||||
|
||||
echo "$caseName: Updating the boundary file"
|
||||
# Let's see if pyFoamChangeMixingPlaneBoundary.py is available
|
||||
command -v pyFoamChangeMixingPlaneBoundary.py >/dev/null
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "Using pyFoamChangeMixingPlaneBoundary.py"
|
||||
pyFoamChangeMixingPlaneBoundary.py . B_UPSTREAM \
|
||||
--shadowPatch B_DOWNSTREAM \
|
||||
--assembly both \
|
||||
--orientation dirR_spanTheta \
|
||||
--coordinateSystemType cylindrical \
|
||||
--coordinateSystemOrigin "(0 0 0)" \
|
||||
--coordinateSystemE1 "(1 0 0)" \
|
||||
--coordinateSystemE3 "(0 0 1)"
|
||||
|
||||
pyFoamChangeMixingPlaneBoundary.py . B_DOWNSTREAM \
|
||||
--shadowPatch B_UPSTREAM \
|
||||
--assembly both \
|
||||
--orientation dirR_spanTheta \
|
||||
--coordinateSystemType cylindrical \
|
||||
--coordinateSystemOrigin "(0 0 0)" \
|
||||
--coordinateSystemE1 "(1 0 0)" \
|
||||
--coordinateSystemE3 "(0 0 1)"
|
||||
else
|
||||
echo "pyFoamChangeMixingPlaneBoundary.py is missing. Using the file constant/polyMesh/boundary.preconfigured"
|
||||
cp constant/polyMesh/boundary.preconfigured constant/polyMesh/boundary
|
||||
fi
|
||||
|
||||
echo "$caseName: Creating the starting time directory"
|
||||
cp -r 0_orig 0
|
||||
|
|
|
@ -18,11 +18,15 @@ cleanPostProcessing ()
|
|||
rm -rf postProcessing/log.gnuplotPlotResiduals > /dev/null 2>&1
|
||||
rm -rf postProcessing/log.gnuplotCompareAll > /dev/null 2>&1
|
||||
rm -rf postProcessing/logs > /dev/null 2>&1
|
||||
rm -rf postProcessing/compareAll.gplt.old > /dev/null 2>&1
|
||||
}
|
||||
|
||||
cleanFilesFromM4 ()
|
||||
{
|
||||
rm {constant/polyMesh/boundary,constant/polyMesh/blockMeshDict} > /dev/null 2>&1
|
||||
rm constant/polyMesh/boundary > /dev/null 2>&1
|
||||
rm constant/polyMesh/blockMeshDict > /dev/null 2>&1
|
||||
rm constant/polyMesh/blockMeshDict.m4.old > /dev/null 2>&1
|
||||
rm system/controlDict.old > /dev/null 2>&1
|
||||
}
|
||||
|
||||
cleanTimeZero ()
|
||||
|
|
|
@ -10,18 +10,121 @@
|
|||
export caseName=`basename $PWD`
|
||||
|
||||
#We stop this script when we encounter a problem
|
||||
trap "exit -1" ERR
|
||||
#trap "exit -1" ERR
|
||||
|
||||
nbrPassageUpstream=13
|
||||
nbrPassageDownstream=8
|
||||
|
||||
rUpstreamNumberOfCells=21
|
||||
rDownstreamNumberOfCells=27
|
||||
|
||||
angleUpstream=`echo "scale=10; 360/$nbrPassageUpstream" | bc -l`
|
||||
angleDownstream=`echo "scale=10; 360/$nbrPassageDownstream" | bc -l`
|
||||
|
||||
sed -e "s/nbrPassageUpstream,.*/nbrPassageUpstream, $nbrPassageUpstream\)/" -i.old constant/polyMesh/blockMeshDict.m4 >& /dev/null
|
||||
sed -e "s/nbrPassageDownstream,.*/nbrPassageDownstream, $nbrPassageDownstream\)/" -i.old constant/polyMesh/blockMeshDict.m4 >& /dev/null
|
||||
sed -e "s/rUpstreamNumberOfCells, .*/rUpstreamNumberOfCells, $rUpstreamNumberOfCells\)/" -i.old constant/polyMesh/blockMeshDict.m4 >& /dev/null
|
||||
sed -e "s/rDownstreamNumberOfCells, .*/rDownstreamNumberOfCells, $rDownstreamNumberOfCells\)/" -i.old constant/polyMesh/blockMeshDict.m4 >& /dev/null
|
||||
|
||||
echo "$caseName: Creating the file blockMeshDict using m4"
|
||||
(cd constant/polyMesh; m4 -P blockMeshDict.m4 > blockMeshDict)
|
||||
|
||||
echo "Modifying system/controlDict"
|
||||
sed -e "s/masterPatchScaleFactor .*/masterPatchScaleFactor $nbrPassageUpstream;/" -i.old system/controlDict >& /dev/null
|
||||
sed -e "s/shadowPatchScaleFactor .*/shadowPatchScaleFactor $nbrPassageDownstream;/" -i.old system/controlDict >& /dev/null
|
||||
|
||||
echo "$caseName: Running blockMesh"
|
||||
runApplicationAndReportOnError blockMesh
|
||||
|
||||
echo "$caseName: Updating the boundary file"
|
||||
# Let's see if pyFoamChangeMixingPlaneBoundary.py is available
|
||||
command -v pyFoamChangeMixingPlaneBoundary.py >/dev/null
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "Using pyFoamChangeMixingPlaneBoundary.py"
|
||||
pyFoamChangeMixingPlaneBoundary.py . B_UPSTREAM \
|
||||
--shadowPatch B_DOWNSTREAM \
|
||||
--assembly both \
|
||||
--orientation dirR_spanTheta \
|
||||
--coordinateSystemType cylindrical \
|
||||
--coordinateSystemOrigin "(0 0 0)" \
|
||||
--coordinateSystemE1 "(1 0 0)" \
|
||||
--coordinateSystemE3 "(0 0 1)"
|
||||
|
||||
pyFoamChangeMixingPlaneBoundary.py . B_DOWNSTREAM \
|
||||
--shadowPatch B_UPSTREAM \
|
||||
--assembly both \
|
||||
--orientation dirR_spanTheta \
|
||||
--coordinateSystemType cylindrical \
|
||||
--coordinateSystemOrigin "(0 0 0)" \
|
||||
--coordinateSystemE1 "(1 0 0)" \
|
||||
--coordinateSystemE3 "(0 0 1)"
|
||||
|
||||
echo "Using pyFoamChangeGGIBoundary.py"
|
||||
pyFoamChangeGGIBoundary.py . sideWallA_BB_cyclic1 \
|
||||
--shadowPatch sideWallA_BB_cyclic2 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle $angleUpstream \
|
||||
--zone sideWallA_BB_cyclic1Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallA_BB_cyclic2 \
|
||||
--shadowPatch sideWallA_BB_cyclic1 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle -$angleUpstream \
|
||||
--zone sideWallA_BB_cyclic2Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallB_C_cyclic1 \
|
||||
--shadowPatch sideWallB_C_cyclic2 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle $angleDownstream \
|
||||
--zone sideWallB_C_cyclic1Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallB_C_cyclic2 \
|
||||
--shadowPatch sideWallB_C_cyclic1 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle -$angleDownstream \
|
||||
--zone sideWallB_C_cyclic2Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallC_D_cyclic1 \
|
||||
--shadowPatch sideWallC_D_cyclic2 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle $angleDownstream \
|
||||
--zone sideWallC_D_cyclic1Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallC_D_cyclic2 \
|
||||
--shadowPatch sideWallC_D_cyclic1 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle -$angleDownstream \
|
||||
--zone sideWallC_D_cyclic2Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallD_E_cyclic1 \
|
||||
--shadowPatch sideWallD_E_cyclic2 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle $angleDownstream \
|
||||
--zone sideWallD_E_cyclic1Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallD_E_cyclic2 \
|
||||
--shadowPatch sideWallD_E_cyclic1 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle -$angleDownstream \
|
||||
--zone sideWallD_E_cyclic2Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallE_F_cyclic1 \
|
||||
--shadowPatch sideWallE_F_cyclic2 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle $angleDownstream \
|
||||
--zone sideWallE_F_cyclic1Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallE_F_cyclic2 \
|
||||
--shadowPatch sideWallE_F_cyclic1 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle -$angleDownstream \
|
||||
--zone sideWallE_F_cyclic2Zone
|
||||
|
||||
else
|
||||
echo "pyFoamChangeGGIBoundary.py is missing. Using the file constant/polyMesh/boundary.preconfigured"
|
||||
cp constant/polyMesh/boundary.preconfigured constant/polyMesh/boundary
|
||||
fi
|
||||
|
||||
echo "$caseName: Creating the starting time directory"
|
||||
cp -r 0_orig 0
|
||||
|
@ -46,7 +149,7 @@ echo "Analysing results for time: $latestAvailTimeDir"
|
|||
# Run sample
|
||||
runApplicationAndReportOnError sample -case .. -latestTime
|
||||
|
||||
# Adjust compareAll.gplt: replace "Case1.1" "??" by "Case1.1_mixingPlane" "$latestAvailTimeDir"
|
||||
# Adjust compareAll.gplt: replace "Case1.1" "??" by "Case1.1_mixingPlane_Upstream13_Downstream8" "$latestAvailTimeDir"
|
||||
sed -i.old "s/\"Case1.1\".*$/\"$caseName\" \"$latestAvailTimeDir\"/g" compareAll.gplt
|
||||
|
||||
# Run gnuplot to generate the comparison charts
|
||||
|
|
|
@ -2,20 +2,20 @@
|
|||
# Automatic post processing by H<>an Nilsson, Maryse Page and Martin Beaudoin
|
||||
#
|
||||
|
||||
call "compareU.gplt" "-25" "0" "1.3e-01" "Case1.1_mixingPlane_Upstream13_Downstream17" "1200"
|
||||
call "compareU.gplt" "025" "10" "1.34341204e-01" "Case1.1_mixingPlane_Upstream13_Downstream17" "1200"
|
||||
call "compareU.gplt" "060" "10" "1.40418891e-01" "Case1.1_mixingPlane_Upstream13_Downstream17" "1200"
|
||||
call "compareU.gplt" "100" "10" "1.47364818e-01" "Case1.1_mixingPlane_Upstream13_Downstream17" "1200"
|
||||
call "compareU.gplt" "175" "10" "1.60388431e-01" "Case1.1_mixingPlane_Upstream13_Downstream17" "1200"
|
||||
call "compareU.gplt" "250" "10" "1.73412044e-01" "Case1.1_mixingPlane_Upstream13_Downstream17" "1200"
|
||||
call "compareU.gplt" "330" "10" "1.87303899e-01" "Case1.1_mixingPlane_Upstream13_Downstream17" "1200"
|
||||
call "compareU.gplt" "405" "10" "2.00327512e-01" "Case1.1_mixingPlane_Upstream13_Downstream17" "1200"
|
||||
call "compareU.gplt" "-25" "0" "1.3e-01" "Case1.1_mixingPlane_Upstream13_Downstream8" "1200"
|
||||
call "compareU.gplt" "025" "10" "1.34341204e-01" "Case1.1_mixingPlane_Upstream13_Downstream8" "1200"
|
||||
call "compareU.gplt" "060" "10" "1.40418891e-01" "Case1.1_mixingPlane_Upstream13_Downstream8" "1200"
|
||||
call "compareU.gplt" "100" "10" "1.47364818e-01" "Case1.1_mixingPlane_Upstream13_Downstream8" "1200"
|
||||
call "compareU.gplt" "175" "10" "1.60388431e-01" "Case1.1_mixingPlane_Upstream13_Downstream8" "1200"
|
||||
call "compareU.gplt" "250" "10" "1.73412044e-01" "Case1.1_mixingPlane_Upstream13_Downstream8" "1200"
|
||||
call "compareU.gplt" "330" "10" "1.87303899e-01" "Case1.1_mixingPlane_Upstream13_Downstream8" "1200"
|
||||
call "compareU.gplt" "405" "10" "2.00327512e-01" "Case1.1_mixingPlane_Upstream13_Downstream8" "1200"
|
||||
|
||||
call "compareK.gplt" "-25" "0" "1.3e-01" "Case1.1_mixingPlane_Upstream13_Downstream17" "1200"
|
||||
call "compareK.gplt" "025" "10" "1.34341204e-01" "Case1.1_mixingPlane_Upstream13_Downstream17" "1200"
|
||||
call "compareK.gplt" "060" "10" "1.40418891e-01" "Case1.1_mixingPlane_Upstream13_Downstream17" "1200"
|
||||
call "compareK.gplt" "100" "10" "1.47364818e-01" "Case1.1_mixingPlane_Upstream13_Downstream17" "1200"
|
||||
call "compareK.gplt" "175" "10" "1.60388431e-01" "Case1.1_mixingPlane_Upstream13_Downstream17" "1200"
|
||||
call "compareK.gplt" "250" "10" "1.73412044e-01" "Case1.1_mixingPlane_Upstream13_Downstream17" "1200"
|
||||
call "compareK.gplt" "330" "10" "1.87303899e-01" "Case1.1_mixingPlane_Upstream13_Downstream17" "1200"
|
||||
call "compareK.gplt" "405" "10" "2.00327512e-01" "Case1.1_mixingPlane_Upstream13_Downstream17" "1200"
|
||||
call "compareK.gplt" "-25" "0" "1.3e-01" "Case1.1_mixingPlane_Upstream13_Downstream8" "1200"
|
||||
call "compareK.gplt" "025" "10" "1.34341204e-01" "Case1.1_mixingPlane_Upstream13_Downstream8" "1200"
|
||||
call "compareK.gplt" "060" "10" "1.40418891e-01" "Case1.1_mixingPlane_Upstream13_Downstream8" "1200"
|
||||
call "compareK.gplt" "100" "10" "1.47364818e-01" "Case1.1_mixingPlane_Upstream13_Downstream8" "1200"
|
||||
call "compareK.gplt" "175" "10" "1.60388431e-01" "Case1.1_mixingPlane_Upstream13_Downstream8" "1200"
|
||||
call "compareK.gplt" "250" "10" "1.73412044e-01" "Case1.1_mixingPlane_Upstream13_Downstream8" "1200"
|
||||
call "compareK.gplt" "330" "10" "1.87303899e-01" "Case1.1_mixingPlane_Upstream13_Downstream8" "1200"
|
||||
call "compareK.gplt" "405" "10" "2.00327512e-01" "Case1.1_mixingPlane_Upstream13_Downstream8" "1200"
|
||||
|
|
|
@ -18,6 +18,7 @@ cleanPostProcessing ()
|
|||
rm -rf postProcessing/log.gnuplotPlotResiduals > /dev/null 2>&1
|
||||
rm -rf postProcessing/log.gnuplotCompareAll > /dev/null 2>&1
|
||||
rm -rf postProcessing/logs > /dev/null 2>&1
|
||||
rm -rf postProcessing/compareAll.gplt.old > /dev/null 2>&1
|
||||
}
|
||||
|
||||
cleanFilesFromM4 ()
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
export caseName=`basename $PWD`
|
||||
|
||||
#We stop this script when we encounter a problem
|
||||
trap "exit -1" ERR
|
||||
#trap "exit -1" ERR
|
||||
|
||||
echo "$caseName: Creating the file blockMeshDict using m4"
|
||||
(cd constant/polyMesh; m4 -P blockMeshDict.m4 > blockMeshDict)
|
||||
|
@ -19,7 +19,45 @@ echo "$caseName: Running blockMesh"
|
|||
runApplicationAndReportOnError blockMesh
|
||||
|
||||
echo "$caseName: Updating the boundary file"
|
||||
# Let's see if pyFoamChangeMixingPlaneBoundary.py is available
|
||||
command -v pyFoamChangeMixingPlaneBoundary.py >/dev/null
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "Using pyFoamChangeMixingPlaneBoundary.py"
|
||||
pyFoamChangeMixingPlaneBoundary.py . B_UPSTREAM \
|
||||
--shadowPatch B_DOWNSTREAM \
|
||||
--assembly both \
|
||||
--orientation dirR_spanTheta \
|
||||
--coordinateSystemType cylindrical \
|
||||
--coordinateSystemOrigin "(0 0 0)" \
|
||||
--coordinateSystemE1 "(1 0 0)" \
|
||||
--coordinateSystemE3 "(0 0 1)"
|
||||
|
||||
pyFoamChangeMixingPlaneBoundary.py . B_DOWNSTREAM \
|
||||
--shadowPatch B_UPSTREAM \
|
||||
--assembly both \
|
||||
--orientation dirR_spanTheta \
|
||||
--coordinateSystemType cylindrical \
|
||||
--coordinateSystemOrigin "(0 0 0)" \
|
||||
--coordinateSystemE1 "(1 0 0)" \
|
||||
--coordinateSystemE3 "(0 0 1)"
|
||||
|
||||
echo "Using pyFoamChangeGGIBoundary.py"
|
||||
pyFoamChangeGGIBoundary.py . sideWallA_BB_cyclic1 \
|
||||
--shadowPatch sideWallA_BB_cyclic2 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle 60 \
|
||||
--zone sideWallA_BB_cyclic1Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . sideWallA_BB_cyclic2 \
|
||||
--shadowPatch sideWallA_BB_cyclic1 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle -60 \
|
||||
--zone sideWallA_BB_cyclic2Zone
|
||||
else
|
||||
echo "pyFoamChangeGGIBoundary.py is missing. Using the file constant/polyMesh/boundary.preconfigured"
|
||||
cp constant/polyMesh/boundary.preconfigured constant/polyMesh/boundary
|
||||
fi
|
||||
|
||||
echo "$caseName: Creating the starting time directory"
|
||||
cp -r 0_orig 0
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
export caseName=`basename $PWD`
|
||||
|
||||
#We stop this script when we encounter a problem
|
||||
trap "exit -1" ERR
|
||||
#trap "exit -1" ERR
|
||||
|
||||
echo "$caseName: Creating the file blockMeshDict using m4"
|
||||
(cd constant/polyMesh; m4 -P blockMeshDict.m4 > blockMeshDict)
|
||||
|
@ -19,8 +19,59 @@ echo "$caseName: Running blockMesh"
|
|||
runApplicationAndReportOnError blockMesh
|
||||
|
||||
echo "$caseName: Updating the boundary file"
|
||||
#if not using PyFOAM, use this pre-configured boundary file
|
||||
# Let's see if pyFoamChangeMixingPlaneBoundary.py is available
|
||||
command -v pyFoamChangeMixingPlaneBoundary.py >/dev/null
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "Using pyFoamChangeMixingPlaneBoundary.py"
|
||||
pyFoamChangeMixingPlaneBoundary.py . upstreamMixingPlanePatch \
|
||||
--shadowPatch downstreamMixingPlanePatch \
|
||||
--assembly both \
|
||||
--orientation dirZ_spanTheta \
|
||||
--coordinateSystemType cylindrical \
|
||||
--coordinateSystemOrigin "(0 0 0)" \
|
||||
--coordinateSystemE1 "(1 0 0)" \
|
||||
--coordinateSystemE3 "(0 0 1)"
|
||||
|
||||
pyFoamChangeMixingPlaneBoundary.py . downstreamMixingPlanePatch \
|
||||
--shadowPatch upstreamMixingPlanePatch \
|
||||
--assembly both \
|
||||
--orientation dirZ_spanTheta \
|
||||
--coordinateSystemType cylindrical \
|
||||
--coordinateSystemOrigin "(0 0 0)" \
|
||||
--coordinateSystemE1 "(1 0 0)" \
|
||||
--coordinateSystemE3 "(0 0 1)"
|
||||
|
||||
|
||||
echo "Using pyFoamChangeGGIBoundary.py"
|
||||
pyFoamChangeGGIBoundary.py . upstreamPerio1 \
|
||||
--shadowPatch upstreamPerio2 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle 36 \
|
||||
--zone upstreamPerio1Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . upstreamPerio2 \
|
||||
--shadowPatch upstreamPerio1 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle -36 \
|
||||
--zone upstreamPerio2Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . downstreamPerio1 \
|
||||
--shadowPatch downstreamPerio2 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle 90 \
|
||||
--zone downstreamPerio1Zone
|
||||
|
||||
pyFoamChangeGGIBoundary.py . downstreamPerio2 \
|
||||
--shadowPatch downstreamPerio1 \
|
||||
--rotationAxis "(0 0 1)" \
|
||||
--rotationAngle -90 \
|
||||
--zone downstreamPerio2Zone
|
||||
else
|
||||
echo "pyFoamChangeMixingPlaneBoundary.py is missing. Using the file constant/polyMesh/boundary.preconfigured"
|
||||
cp constant/polyMesh/boundary.preconfigured constant/polyMesh/boundary
|
||||
fi
|
||||
|
||||
|
||||
echo "$caseName: Creating the starting time directory"
|
||||
cp -r 0_orig 0
|
||||
|
|
Reference in a new issue