Top Banner
OpenFOAM-v1612+ and OpenFOAM-v1706 User Graphical Interface Tutorial: waveExampleStokesV Santander, September 2017
23

OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

Mar 31, 2018

Download

Documents

hoangkhanh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

OpenFOAM-v1612+ and OpenFOAM-v1706 User Graphical Interface

Tutorial: waveExampleStokesV

Santander, September 2017

Page 2: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

Text and image copyright 2017 by Instituto de Hidráulica Ambiental de Cantabria

C/ Isabel Torres, 15

Parque Científico y Tecnológico de Cantabria

39011 – Santander (Spain)

http://ihfoam.ihcantabria.com/

[email protected] // [email protected]

OPENFOAM® is a registered trade mark of OpenCFD Limited, producer and distributor of the OpenFOAM software via wwww.openfoam.com.

All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher, except in the case of brief quotations embodied in critical reviews and certain other noncommercial uses permitted by copyright laws. For permission requests, write to the publisher, addressed above.

To submit corrections to the manual contact us at any of the emails in this page.

Page 3: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 1 -

INDEX

1. INTRODUCTION ..................................................................................................................................... ‐ 2 ‐ 

2. START .................................................................................................................................................... ‐ 4 ‐ 

2.1. EXECUTE GUI FILE ......................................................................................................................................... ‐ 4 ‐ 

2.2. LOAD FILE .................................................................................................................................................... ‐ 4 ‐ 

2.3. DEFINE THE OPENFOAM AND PARAVIEW VERSIONS ............................................................................................ ‐ 5 ‐ 

3. MESH DEFINITION .................................................................................................................................. ‐ 6 ‐ 

3.1. MESH DOMAIN ............................................................................................................................................. ‐ 6 ‐ 

3.2. PATCHES ...................................................................................................................................................... ‐ 7 ‐ 

3.3. EDIT BOUNDARY CONDITIONS FOR ALPHA, U AND P_RGH ...................................................................................... ‐ 8 ‐ 

4. NUMERICAL SETUP ................................................................................................................................ ‐ 9 ‐ 

4.1. FLUID PROPERTIES ......................................................................................................................................... ‐ 9 ‐ 

4.2. GRAVITY ...................................................................................................................................................... ‐ 9 ‐ 

4.3. BOUNDARY CONDITIONS ............................................................................................................................... ‐ 10 ‐ 

4.4. INITIAL FIELDS ............................................................................................................................................. ‐ 11 ‐ 

4.5. FVSCHEMES ................................................................................................................................................ ‐ 12 ‐ 

4.6. FVSOLUTION ............................................................................................................................................... ‐ 13 ‐ 

5. PRE‐PROCESSING ................................................................................................................................. ‐ 14 ‐ 

5.1. LINE GAUGES .............................................................................................................................................. ‐ 14 ‐ 

6. NUMERICAL MODEL EXECUTION .......................................................................................................... ‐ 15 ‐ 

6.1. PARAMETERS .............................................................................................................................................. ‐ 15 ‐ 

6.2. SIMULATION ............................................................................................................................................... ‐ 15 ‐ 

7. POST‐PROCESSING ............................................................................................................................... ‐ 18 ‐ 

7.1. LINE GAUGES .............................................................................................................................................. ‐ 18 ‐ 

8. REFERENCES ........................................................................................................................................ ‐ 20 ‐ 

Page 4: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 2 -

1. INTRODUCTION

In the last decade, IHCantabria has been working actively on the development of CFD tools to study the interaction of waves with marine structures. In the last five years, our efforts have been focus on the implementation of new physics on OpenFOAM® platform to increase the capability of OpenFOAM® in solving coastal engineering problems. A set of boundary conditions for wave generation and absorption, and new solvers, to simulate two-phase porous media flow which were released in 2014 to make it freely accessible to the scientific community and industry. That bundle is called IHFOAM and it has been updated and actively downloaded from www.ihfoam.ihcantabria.com.

In 2016, IHCantabria reached an agreement with ESI Group to include the IHFOAM developments in OpenFOAM® releases, which are presented every six months.

Figure 1. Free surface time history of a cnoidal wave. Dashed red line: IHFOAM (release 2014). Dotted green line: Theoretical solution. Black solid line: IHFOAM (OpenFOAM® release 17.06).

Since then, IHCantabria has contributed to releases v1612+ and v1706, presented in December 2016 and June 2017, respectively. Both releases included a new set of boundary conditions to generate and absorb waves at the boundaries without the use of dissipation areas to damp wave energy. This new set of boundary conditions, which are formulated using a new concept based on the introduction of mass and momentum along the boundaries, improves the ones initially develop by IHCantabria in 2014 and working with OpenCFD developers reduces the computational cost by around a 30%. In addition, the catalogue of wave theories has been increased covering solitary waves, linear and non-linear regular waves and random multidirectional waves. Wave absorption has also been improved since the original release.

