Optimization of relaxation factors and convergence criteria in OpenFOAM
1. Aug. 26th 2012 OpenFOAM Study Meeting for beginner @ Kanto Masashi Imano (OCAEL Co. Ltd.)
Masashi Imano (OCAEL Co.Ltd.)
Optimization of relaxation factor
for simple solver
1
2. Aug. 26th 2012 OpenFOAM Study Meeting for beginner @ Kanto Masashi Imano (OCAEL Co. Ltd.)
“Guidebook for Practical
Applications of CFD
to Pedestrian Wind
Environment around Buildings”
Working Group in Architectural Institute of Japan
Web site (in Japanese and English)( in Japanese)
Akashi Mochida, Yoshihide Tominaga, et al.
Guideline for Practical Applications
2
3. Aug. 26th 2012 OpenFOAM Study Meeting for beginner @ Kanto Masashi Imano (OCAEL Co. Ltd.)
Case A
(2:1:1 shape)
Case B
(4:4:1 shape)
Case C
(Simple blocks)
Case D
(High-rise bldg.)
Case E
(Niigata)
Case F
(Shinjuku, Tokyo)
Benchmark tests
3
4. Aug. 26th 2012 OpenFOAM Study Meeting for beginner @ Kanto Masashi Imano (OCAEL Co. Ltd.)
Mesh
Cartesian mesh
(snappyHexMesh)
Inflow
Interpolate from wind
tunnel results
Top & Side
wall
Zero gradient
Ground and
bldg. wall
Generalized log law
for a smooth wall
Turbulence
model
Standard k-epsilon
Advection
scheme
Upwind
Algorithm SIMPLE (simpleFoam)
Wind direction NNE
Building
complexes with
simple building
shape in actual
urban area
(Niigata)
Case E - Calculation condition
4
5. Aug. 26th 2012 OpenFOAM Study Meeting for beginner @ Kanto Masashi Imano (OCAEL Co. Ltd.)
Case E - Validation
RMSE(Root Mean Square Error)
Code O(Overlapping structured grid)
0.24
OpenFOAM (Unstructured grid)
0.22
NNE
Code OExperiment Code O OpenFOAM
Normalizedvelocity
5
6. Aug. 26th 2012 OpenFOAM Study Meeting for beginner @ Kanto Masashi Imano (OCAEL Co. Ltd.)
Test cluster condition
• Project XL server @ Hokkaido University
• Hardware: HITACH BladeSymphony BS 2000
• CPU: Intel Xeon E7-8870 2.4GHz, 10 cores
• Node: 4CPUs (40 cores)
• Memory: 128GB/node
• HDD: 2TB/node
• OS: Any OS (root account is available)
• Rental fee: 21,000 yen/month
• Other project server:
✓ L server: 10 cores(1CPU), 5,250 yen/month
6
7. Aug. 26th 2012 OpenFOAM Study Meeting for beginner @ Kanto Masashi Imano (OCAEL Co. Ltd.)
Accelerate simple solver
• Relaxation parameters for pressure and velocity are
important for steady state incompressible flows
(solver: simpleFoam)
relaxationFactors
//
0
<
relaxationFactors
<=
1
{
p
0.3;
//
for
pressure
(important)
U
0.5;
//
for
velocity
vectors
(important)
k
0.5;
//
for
turbulence
kinetic
energy
epsilon
0.5;
//
for
turbulence
kinetic
energy
//
dissipation
rate
}
system/fvSolution:
7
9. Aug. 26th 2012 OpenFOAM Study Meeting for beginner @ Kanto Masashi Imano (OCAEL Co. Ltd.)
Results of speedup in SIMPLE 1
0
0.5
1
1.5
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.75 0.8 0.85 0.9
Speedupratio(baseαU=0.5,αp=0.8)
Relaxation factor for velocity (αU)
0.1 0.2 0.3 0.4 0.5 0.6 0.7
0.8 0.9
Relaxation factor for pressure (αP)
αP=0.1
αP=0.2
αP=0.3
9
10. Aug. 26th 2012 OpenFOAM Study Meeting for beginner @ Kanto Masashi Imano (OCAEL Co. Ltd.)
Results of speedup in SIMPLE 2
0.9
1
1.1
1.2
1.3
1.4
1.5
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.75 0.8 0.85 0.9
Speedupratio(baseαU=0.5,αp=0.8)
Relaxation factor for velocity (αU)
0.1 0.2 0.3 0.4 0.5 0.6 0.7
0.8 0.9
Relaxation factor for pressure (αP)
αP=0.1
αP=0.2
αP=0.3
αP=0.4αP=0.5
αP=0.6
αP=0.7
αP=0.8
αP=0.9
10
11. Aug. 26th 2012 OpenFOAM Study Meeting for beginner @ Kanto Masashi Imano (OCAEL Co. Ltd.)
Results of speedup in SIMPLEC
0
125
250
375
500
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Iterationnumber
Relaxation factor for pressure (αU)
0.1 0.2 0.3 0.4 0.5 0.6
0.7 0.8 0.9 SIMPLEC
Relaxation factor for velocity (αP)
αP=0.8
αP=0.9
αP=0.7
αP=0.6
αP=0.5
αP=0.4
αP=0.3
αP=0.2
αP=0.1
SIMPLEC is almost equivalance
to SIMPLE when αU+αP=1
11
12. Aug. 26th 2012 OpenFOAM Study Meeting for beginner @ Kanto Masashi Imano (OCAEL Co. Ltd.)
Execution time per iteration
0
600
1200
1800
2400
3000
3600
4200
4800
0 600 1200 1800 2400 3000
Exectiontime[s]
Number of iteration
SIMPLE SIMPLEC
12
13. Aug. 26th 2012 OpenFOAM Study Meeting for beginner @ Kanto Masashi Imano (OCAEL Co. Ltd.)
Results of speedup in SIMPLEC 2
0
0.5
1
1.5
2
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Speedupratio(baseαU=0.5,αp=0.8)
Relaxation factor for pressure (αU)
0.1 0.2 0.3 0.4 0.5 0.6
0.7 0.8 0.9 SIMPLEC
Relaxation factor for velocity (αP)
αO=0.8
αP=0.9
αP=0.7 αP=0.6
αP=0.5
αP=0.4
αP=0.3
αP=0.2
αP=0.1
SIMPLEC is almost equivalance
to SIMPLE when αU+αP=1
13
14. Aug. 26th 2012 OpenFOAM Study Meeting for beginner @ Kanto Masashi Imano (OCAEL Co. Ltd.)
0
0.5
1
1.5
2
2.5
3
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Maximumofvelocityrenewal[m/s]
Relaxation factor for pressure (αU)
Ux Uy Uz
Maximum of velocity renewal 1
When solution is converged
(i.e Initial residual for p and U are smaller than criteria)
Inlet velocity at
pedestrian level is about 3 m/s.
Maximum of velocity renewal
should be smaller than about
10% of 3 m/s, i.e. 0.3 m/s.
0.3 m/s
14
15. Aug. 26th 2012 OpenFOAM Study Meeting for beginner @ Kanto Masashi Imano (OCAEL Co. Ltd.)
0
0.5
1
1.5
2
2.5
3
0 1 2 3 4 5 6 7 8 9
Maximumofvelocityrenewal[m/s]
Virtual time step (E=αU /(1-αU)
Ux Uy Uz
Maximum of velocity renewal 2
When solution is converged
(i.e Initial residual for p and U are smaller than criteria)
15
16. Aug. 26th 2012 OpenFOAM Study Meeting for beginner @ Kanto Masashi Imano (OCAEL Co. Ltd.)
Any Questions?
16