Difference between revisions of "OpenFOAM"

From FIThydrowiki
Jump to navigation Jump to search
(Created page with "right =Quick summary= thumb|250px|Figure 1: Combination of 1D and 2D models in BASEMENT (source: VAW). file:basement_g...")
 
Line 5: Line 5:
 
[[file:basemet_qgis.png|thumb|250px|Figure 3: Visualization of BASEMENT results with QGIS plugin Crayfish (source: VAW) (click to enlarge).]]
 
[[file:basemet_qgis.png|thumb|250px|Figure 3: Visualization of BASEMENT results with QGIS plugin Crayfish (source: VAW) (click to enlarge).]]
  
Developed by: Laboratory of hydraulics, hydrology and glaciology (VAW) of ETH Zurich
+
Developed by: 2018 (OpenFOAM release v1812)
  
 
Date: May 2018 (Version 2.8)
 
Date: May 2018 (Version 2.8)
Line 14: Line 14:
  
 
=Introduction=
 
=Introduction=
BASEMENT (BAsic Simulation EnvironMENT) is a numerical software for the simulation of hydro- and morphodynamics in rivers. The main motivation for the development of the software is to provide a powerful user-friendly tool that facilitates basic applications for practitioners as well as advanced model configurations for research. The underlying one- and two-dimensional models are based on the Saint-Venant equations for the hydrodynamics, the Exner-Hirano equations for bed load transport and an advection-diffusion approach with source terms for suspended sediment transport. Mentionable special features of the software are arbitrary combinations of 1D and 2D model domains (Figure 1), a PID controller for various monitoring values and the use of an unstructured dual-mesh to improve topographic accuracy.
+
OpenFOAM is a C++ toolbox for simulation of general continuum mechanics problems including the Navier-Stokes equations that mathematically describe the 3D motion of fluids. For simulations of free-surface gravity flows, the prebuilt Eulerian’ solver interFOAM is most suitable. The interFOAM solver identifies the interface between water and air based on the Volume Of Fluid (VOF) method and uses the PIMPLE algorithm for pressure-velocity coupling. The governing flow equations can be solved in combination with different approaches for turbulence modelling. In OpenFOAM, Reynolds-averaged Navier-Stokes (RANS) models using one or two equation turbulence models (e.g. k-ε model) as well as more computationally expensive large eddy simulation (LES) methods are available. An advantage of OpenFOAM, besides its free availability, is the use of body-fitted or unstructured computational grids. The additional use of polyhedral cells (in addition to hexahedral cells) allows even complex geometries to be accurately mapped (Figure 36).  
  
 
=Application=
 
