File: Allrun-pre

package info (click to toggle)
openfoam 1912.200626-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 238,940 kB
  • sloc: cpp: 1,159,638; sh: 15,902; ansic: 5,195; lex: 660; xml: 387; python: 282; awk: 212; makefile: 103; sed: 88; csh: 3
file content (83 lines) | stat: -rwxr-xr-x 2,272 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/sh
cd "${0%/*}" || exit                                # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions        # Tutorial run functions
#------------------------------------------------------------------------------

intersectSurfaces()
{
    outputName1=$(basename $1)
    outputName1=${outputName1%.*}

    outputName2=$(basename $2)
    outputName2=${outputName2%.*}

    runApplication -s $outputName1:$outputName2 \
        surfaceBooleanFeatures intersection "$@"
}


rm -rf 0


# Run the surface preparation script
./constant/triSurface/surfaceProcess.sh > log.surfaceProcess 2>&1


# Surface intersections
intersectSurfaces vessel.stl spargerShaft.stl -perturb

intersectSurfaces vessel.stl shaft.stl -perturb

intersectSurfaces spargerShaft.stl spargerInlet.stl -perturb

intersectSurfaces stirrer.stl shaftRotating.stl -perturb

intersectSurfaces stirrer_baffles.stl stirrer.stl -surf1Baffle -perturb

intersectSurfaces rotating.stl shaft.stl -surf1Baffle -perturb

# Intersect blades with the plate
for bladeI in $(seq 1 6)
do
    intersectSurfaces \
        stirrer_baffles_$bladeI.obj \
        stirrer_baffles_plate.obj   \
       -surf1Baffle -surf2Baffle
done


# Meshing
\cp system/controlDict.mesh system/controlDict

runApplication blockMesh -region backgroundMeshDecomposition

runApplication -s backgroundMeshDecomposition \
    decomposePar -region backgroundMeshDecomposition

runApplication surfaceFeatureExtract

runParallel foamyHexMesh

runParallel -s faces \
    collapseEdges -collapseFaces -latestTime \
                  -dict system/collapseDict.collapseFaces

#runParallel -s faceSet  \
#    collapseEdges -collapseFaceSet indirectPatchFaces -latestTime \
#                  -dict system/collapseDict.indirectPatchFaces

runParallel checkMesh -allTopology -allGeometry -latestTime

# Copy the mesh from the latest time folder into polyMesh and delete that
# latest time folder
latestTime=$(foamListTimes -latestTime -processor)
if [ "$latestTime" != "constant" ] && [ -d processor0/$latestTime/polyMesh ]
then
    runApplication reconstructParMesh -latestTime

    \cp -r $latestTime/polyMesh constant
    rm -rf $latestTime
fi


#------------------------------------------------------------------------------