Mod: disable viscous layers

This commit is contained in:
L-Nafaryus 2021-06-10 16:58:43 +05:00
parent 893250d35f
commit 93990fe053
3 changed files with 35 additions and 25 deletions

View File

@ -37,16 +37,18 @@ case $1 in
source ${OPENFOAM} source ${OPENFOAM}
source env/bin/activate source env/bin/activate
mkdir ${DIR}/build && echo $$ >${DIR}/build/anisotropy.pid mkdir "${DIR}/build"
echo $$ >"${DIR}/build/anisotropy.pid"
python ${DIR}/anisotropy/anisotropy.py ${@:2} python "${DIR}/anisotropy/anisotropy.py" ${@:2}
deactivate deactivate
rm "${DIR}/build/anisotropy.pid"
;; ;;
kill) kill)
pid="${DIR}/build/anisotropy.pid" pkill -TERM -P $(cat "${DIR}/build/anisotropy.pid")
kill -9 $(cat $pid) rm "${DIR}/build/anisotropy.pid"
rm $pid
;; ;;
help) help)

View File

@ -30,7 +30,7 @@ directions = [
fillet = true fillet = true
[simple.mesh] [simple.mesh]
fineness = 1 fineness = 2
minSize = 0.01 minSize = 0.01
maxSize = 0.1 maxSize = 0.1
growthRate = 0.5 growthRate = 0.5
@ -45,6 +45,7 @@ useSurfaceCurvature = true
fuseEdges = true fuseEdges = true
checkChartBoundary = false checkChartBoundary = false
viscousLayers = false
thickness = [0.01, 0.005] thickness = [0.01, 0.005]
numberOfLayers = 2 numberOfLayers = 2
stretchFactor = 1.2 stretchFactor = 1.2
@ -65,7 +66,7 @@ directions = [
fillet = true fillet = true
[bodyCentered.mesh] [bodyCentered.mesh]
fineness = 1 fineness = 2
minSize = 0.005 minSize = 0.005
maxSize = 0.05 maxSize = 0.05
growthRate = 0.5 growthRate = 0.5
@ -80,6 +81,7 @@ useSurfaceCurvature = true
fuseEdges = true fuseEdges = true
checkChartBoundary = false checkChartBoundary = false
viscousLayers = false
thickness = [0.005, 0.001] thickness = [0.005, 0.001]
numberOfLayers = 2 numberOfLayers = 2
stretchFactor = 1.2 stretchFactor = 1.2
@ -100,7 +102,7 @@ directions = [
fillet = true fillet = true
[faceCentered.mesh] [faceCentered.mesh]
fineness = 1 fineness = 2
minSize = 0.005 minSize = 0.005
maxSize = 0.05 maxSize = 0.05
growthRate = 0.5 growthRate = 0.5
@ -115,6 +117,7 @@ useSurfaceCurvature = true
fuseEdges = true fuseEdges = true
checkChartBoundary = false checkChartBoundary = false
viscousLayers = false
thickness = [0.001, 0.0005] thickness = [0.001, 0.0005]
numberOfLayers = 2 numberOfLayers = 2
stretchFactor = 1.2 stretchFactor = 1.2

View File

@ -88,6 +88,7 @@ def meshCreate(shape, parameters): #fineness, parameters, viscousLayers = None):
### ###
# Viscous layers # Viscous layers
## ##
if parameters.viscousLayers:
vlayer = netgen.ViscousLayers( vlayer = netgen.ViscousLayers(
parameters.thickness, parameters.thickness,
parameters.numberOfLayers, parameters.numberOfLayers,
@ -106,6 +107,10 @@ viscous layers:
parameters.numberOfLayers, parameters.numberOfLayers,
parameters.stretchFactor)) parameters.stretchFactor))
else:
logger.info("""meshCreate:
viscous layers: false""")
return mesh return mesh