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

@ -11,7 +11,7 @@ name = "anisotropy"
format = "%(levelname)s: %(message)s" format = "%(levelname)s: %(message)s"
[base] [base]
simple = true simple = true
bodyCentered = true bodyCentered = true
faceCentered = true faceCentered = true
@ -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,23 +88,28 @@ def meshCreate(shape, parameters): #fineness, parameters, viscousLayers = None):
### ###
# Viscous layers # Viscous layers
## ##
vlayer = netgen.ViscousLayers( if parameters.viscousLayers:
parameters.thickness, vlayer = netgen.ViscousLayers(
parameters.numberOfLayers, parameters.thickness,
parameters.stretchFactor, parameters.numberOfLayers,
parameters.facesToIgnore, parameters.stretchFactor,
parameters.isFacesToIgnore, parameters.facesToIgnore,
parameters.extrusionMethod parameters.isFacesToIgnore,
) parameters.extrusionMethod
)
logger.info("""meshCreate: logger.info("""meshCreate:
viscous layers: viscous layers:
thickness:\t{} thickness:\t{}
number:\t{} number:\t{}
stretch factor:\t{}""".format( stretch factor:\t{}""".format(
parameters.thickness, parameters.thickness,
parameters.numberOfLayers, parameters.numberOfLayers,
parameters.stretchFactor)) parameters.stretchFactor))
else:
logger.info("""meshCreate:
viscous layers: false""")
return mesh return mesh