Page 5: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 3 -

Now, we are very proud to announce here the release of IHFOAM-GUI which contains IHFOAM developments during the last years and already included in release v1706. Additionally other physics not included in v1706 release are incorporated in the GUI, such as porous media flow (fully validated, published in four papers) and vegetation fields, (fully validated, published in two papers).

IHFOAM-GUI has been designed following the request of many IHFOAM users to decrease the learning curve in the use of OpenFOAM® for coastal and ocean engineering. It is more than a standard OpenFOAM® GUI since it is especially designed to deal with free surface flows. The user will be able to set-up, in a short time, a numerical wave tank to analyze the interaction of waves with coastal and offshore structures. IHFOAM-GUI builds up the folders and the files needed to set-up a case guiding the user along several menus. Additionally, numerical proves can be inserted and post-processed along the GUI menu.

IHFOAM-GUI is freely downloadable from the following link including a tutorial:

http://ihfoam.ihcantabria.com/model/gui/

IHFOAM-GUI has been designed within the Coastal Hydrodynamics and Infrastructures Group in IHCantabria comprised by ten members. Future IHFOAM developments will be included in OpenFOAM® to be released by ESI Group and included in IHFOAM-GUI.

IHCantabria developments has passed along a thorough validation with existing or tailored designed laboratory tests. Validation results are published in peer reviewed journals. Visit our web page for further details.

Page 6: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 4 -

2. START

2.1. Execute GUI file

Inside dist/main write in a terminal: ./main

2.2. Load File

Click in Load Case and select the folder where the case is located. For example:

~/OpenFOAM/OpenFOAM-v1706/tutorials/multiphase/interFoam/laminar/waveExampleStokesV/

Click Open.

Page 7: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 5 -

2.3. Define the OpenFOAM and Paraview versions

Click Edit, and then in preferences, select the OpenFOAM and Paraview version (folder where it is located) that you are going to work with (for OpenFOAM you can chose between v1612+ and v1706).

- Path to OpenFOAM (v1612+ or v1706)

- Path to Paraview executable

- stl files resolution (100 by default)

Page 8: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 6 -

3. MESH DEFINITION

3.1. Mesh Domain

The numerical domain definition starts by typing its dimensions (x, y, z) and its discretization (Nx, Ny, Nz). Values will be saved by clicking Set.

After the numerical domain definition, execute blockMesh, and the created domain will be shown as a polyhedron with black edges.

Once it is executed, the next message will be shown in the terminal:

--> blockMesh execution finished.

Page 9: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 7 -

3.2. Patches

It shows all the information about the boundaries that have been created in the mesh domain.

Page 10: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 8 -

3.3. Edit boundary conditions for alpha, U and p_rgh

Select one of the boundaries by clicking on it in Patches panel (it will be highlighted in orange). Next, the boundary condition type will be selected by clicking in Edit Patch parameters. Repeat it for each boundary, for example: patch ground (lower face of the domain).

Page 11: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 9 -

4. NUMERICAL SETUP

4.1. Fluid Properties

Water and air properties definition, such as density (Kg/m3) and cinematic viscosity (m2/s). Values will be saved by clicking Set.

4.2. Gravity

Gravity acceleration definition (m/s2). Values will be saved by clicking Set.

Page 12: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 10 -

4.3. Boundary Conditions

Definition of generation (inlet boundary) and absorption (outlet boundary) conditions.

For the inlet boundary, first patch selection has to be done, and next the generation theory or Wave Theory (Cnoidal, StokesI, StokesII, StokesV, Boussinesq Grimshaw y McCowan), Wave Period (in seconds), Wave Height (in meters), Wave Angle (in degrees), the number of wave paddles or npaddle (integer number), active wave absorption or Active Absorption (activated or not), the signal smoothing or rampTime (in seconds) and, if necessary, the Water Depth (in meters).

For the outlet boundary, first patch selection has to be done, and next the Wave Theory (currently there is only one implemented theory, shallowWaterAbsorption) and the number of wave paddles or npaddle (integer number).

Values will be saved by clicking Set.

Page 13: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 11 -

4.4. Initial Fields

The initial water depth is defined inside the mesh domain (x, y, z). Its value will be saved by clicking Set.

Once the water depth is set, execute SetFields.

The numerical domain will be shown as a polyhedron with blue edges.

Page 14: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 12 -

Once it is executed, the next message will be shown:

--> setFields execution finished.

4.5. fvSchemes

