File size: 1,680 Bytes
5a600cf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/sh
cd ${0%/*} || exit 1    # Run from this directory

# Source tutorial run and clean functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions

# Copy/merge the source case
isTest "$@" && path=.. || path=$FOAM_TUTORIALS/incompressibleFluid
cp -r $path/pitzDailySteady .
foamMergeCase $path/pitzDailySteady || exit

# Run the source case in parallel
(
    cd pitzDailySteady
    cp ../system/decomposeParDict system
    runApplication blockMesh -dict $FOAM_TUTORIALS/resources/blockMesh/pitzDaily
    runApplication decomposePar -latestTime
    runParallel foamRun -noFunctionObjects
)

# Mesh
runApplication blockMesh
runApplication decomposePar

# !!! Smooth interpolative mapping from a coarse to a fine case is not
# available within mapFieldsPar. All current options create fields with step
# changes at the boundaries between coarse source cells. This poor
# initialisation results in a large transient at the start of the part
# simulation. We need a lot of under-relaxation to overcome this. In future, it
# is desired to introduce smooth interpolative mapping, which should resolve
# this issue and the need for additional under-relaxation.
runApplication foamDictionary system/fvSolution -entry relaxationFactors/equations -set '{ ".*" 0.1; }'

# Map from the source case into this case and run in parallel
runParallel mapFieldsPar pitzDailySteady -sourceTime latestTime -fields "(epsilon k nut p U)"
runParallel foamRun -noFunctionObjects

# Reconstruct, including the values mapped to the zero directory
runApplication reconstructPar -withZero

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