#!/bin/sh
cd “${0%/*}” || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#——————————————————————————mkdir -p constant/triSurface
cp -f \r
“$FOAM_TUTORIALS”/resources/geometry/box_12.obj.gz \r
constant/triSurfacerunApplication blockMesh
# Create fine surface
runApplication -s 1 surfaceRefineRedGreen \r
constant/triSurface/box_12.obj constant/triSurface/box_12_1.objrunApplication -s 2 surfaceRefineRedGreen \r
constant/triSurface/box_12_1.obj constant/triSurface/box_12_2.objrunApplication -s 3 surfaceRefineRedGreen \r
constant/triSurface/box_12_2.obj constant/triSurface/box_12_3.objrunApplication -s 4 surfaceRefineRedGreen \r
constant/triSurface/box_12_3.obj constant/triSurface/box_12_4.objrunApplication -s 5 surfaceRefineRedGreen \r
constant/triSurface/box_12_4.obj constant/triSurface/box_12_5.objrunApplication -s 6 surfaceRefineRedGreen \r
constant/triSurface/box_12_5.obj constant/triSurface/box_12_6.objrunApplication -s 7 surfaceRefineRedGreen \r
constant/triSurface/box_12_6.obj constant/triSurface/box_12_7.objrunApplication -s 8 surfaceRefineRedGreen \r
constant/triSurface/box_12_7.obj constant/triSurface/box_12_8.objrunApplication -s 9 surfaceRefineRedGreen \r
constant/triSurface/box_12_8.obj constant/triSurface/box_12_9.objrunApplication -s 10 surfaceRefineRedGreen \r
constant/triSurface/box_12_9.obj constant/triSurface/box.obj#- Offset to create second surface
runApplication surfaceTransformPoints \r
-rotate ‘((1 0 0)(1 0.8 0.9))’ \r
-translate ‘(0.1 0.101 0.103)’ \r
constant/triSurface/box.obj constant/triSurface/box_trans.obj#- Invert surface (so inwards pointing normals) to use as refinement box
runApplication surfaceOrient -inside \r
constant/triSurface/box.obj \r
‘(100 100 100)’ \r
constant/triSurface/box_flipped.objrunApplication -s scale surfaceTransformPoints \r
-translate ‘(0.2 0.3 0.3)’ \r
-write-scale ‘(0.5)’ \r
constant/triSurface/box_flipped.obj constant/triSurface/box_scaled.objrunApplication snappyHexMesh
runApplication decomposePar
runParallel -s parallel snappyHexMesh
#——————————————————————————
実行年月:01/18/2023