=Application=
The 1D model of BASEMENT is based on river cross sections and its main application are river reaches where the level of detail is less important. The 2D model uses a triangular computational grid to reproduce the topography and can be applied to more detailed and complex problems than the 1D model, e.g. the inundation or river bar formation. BASEMENT supports Windows as well as Linux platforms and includes a graphical user interface (GUI) which supports the user during the model setup and simulation process (Figure 2). For grid generation, the QGIS plugin BASEmesh is provided by the developers and for visualization of the results, among others, the QGIS plugin Crayfish (QGIS 2.8) from Lutra Consulting (https://www.lutraconsulting.co.uk) can be used (Figure 3).
+
The operating system for OpenFOAM is Linux and there is no official Graphical User Interface (GUI). The basic directory structure for an OpenFOAM case containing the minimum set of files required to run an application is shown in Figure 37. All the files can be accessed with a text editor. In the system directory, the parameters associated with the solution procedure itself are defined (e.g. start/end time, solution schemes). The constant directory contains the description of the mesh and files specifying the physical properties. The time directories contain data files that can be either initial values, boundary conditions or results written to file.
 +
 
 +
OpenFOAM is supplied with a pre- and post-processing environment. The interface to the pre- and post-processing are OpenFOAM utilities, thereby ensuring consistent data handling across all environments. The overall structure of OpenFOAM is shown in Figure 38.
 +
In the pre-processing, simple meshes containing blocks of hexahedral cells can be generated by the blockMesh utility. For more complex geometries, the snappyHexMesh utility automatically generates meshes containing split-hexahedral cells by iteratively refining the starting mesh and morphing the resulting split-hex mesh to the triangulated surface of solid geometrical structures like power plant facilities (see Figure 37). Solid structures are represented in the form of stereolithographic files (STL).
 +
The main post-processing tool provided with OpenFOAM is the reader module paraFoam that uses ParaView, an open-source visualization software to display geometry, computational mesh and simulation results (Figure 38).  
  
 
=Other information=
 
=Other information=
In addition to the use on regular Windows and Linux workstations, the upcoming version 3.0 of BASEMENT (March 2019) is designed to run on graphical processing units (GPUs) and distributed memory computer clusters allowing engineers to tackle problems with very large computational domains or long simulation time.
+
General advantages & disadvantages of the tool (no claim for completeness)
 +
+ Open source software − Complex model setup (no GUI)
 +
+ Accurate representation of complex geometries due to unstructured or body-fitted computational grids − Definition of boundary and initial condition requires in depth knowledge of underlying concepts
 +
+ Growing user community (forum) − No standardized documentation 
 +
 
  
 
=Relevant literature=
 
=Relevant literature=

Revision as of 12:17, 24 June 2019

Openfoam logo.png

Quick summary

Figure 1: Combination of 1D and 2D models in BASEMENT (source: VAW).
Figure 2: Graphical user interface of BASEMENT (source: VAW) (click to enlarge).
Figure 3: Visualization of BASEMENT results with QGIS plugin Crayfish (source: VAW) (click to enlarge).

Developed by: 2018 (OpenFOAM release v1812)

Date: May 2018 (Version 2.8)

Type: Tool

Suitable for the following [[::Category:Measures|measures]]:

Introduction

OpenFOAM is a C++ toolbox for simulation of general continuum mechanics problems including the Navier-Stokes equations that mathematically describe the 3D motion of fluids. For simulations of free-surface gravity flows, the prebuilt Eulerian’ solver interFOAM is most suitable. The interFOAM solver identifies the interface between water and air based on the Volume Of Fluid (VOF) method and uses the PIMPLE algorithm for pressure-velocity coupling. The governing flow equations can be solved in combination with different approaches for turbulence modelling. In OpenFOAM, Reynolds-averaged Navier-Stokes (RANS) models using one or two equation turbulence models (e.g. k-ε model) as well as more computationally expensive large eddy simulation (LES) methods are available. An advantage of OpenFOAM, besides its free availability, is the use of body-fitted or unstructured computational grids. The additional use of polyhedral cells (in addition to hexahedral cells) allows even complex geometries to be accurately mapped (Figure 36).

Application

The operating system for OpenFOAM is Linux and there is no official Graphical User Interface (GUI). The basic directory structure for an OpenFOAM case containing the minimum set of files required to run an application is shown in Figure 37. All the files can be accessed with a text editor. In the system directory, the parameters associated with the solution procedure itself are defined (e.g. start/end time, solution schemes). The constant directory contains the description of the mesh and files specifying the physical properties. The time directories contain data files that can be either initial values, boundary conditions or results written to file.

OpenFOAM is supplied with a pre- and post-processing environment. The interface to the pre- and post-processing are OpenFOAM utilities, thereby ensuring consistent data handling across all environments. The overall structure of OpenFOAM is shown in Figure 38. In the pre-processing, simple meshes containing blocks of hexahedral cells can be generated by the blockMesh utility. For more complex geometries, the snappyHexMesh utility automatically generates meshes containing split-hexahedral cells by iteratively refining the starting mesh and morphing the resulting split-hex mesh to the triangulated surface of solid geometrical structures like power plant facilities (see Figure 37). Solid structures are represented in the form of stereolithographic files (STL). The main post-processing tool provided with OpenFOAM is the reader module paraFoam that uses ParaView, an open-source visualization software to display geometry, computational mesh and simulation results (Figure 38).

Other information

General advantages & disadvantages of the tool (no claim for completeness) + Open source software − Complex model setup (no GUI) + Accurate representation of complex geometries due to unstructured or body-fitted computational grids − Definition of boundary and initial condition requires in depth knowledge of underlying concepts + Growing user community (forum) − No standardized documentation


Relevant literature

  • Vetsch D., Siviglia A., Caponi F., Ehrbar D., Gerke E., Kammerer S., Koch A., Peter S., Vanzo D., Vonwiller L., Facchini M., Gerber M., Volz C., Farshi D., Mueller R., Rousselot P., Veprek R., Faeh R. 2018. System Manuals of BASEMENT, Version 2.8. Laboratory of Hydraulics, Glaciology and Hydrology (VAW). ETH Zurich. Available from http://www.basement.ethz.ch.

Contact information

Website (download, tutorials, etc.): http://www.basement.ethz.ch

Email: basement@ethz.ch