-
Notifications
You must be signed in to change notification settings - Fork 1
/
submit-container.sh
55 lines (41 loc) · 2.06 KB
/
submit-container.sh
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
#!/bin/bash
#SBATCH --job-name=container-foam-108
#SBATCH --ntasks=108
#SBATCH --output=%x_%j.out
#SBATCH --partition=c5n
export PATH=$PATH:/shared/singularity/bin
module load openmpi
source /shared/OpenFOAM/OpenFOAM-v2012/etc/bashrc
cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/
# decomposing a mesh
singularity exec openfoam-ub2004.sif \
surfaceFeatureExtract > ./log/surfaceFeatureExtract.log 2>&1
singularity exec openfoam-ub2004.sif \
blockMesh > ./log/blockMesh.log 2>&1
singularity exec openfoam-ub2004.sif \
decomposePar -decomposeParDict system/decomposeParDict.hierarchical > ./log/decomposePar.log 2>&1
# meshing
mpirun -np $SLURM_NTASKS \
singularity exec openfoam-ub2004.sif \
snappyHexMesh -parallel -overwrite -decomposeParDict system/decomposeParDict.hierarchical > ./log/snappyHexMesh.log 2>&1
mpirun -np $SLURM_NTASKS \
singularity exec openfoam-ub2004.sif \
checkMesh -parallel -allGeometry -constant -allTopology -decomposeParDict system/decomposeParDict.hierarchical > ./log/checkMesh.log 2>&1
mpirun -np $SLURM_NTASKS \
singularity exec openfoam-ub2004.sif \
redistributePar -parallel -overwrite -decomposeParDict system/decomposeParDict.ptscotch > ./log/decomposePar2.log 2>&1
mpirun -np $SLURM_NTASKS \
singularity exec openfoam-ub2004.sif \
renumberMesh -parallel -overwrite -constant -decomposeParDict system/decomposeParDict.ptscotch > ./log/renumberMesh.log 2>&1
mpirun -np $SLURM_NTASKS \
singularity exec openfoam-ub2004.sif \
patchSummary -parallel -decomposeParDict system/decomposeParDict.ptscotch > ./log/patchSummary.log 2>&1
ls -d processor* | xargs -i rm -rf ./{}/0
ls -d processor* | xargs -i cp -r 0.orig ./{}/0
# processing
mpirun -np $SLURM_NTASKS \
singularity exec openfoam-ub2004.sif \
potentialFoam -parallel -noFunctionObjects -initialiseUBCs -decomposeParDict system/decomposeParDict.ptscotch > ./log/potentialFoam.log 2>&1s
mpirun -np $SLURM_NTASKS \
singularity exec openfoam-ub2004.sif \
simpleFoam -parallel -decomposeParDict system/decomposeParDict.ptscotch > ./log/simpleFoam.log 2>&1