Sie sind auf Seite 1von 12

Table of Content Abstract Introduction Discussion Conclusion References 2 3-4 5-9 10 11-12

Abstract
In 21th century, computer plays a very huge role to help human to solve a lot of complicated calculations. Using computer power to obtain solutions directly, you can approach these calculations without recourse to simplifying assumptions or timeintensive techniques. This paper present OpenFOAM as a tool to consider for civil and environmental engineering applications as it solves 3D domains and considers two-phase flow. OpenFOAM has the potential to be used in wide spread applications in the area of civil and environmental engineering. The specialized design fields in hydraulic engineering are multi-disciplinary and the hydraulic structures used for bulk water conveyance include: dams, pump stations, fish passage, levees, river flooding and water supply. There are two main purposes of this paper. First, we discuss about the relation between numerical methods knowledge learned and OpenFOAM. Second we talk about the various application of OpenFOAM in civil and environmental engineering applications. Currently, the methods used to solve these types of civil and environmental engineering problems ranges from using empirical and analytical solution to physical modeling, which often incorporate problem simplification and individual professional judgment. Besides, OpenFOAM which have been found to be suitable for use in wide ranges of problems from complex fluid flow involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics, as well as coastal and offshore problems.

Introduction
Since the late 1940s the widespread availability of digital computers has led to a truly explosion in the use and development of numerical method. The recent evolution of inexpensive personal computers has given us ready access to powerful computational capabilities. There are several reasons why numerical methods are important to engineers: They are capable of handling large systems of equations, nonlinearities, and complicated geometries that are not uncommon in engineering practice and that are often impossible to solve analytically. Many problems cannot be approached using canned programs. If you are familiar with numerical methods and are skilled at computer programming, you can design your own programs to solve problems without having to buy or commission expensive software. Numerical methods are an efficient vehicle for learning to use computers. It is well known that an effective way to learn programming is to actually write computer programs. Because numerical methods are for the most part designed for implementation on computers, they are ideal for this purpose.

Why OpenFOAM? OpenFOAM, short for Open Field Operation and Manipulation, is a free open source CFD toolbox. It is a library of C++ code, available for anyone to customize and extend. OpenFOAM is written using an object oriented approach with a syntax closely resembling the differential equations being solved. This yields a very modular software design which eases the transition from physical model to code, making it easy to modify and extend. OpenFOAM uses the finite volume method on unstructured meshes. It is a very capable CFD tool including free-surface flows and mesh motion, among many other features. More than 80 solvers for simulation of specific problems and over 170 utility applications for meshing, post-processing and similar tasks are included. Unlike most other CFD software, OpenFOAM is not controlled through a graphical user interface (GUI). Instead settings are adjusted via text files called dictionaries and everything is controlled via the command line. The lack of a GUI makes the learning curve steeper for new users, however once grasped it is a very flexible and easily automatable approach. Some documentation and support are available for OpenFOAM, but compared to commercial CFD software alternatives it is lacking. OpenFOAM is released under the license GNU GPL 2, meaning that it is free for anyone to download and use. Commercial software licenses generally limit the number of processors per simulation or the number of parallel simulations. OpenFOAM offers the flexibility of utilizing all available processors for a single simulation, or for launching a large amount of parallel simulations. Thus OpenFOAM allows utilizing the available hardware to its full potential. The nonexistent license fee
3

is however not the only benefit. The lack of license constraints means that OpenFOAM can be customized to suit any workflow. Tasks ordinarily requiring manual interaction can be automated. Everything from mesh generation, simulation, post-processing and plotting can be automatically performed for complex matrices of initial conditions, boundary conditions, uid properties and geometries. All parts of an OpenFOAM simulation, from pre-processing to post processing, can be automated using the python library PyFoam.

Discussion
The relations between the knowledge learned and OpenFOAM software.

