Files
openfoam/tutorials/mesh/cvMesh/car/Allrun
2011-07-11 15:43:41 +01:00

49 lines
1.5 KiB
Bash
Executable File

#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
surfacePointMerge constant/triSurface/m_car01_wheels.obj \
1e-2 constant/triSurface/m_car01_wheels_merge.obj \
> log.surfacePointMerge 2>&1
# Orient so point to be meshed is inside surface
surfaceOrient \
constant/triSurface/m_car01_wheels_merge.obj \
-inside -usePierceTest '(13 -200 149)' \
constant/triSurface/m_car01_wheels_merge_orient.obj \
> log.surfaceOrient.m_car01 2>&1
# Same for outside
surfaceOrient \
constant/triSurface/domain.stl \
-inside -usePierceTest '(13 -200 149)' \
constant/triSurface/domain_orient.stl \
> log.surfaceOrient.domain 2>&1
# Extract feature edges and points
runApplication surfaceFeatureExtract \
constant/triSurface/m_car01_wheels_merge_orient.obj \
m_car01 -includedAngle 125 -writeObj
mv log.surfaceFeatureExtract log.surfaceFeatureExtract.m_car01
unset FOAM_SIGFPE
runApplication surfaceFeatureExtract \
constant/triSurface/domain_orient.stl \
domain -includedAngle 125 -writeObj
mv log.surfaceFeatureExtract log.surfaceFeatureExtract.domain
# Generate aligned points (in constant/internalDelaunayVertices) and a
# mesh from that.
runApplication cvMesh
# Generate some sets for a bit of mesh inspection
runApplication topoSet -constant -time 0:100
# And a field for thresholding
writeCellCentres -constant
# ----------------------------------------------------------------- end-of-file