modeling of earth surface dynamics and related problems using openfoam · 2013. 8. 15. · a brief...

42
Xiaofeng Liu, Ph.D., P.E. Assistant Professor Department of Civil and Environmental Engineering University of Texas at San Antonio, Texas Email: [email protected] http://engineering.utsa.edu/~xiaofengliu 1 Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM ® Disclaimer: This offering is not approved or endorsed by Silicon Graphics International Corp., the producer of the OpenFOAM ® software and owner of the OpenFOAM ® trademarks. CSDMS 2013 Meeting

Upload: others

Post on 06-Nov-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

Xiaofeng Liu, Ph.D., P.E. Assistant Professor

Department of Civil and Environmental Engineering University of Texas at San Antonio, Texas

Email: [email protected] http://engineering.utsa.edu/~xiaofengliu

1

Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM®

Disclaimer: This offering is not approved or endorsed by Silicon Graphics International Corp., the producer of the OpenFOAM® software and owner of the OpenFOAM® trademarks.

CSDMS 2013 Meeting

Page 2: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

Outline

2

A brief introduction of OpenFOAM

Sample applications of OpenFOAM

Demonstration (Time permitting)

Page 3: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

A brief introduction of OpenFOAM

3

OpenFOAM is an open source multi-physics modeling platform written in C++

FOAM stands for “Field Operation And Manipulation”

OpenFOAM is not limited to fluid dynamics It is a generic modeling platform It can be used to solve (m)any differential equation(s)

Page 4: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

Example applications of OpenFOAM

4

River flow, coastal flow, waves, and sediment transport Hydraulic structures Porous media flow and solute/particle transport Buoyant flows and multiphase flows Some new developments in our group

Page 5: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

Free surface flows over bedforms

5

Page 6: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

6 Liu et al., 2011

Page 7: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

7 Liu et al., 2011

Page 8: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

8

Page 9: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

River flow under a bridge

9 http://www.youtube.com/watch?v=BqKN5QwGPB4

http://www.edenvaleyoung.com

Page 10: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

10

Scour under an elevated wall due to waves

Page 11: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

11

Liu et al, 2012

Particle resolving scour protection simulations

Page 12: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

12

Page 13: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

13

Liu et al, 2012

Page 14: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

14

Pore-scale modeling of porous media flow

Page 15: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

15 Sinir and Liu, 2012

Page 16: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

16

(Sinir and Liu, 2012)

Page 17: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

17 (Sinir and Liu, 2012)

Page 18: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

Porous media flow and solute/particle transport Solves simple groundwater flow equation

QhKthSs +∇=∂∂ 2

where h is the pressure head, Ss is the specific storage coefficient, K is hydraulic conductivity, Q is source/sink

This governing equation is a simple heat equation. The solution of which is very easily implemented in OpenFOAM using tensor notations.

( )

SKCKntS

tS

nCDC

tC

dab

b

−=∂∂

∂∂

−∇=⋅∇+∂∂

ρ

ρ2U

Also solves advection-diffusion-reaction (ADR) equation

All these with less than 50 lines of code!

Page 19: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

Porous media flow test case: Toth (1963):

0=∂∂

xh 0=

∂∂

xh

0=∂∂

zh

( ) ( )xbaxczzxh '''00 sin, ++=

Page 20: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform
Page 21: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

T=0.01 h T=0.02 h T=0.03 h T=0.04 h T=0.1 h

Nanoparticle Concentration in Sand Column Test

Page 22: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform
Page 23: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

Buoyancy affected flows (gravity current over roughness and bedforms)

23 Jiang and Liu, 2012

Page 24: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

24 Jiang and Liu, 2012

Page 25: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

Time = 5 s

Time = 10 s

Time = 15 s

25

Page 26: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

26

Page 27: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

27

Page 28: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

28

Page 29: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

29

Basic steps for a modeling task

Page 30: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

30

Numerical features of OpenFOAM Finite volume method Also has Lagrangian particle tracking, finite element

method, finite area method, etc. Unstructured meshes (both fixed and deforming)

Page 31: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

31

Numerical features of OpenFOAM Solve fluid dynamics equations using the segregated

pressure methods (e.g., PISO, SIMPLE, SIMPLEC, etc.)

Can be 1D, 2D, and 3D based on the mesh and boundary conditions

Automatic parallel computation based on domain decomposition and MPI

Automatic descretizations of the equations

Page 32: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

32

So how are equations solved in OpenFOAM?

Mathematical language: Partial differential equation (PDE)

Pseudo-natural language in OF

Equations are essentially the group of operations on fields

Linear system after discretization

Page 33: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

33

Numerical features of OpenFOAM Descretizations schemes (system/fvSchemes) Spatial: upwind, central, TVD, NVD, etc. Temporal: Euler, backward, CN, etc.

Linear system solvers (system/fvSolution) PBiCG (asymmetric matrix) PCG (symmetric matrix) GAMG (multi-grid method) Smooth solver and diagonal solver …

Page 34: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

34

Modeling capabilities of OpenFOAM Incompressible and compressible flows Turbulence models Laminar RANS: Reynolds Averaged Navier-Stokes LES: Large Eddy Simulations DES: Detached Eddy Simulations DNS: Direct Numerical Simulations

Page 35: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

35

Modeling capabilities of OpenFOAM Multiphase flows Free surface flows Buoyant flows: due to sediment, temperature,

salinity, etc. Transport and rheological models Newtonian Non-Newtonian

(Liu and García, 2010)

Page 36: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

36

Modeling capabilities of OpenFOAM Dynamic mesh To model motion of the domain or object Various method to deform the mesh Can be used to generate a mesh

Immersed boundary method

Credit: Jorge D. Abad, U. Pitt.

Page 37: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

37

Pre-processing capabilities of OpenFOAM Mesh generation Generic tools: blockMesh snappyHexMesh

Mesh conversion Convert meshes from/to other formats e.g., Anysis, Fluent, GMESH, Gambit

Mesh manipulation Rotation, translation, extrusion, split, join, etc.

Page 38: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

38

Pre-processing capabilities of OpenFOAM Set up initial conditions Modify the files directly, or Generic tool: setFields

Set up boundary conditions Modify the files directly, or Use tools, or Programming by yourself

Page 39: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

39

Post-processing capabilities of OpenFOAM Directly load into ParaView ParaView is open source and free

Page 40: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

40

Post-processing capabilities of OpenFOAM Convert OpenFOAM results to other formats Generic tools: foamToFluent foamToFieldView foamToVTK foamToTecplot360

Page 41: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

Demonstrations

41

Page 42: Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM · 2013. 8. 15. · A brief introduction of OpenFOAM . 3 OpenFOAM is an open source multi-physics modeling platform

Xiaofeng Liu, Ph.D., P.E. Assistant Professor

Department of Civil and Environmental Engineering University of Texas at San Antonio, Texas http://engineering.utsa.edu/~xiaofengliu

42

Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM®

Disclaimer: This offering is not approved or endorsed by Silicon Graphics International Corp., the producer of the OpenFOAM® software and owner of the OpenFOAM® trademarks.

CSDMS 2013 Meeting