OpenFOAM is constituted by a large base library, which offers the core capabilities of the code: Tensor and field operations Discretization of partial differential equations using a human-readable syntax Solution of linear systems Solution of ordinary differential equations Automatic parallelization of high-level operations Dynamic mesh General physical models o Rheological models o Thermodynamic models and database o Turbulence models o Chemical reaction and kinetics models o Lagrangian particle tracking methods o Radiative heat transfer models o Multi-reference frame and single-reference frame methodologies

The capabilities provided by the library are then used to develop applications. Applications are written using the high-level syntax introduced by OpenFOAM, which aims at reproducing the conventional mathematical notation. Two categories of applications exist: 1. Solvers: they perform the actual calculation to solve a specific continuum mechanics problem 2. Utilities: they are used to prepare the mesh, set-up the simulation case, process the results, and to perform operations other than solving the problem under examination

OpenFOAM contains a suite of numerical tools to solve a range of problems in engineering and science. It includes methods to solve problems where matter is represented as a continuum and where it is represented by discrete particles. To solve equations for a continuum, OpenFOAM uses a numerical approach with the following features: Segregated, iterative solution: For the system of equations governing our problem of interest, separate matrix equations are created for each equation, and are solved within an iterative sequence (as opposed to created one, big matrix equation for the entire system of equations). Finite volume method: Matrix equations are constructed using the finite volume method applied to arbitrary shaped cells (any number of faces, any number of edges). Collocated variables: The solution variable for each matrix equation is defined at cell centres. Equation coupling: The coupling between equations, particularly pressure and velocity is performed using adapted versions of well-known algorithms such as e.g. PISO and SIMPLE.

Here are some of the numerical methods in OpenFOAM : Time integration Backward Euler: Euler Steady state solver: steadyState Crank-Nicholson: CrankNicholson Gradient, divergence, Laplacian and interpolation schemes Second order central dierence: linear Fourth order central dierence: cubic First order upwind: upwind First/second order upwind: linear Upwind Linear solvers Preconditioned (bi-)conjugate gradient: PCG, PBiCG Basic iterative method (e.g. Gauss-Seidel): smoothSolver

Geometric and algebraic multigrid: GAMG Turbulence models k-: kEpsilon k-: kOmegaSST LES OpenFOAM comes with many of precompiled solvers ready for use. The most important of these are: 1. laplacianFoam : Solves a simple Laplace equation, e.g. for thermal diusion. 2. potentialFoam : Potential ow solver. 3. scalarTransportFoam Solves a transport equation for a passive scalar. 4. icoFoam Transient solver for incompressible and laminar ow. 5. simpleFoam Steady-state solver for incompressible and turbulent ow. 6. pisoFoam Transient solver for incompressible and turbulent ow. 7. sonicFoam Transient solver for sonic ow of a compressible gas. 8. interFoam Two phase incompressible ow, using the VOF method. 9. dnsFoam Direct numerical simulation of isotropic turbulence. 10. electrostaticFoam Solver for electrostatics. The application of OpenFOAM in civil and environmental engineering applications. 1. Simulation of Wave Induced Forces on Semi Submerged Horizontal Cylinders It is possible to generate waves in OpenFOAM using the included groovyBC package. All settings within OpenFOAM are controlled by means of text files called dictionaries. Each case consists of multiple dictionaries organized in a specific file structure, as specified in the OpenFOAM user guide. In accordance with this structure, all input parameters required to generate waves using the blending method is divided into two dictionaries placed in the constant directory. The waveGeneratorsDict specifies all parameters concerning the blending zones, and wavesDict contains the wave parameters. Multiple zones can be specified in the waveGeneratorsDict dictionary, each zone in a separate sub-dictionary. Required input parameters are the zone position, dimension and orientation, as well as the blending function and wave type to blend with. Any of the wave types specified in the wavesDict dictionary can be used. Some of the blending functions accept input parameters for adjusting the profile shape. For instance the exponent in some equations can easily be adjusted. All parameters can be specified for the three field velocity, pressure and VOF phase fraction and blending can be turned on or off individually for each field. By enabling the debug switch a number of additional fields are saved for each
7