Definition of the numerical schemes for each term (for example the derivatives of the different equations).

Page 15: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 13 -

4.6. fvSolution

Control of the resolution algorithms, tolerances and numerical solvers for each variable.

Page 16: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 14 -

5. PRE-PROCESSING

5.1. Line gauges

Definition of VoF (alpha.water=0.5), velocity and/or pressure gauges. They are defined by clicking in + and introducing their coordinates (x, y, z).

The information to be obtained from line gauges (such us VoF, velocity or pressure) can be selected.

By clicking over each created line gauge, you will see (in red) where it is located inside the mesh domain.

Page 17: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 15 -

6. NUMERICAL MODEL EXECUTION

6.1. Parameters

In this menu all the numerical values that define the simulation are defined: startTime (time in which the simulation starts), endTime (time in which the simulation ends), deltaT (simulation time step), etc.

6.2. Simulation

Two solvers are available in this release: interFoam and ihFoam (this solver includes the implementation, developed by IHCantabria, of the porous media according to Forcheimer model and the fluid-vegetation interaction which is currently not implemented in either OpenFOAM-1612+ or OpenFOAM-v1706).

Page 18: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 16 -

The model executions can be serial (1 processor executing the case) or parallel (multiple processors running the case synchronously).

If serial is selected, next click Run to run the case.

If parallel is selected, first the number of partitions for each direction (x, y, z) have to be defined. Click Set to save it.

Next click decomposePar, which will decompose the mesh domain into the number of partitions you have already defined.

Once the decomposition is done, the next message will be shown in the terminal:

--> decomposePar execution finished.

Page 19: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 17 -

For running the case in parallel, click Run.

Page 20: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 18 -

7. POST-PROCESSING

7.1. Line gauges

Select the line gauges you want to visualize.

Click Draw to plot the free surface time series of each gauge and Export if you want to save it as a .png file.

Page 21: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 19 -

Page 22: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 20 -

8. REFERENCES

Published papers with IHFOAM:

Solitary wave attenuation by vegetation patches. Maza, M, Lara, J.L., & Losada, I.J. [2016] Advances in Water Resources [Vol.98, pp. 159-172] hhttps://doi.org/10.1016/j.advwatres.2016.10.021

Validation of OpenFOAM® for Oscillating Water Column three-dimensional modeling Iturrioz, A., Guanche, R., Lara, J.L., Vidal, C., & Losada, I.J. [2015] Ocean Engineering [Vol. 107, pp. 222-237] http://dx.doi.org/10.1016/j.oceaneng.2015.07.051

Tsunami wave interaction with mangrove forests: A 3-D numerical approach. Maza, M, Lara, J.L., & Losada, I.J. [2015] Coastal Engineering [Vol.98, pp. 33-54] http://dx.doi.org/10.1016/j.oceaneng.2015.07.051

Three-dimensional numerical wave generation with moving boundaries. Higuera, P., Lara, J.L. & Losada, I.J. [2015] Coastal Engineering [Vol.101, pp. 35-47] http://dx.doi.org/10.1016/j.oceaneng.2015.07.051

Three-Dimensional Interaction of Waves and Porous Coastal Structures using OpenFOAM®. Part II: Application. Higuera, P., Lara, J.L. & Losada, I.J. [2014] Coastal Engineering [Vol. 83, pp. 259-270] http://dx.doi.org/10.1016/j.coastaleng.2013.09.002

Three-Dimensional Interaction of Waves and Porous Coastal Structures using OpenFOAM®. Part I: Formulation and Validation. Higuera, P., Lara, J.L. & Losada, I.J. [2014] Coastal Engineering [Vol. 83, pp. 243-258] http://dx.doi.org/10.1016/j.coastaleng.2013.08.010

Simulating Coastal Engineering Processes with OpenFOAM®. Higuera, P., Lara, J.L. & Losada, I.J. [2013] Coastal Engineering [Vol. 71, pp. 119-134] http://dx.doi.org/10.1016/j.coastaleng.2012.06.002

Realistic Wave Generation and Active Wave Absorption for Navier-Stokes Models. Application to OpenFOAM®. Higuera, P., Lara, J.L. & Losada, I.J. [2013]

Page 23: OpenFOAM-v1612+ and OpenFOAM-v1706 User …ihfoam.ihcantabria.com/IHcode/Manual_GUI_IHFOAM_v1.pdf · User Graphical Interface Tutorial: waveExampleStokesV ... the signal smoothing

IHFOAM. User Graphical Interface. Version 1.0

http://ihfoam.ihcantabria.com/

- 21 -

Coastal Engineering [Vol. 71, pp. 102-118] http://dx.doi.org/10.1016/j.coastaleng.2012.07.002