timestep. The fields show the position, orientation and wave shape enforced for each zone. Each additional field require a large amount of disk space and thus the debug switch should only be enabled to initially in order to verify the zone layout. The wavesDict dictionary can contain parameters for several different wave types, each in a separate sub-dictionary. Each wave type sub-dictionary contains a wave model and its corresponding phase shift, propagation direction, amplitude, frequency and basin depth. The infoWaves utility computes the coefficient values for the same three cases, thus providing a method for verifying that the coefficients have been accurately implemented. CHALMERS, Naval Architecture, Masters Thesis X-11/271 15. The utility initWaves functions similarly to the OpenFOAM bundled setFields utility, used to initiate the VOF phase fraction field. However initWaves is also capable of initializing wave fields for any of the wave types specified in the wavesDict dictionary. Thus it is possible to initialize a simulation with a fully developed wave field over the entire basin, or a still surface.

2. Coastal and offshore eingineering OpenFOAM which have been found to be suitable for use in wide ranges of problems from complex fluid flow involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics, as well as coastal and offshore problems. The solvers we used in our numerical simulations, known as the interFoam solvers, solve the incompressible Navier-Stokes equations using the PISO scheme. They solve for both the water and the air in a domain using a Volume of Fluid (VoF) approach to define the interface between the phases. A wide variety of turbulence models, discretisation schemes and other parameters can be specified. (Gerald C J Morgan and Jun Zang) There are three validation cases to test the ability of OpenFOAM for use in coastal and offshore eingineering: a simple, two-dimensional case of regular waves passing over a submerged breakwater; a much more complex, three-dimensional case for regular waves and focussed wave groups interacting with a vertical cylinder; and some preliminary results from a two-dimensional case for waves interacting with a porous breakwater. These three validation tests, taken together with other work on OpenFOAM in other fields suggest that CFD tools such as OpenFOAM are able to produce results to a reasonable accuracy for a wide variety of wave conditions and geometries in coastal and offshore engineering. The fact that these results can be generated in a reasonable time makes OpenFOAM a potentially very useful tool for researchers and practising engineers & designers. interFoam is one of the solvers included in OpenFOAM. It solves the threedimensional Reynolds Averaged NavierStokes (RANS) equations for two incompressible phases using a finite volume discretisation and the volume of fluid (VOF) method. In VOF each phase is described by a fraction i occupied by the
8

volume of fluid of the ith material in the cell. Its principal advantages are that it is very simple, allowing very complex free surface configurations to be represented easily and that it involves no mesh motion. A minor disadvantage is that it becomes less effective as surface tension effects increase. However, most of the times in coastal engineering practical applications we are dealing with relatively long wave lengths, so that only for very specific phenomena surface tension forces are not negligible. It supports several turbulence models (e.g. , SST, and LES). Regarding coastal engineering purposes, it supports two phase flows with several turbulence models out of the box. However, it is not adapted to deal with most coastal engineering simulations as it lacks specific boundary conditions for realistic wave generation and active absorption or porous media as other 3D models recently. Nevertheless, its computational scheme is less robust, because it relies in the cutting cell method, which can have less computational cost, but also involves a less realistic behaviour compared with the adaptive meshing method of OpenFOAM.

3. Hydrothermal system in reservoir and environment Numerical simulation of hydrothermal systems has played an important role in the modeling of geothermal reservoirs for the past decades. For researchers it has been used to test competing hypothesis in these complex data-poor environments and in industry numerical simulation has become standard practice in the planning and management of the development of geothermal fields [OSullivan, 2001]. The earliest efforts to apply numerical models to geothermal reservoirs were made in the early 1970's, while the usefulness of numerical modelling did not begin to gain acceptance by the geothermal industry until after the 1980 Code Comparison Study [Stanford Geothermal Program, 1980]. Since that study was performed, the experiences gained in carrying out site-specific studies as well as generic reservoir modeling studies have led to a constant improvement in the capabilities of numerical reservoir models. Numerical modeling of hydrothermal systems is often defined by which components of the system are taken into account. Traditionally they have been divided into hydrological (H), thermal (T), mechanical (M) and chemical (C). Those components are coupled together in a way that is inherently multiscale in nature, such that their temporal and spatial scales vary be several orders of magnitude [Ingebritsen et al., 2010]. Because of the complex nature of those couplings, models involving all four components are rare. The equations that describe hydrothermal systems are sufficiently complex so that they can only be solved analytically, for a highly idealized set of initial and boundary conditions. Such cases usually only involve one of the four (HTMC) components. Some analytical solutions also exists for two components, such as the description of a boiling front moving through a porous medium and the advance of a diffused salt water wedge in a confined aquifer [Henry, 1964]. These
9

analytical solutions are very important in validating numerical models that are supposed to handle more complicated problems.

Conclusion
OpenFOAM, a free, open source and multipurpose CFD code, consolidated, widely used and rapidly extending, is upgraded to deal with applications in civil and environmental engineering OpenFOAM is suitable for use in wide ranges of problems from complex fluid flow involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics, as well as coastal and offshore problems. In conclusion, Openfoam is an adequate choice to address most of the civil and environmental engineering problems. Numerical method is an essential method to solve the problem large systems of equations, nonlinearities, and complicated geometries that are not uncommon in engineering practice and that are often impossible to solve analytically. Most of the numerical methods are designed for implementation on computer and OpenFOAM is the one of the most useful and efficient programming software.

10

References

1. Jasak, H., Jemcov, A., andTukovic, Z. (2007). OpenFOAM : A C ++ Libraryfor Complex Physics Simulations . In International Workshop on Coupled Methods in Numerical Dynamics, volume m, pages 120. 2. Pablo Higuera, Javier L. Lara, Inigo J. Losada, (2012). Realistic wave generation and active wave absorption for NavierStokes models: Application to OpenFOAM 3. Beji, S. & Battjes, J. A. (1993). Experimental investigation of wave propagation over a bar. Coastal Engineering, 19 151162. 4. Henry, H. R. (1964). Effects of dispersion on salt encroachment in coastal aquifers. Sea water in coastal aquifers, 70. 5. Lin, P. P., L.F.L. (1999), Internal Wave-Maker for Navier-Stokes Equations Models. Journal of Waterway, Port, Coastal and Ocean Engineering, vol. 125, no. 4, pp. 207-215. 6. J.L. Lara, M. del Jesus, I.J. Losada, (2012). Three-dimensional interaction of waves and porous coastal structures. Part II: Experimental validation. Coastal Engineering, 64 (2012), pp. 2646 7. Hu, Z. Z., et al. (2011), Numerical Simulation of Floating Bodies in Extreme Free Surface Waves. Natural Hazards and Earth System Sciences, vol. 11, pp. 519-527. 8. Weller, H. G.; Tabor, G.; Jasak, H. & Fureby, C. (1998) A tensorial approach to computational continuum mechanics using objectoriented techniques. Computers in Physics, 12(6): 620631. 9. Chapra- Canale. (2009). Numerical methods for engineers, Sixth edition. 10. Openfoam web site. http://www.openfoam.com 11. L.F. Chen, G.C.J. Morgan, J. Zang, A. Hillis and P.H. Taylor. Modelling waveinteractions with a surface-piercing vertical cylinder using OpenFOAM

11

12. Morgan, G. and Zang, J. (2011). Application of OpenFOAM to Coastal and Offshore Modelling. In: The 26th International Workshop on Water Waves and Floating Bodies, Greece. 13. IAPWS (2007). Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. Technical Report August 2007, Lucerne, Switzerland. 14. Dixon, A. G., Greated, C. A., and Salter, S. H. (1979), Wave Forces on Partially Submerged Cylinders. Journal of the Waterway Port Coastal and Ocean Division, vol. 105, no. 4, pp. 421-438.

12

Das könnte Ihnen auch gefallen