Presentation is loading. Please wait.

Presentation is loading. Please wait.

Use of OpenFOAM in Modelling of wave-structure interactions

Similar presentations


Presentation on theme: "Use of OpenFOAM in Modelling of wave-structure interactions"— Presentation transcript:

1 Use of OpenFOAM in Modelling of wave-structure interactions
Lifen Chen Supervisors: Dr JunZang, Dr Andrew Hillis, Prof Andrew Plummer Architecture and Civil Engineering department University of Bath Hello, everyone. My name is Lifen Chen, a 2nd year PhD in Arch & Civil Engineering department. My research topic is modelling of wave-structure interactions using OpenFOAM, one kind of CFD codes. (Today I am going to talk about modelling of wave-structure interactions using OpenFOAM, one kind of CFD codes.) Bath HPC symposium 4th, June, 2013 Bath, UK

2 Background Ocean waves: wind generated waves Irregular waves
wind-generated waves are surface waves that occur on the free surface of oceans, seas, lakes, rivers, and canals or even on small puddles and ponds. They usually result from the wind blowing over a vast enough stretch of fluid surface. Waves in the oceans can travel thousands of miles before reaching land. Wind waves range in size from small ripples to huge waves over 30 m high. Stokes' wave theory is of direct practical use for waves on intermediate and deep water. It is used in the design of coastal and offshore structures, in order to determine the wave kinematics (free surface elevation and flow velocities). The wave kinematics are subsequently needed in the design process to determine the wave loads on a structure.[2] For long waves (as compared to depth) – and using only a few terms in the Stokes expansion – its applicability is limited to waves of small amplitude. In such shallow water, a cnoidal wave theory often provides better periodic-wave approximations. Wind waves are mechanical waves that propagate along the interface between water and air; the restoring force is provided by gravity, and so they are often referred to as surface gravity waves. As the wind blows, pressure and friction forces perturb the equilibrium of the water surface. These forces transfer energy from the air to the water, forming waves. The initial formation of waves by the wind is described in the theory of Phillips from 1957. Ocean waves are wind generated waves. (Waves are generated when the wind blowing over the free surface of oceans, seas as well as rivers and so on.) Energy is transferred from the wind to the waves. Generally, waves in real ocean are irregular waves shown on the top left. Wave loading is a key factor considered for coastal and offshore structure design. Additionally, wave energy is one of the most environmentally benign 良好的 forms of electricity generation. So people started studying waves since a long time ago. Waves can be described mathematically. Regular wave is the simplest one, shown on the right down hand side. Firstly, let me share some information about my research. As many of you know, waves are generated when the wind blowing over the free surface of oceans, seas as well as rivers. Energy is transferred from the wind to the waves. Generally, waves in real ocean are irregular waves shown on the top left. In intermediate and deep water, wave motion can be defined by sine or cosine function, what is called regular wave, shown on the bottom right. Intermediate and deep waters Approximations Regular waves: sine/ cosine function

3 Background The wave motion can be describe by several parameters, which are called wave parameters. They are wave amplitude, which is the distance from mean water level to wave crest, water depth, distance from sea bed to mean water level, wave length, distance between two wave crest. And wave period is another important parameter. People started studying waves since a long time ago. Several parameters are used to describe the wave motion. They are wave amplitude, which is the distance from mean water level to wave crest, water depth, distance from sea bed to mean water level, wave length, distance between two wave crests. And wave period is another important parameter to show the periodic character of waves. Wave motion: Wave amplitude/elevation Water depth Wave length

4 Background Waves are generated by the wind as it blows across the sea surface. Energy is transferred from the wind to the waves. Wave energy has the potential to be one of the most environmentally benign 良好的 forms of electricity generation. It is a clean and renewable energy source and its potential is huge. Devices capable of extracting power from the sea and wind energy are needed. Wave loading on the structure is key factor considered for structure design. A method is required to predict wave loading on the structure. ( wave-structure interaction). Wave and offshore wind energy are clean and renewable energy sources and their potential are huge. Devices capable of extracting power from the sea and wind energy are needed, such as WECs on the left hand side and wind farm, shown on right hand side. Wave loading on the structure is key factor considered for structure design. A method is required to predict wave loading on the structure. This slice shows some examples of coastal and offshore structures. They are PowerBuoy, one kind of WECs and offshore wind farm. It can be seen that quite a few coastal and offshore structures have cylindrical parts.

5 Background Computational Fluid Dynamic (CFD): OpenFOAM
Open Source C++ library Suitable for use in wide ranges of problems OpenFOAM, one of CFD codes, is an free, open source C++ library that one can download from the website freely. It is suitable for use in wide ranges of problems, such modelling of airflow, vortex, scour, as well as free surface motion. Additionally, in my research group, it has been applied in coastal engineering successfully. Following the success, my research focuses on modelling of renewable wave energy using OpenFOAM.

6 Parallel processing capability of OpenFOAM
Default Domain decomposition openMPI Terminal commands decomposePar mpirun --hostfile <machines> -np <nProcs> <foamExec> <otherArgs> -parallel > log & reconstructPar The OpenFOAM case can run in parallel by default. The method used by OpenFOAM is known as domain decomposition, in which the geometry and associated fields are broken into pieces and allocated to separate processors for solution. And the parallel running uses the public domain openMPI implementation of MPI( of the standard message passing interface (MPI)). Generally, if you want to run the case in parallel, there are three basic terminal commands which are shown here. The process of parallel computation involves: decomposition of mesh and fields; running the application in parallel; and, post-processing the decomposed case as described in the following sections. The parallel running uses the public domain openMPI implementation of the standard message passing interface (MPI). decomposed OpenFOAM case is run in parallel using the openMPI implementation of MPI. openMPI can be run on a local multiprocessor machine very simply but when running on machines across a network, a file must be created that contains the host names of the machines. After a case has been run in parallel, it can be reconstructed for post-processing. The case is reconstructed by merging the sets of time directories from each processorN directory into a single set of time directories.

7 Cases Computational domain: 30m × 2m × 1.01m (half domain)
8 cases: various wave parameters The experimental results for the waves hitting on a fixed vertical cylinder have been reproduced. The cylinder diameter is .25m and the water depth in a shallow basin is about half meter. The detail of the experiments can be found in this paper. Currently, we focus on 8 different cases with various wave parameters, for each case, a computational domain is built. The length is 30m, width is 2m, and the height is about 1m. Zang, J. and Taylor, P. H etal.(2010) Steep wave and breaking wave impact on offshore wind turbine foundations—ringing revisited 25th IWWWFB, China

8 Computational Cost (Multi-cores)
Cells: Cores: 4 cores Computational time: 5 days Size of output files: 90GB For CFD, the solution and time domain are discretised into a number of cells and time steps. (in order to solve the partial differential equations, converted into algebraic equations) For my case, the total number of the cell is about 1.5 million per case, the size of the output files is about 90GB per case. The cases were run in parallel using local desktop with 4 cores. It took 5 days to get the desired results. Noting that 5 days is just for 1 case with static mesh. And in future, I don’t know how many cases I will have, may be 50, may be 100. And as the research continue, I would definitely use the dynamic mesh. The computational cost would be huge. Cases: ? Static mesh Dynamic mesh

9 Results Has been applied in ocean engineering successfully.
Can predict wave loading on the fixed structure correctly. This slice shows the results in both 2D and 3D. The numerical results are compared to experimental data. It can be concluded that the present model based on OpenFOAM can predict the wave loading on a fixed structure correctly. Its capacity in ocean engineering has been proved. It is worth noting that the overall numerical solution is affected by several factors, like BCs, mesh type and resolution as well as input wave parameters. They should be checked carefully, a series of trials were carried out before you get the right answer. In a word, modifying the source code, debugging the program as well as running the trials, they all increase the computational cost. Running cases in parallel in Aquila, local HPC system, is a good way to address this problem. (If every trial spends you 5 or more days. I don’t think 3 years is enough for me to finish my PhD study. It is very necessary to reduce the computational cost. It is not only good for my phd study but also good for its practical application.) In adaptions of the source code… A series of trials: Boundary conditions mesh type and resolution wave parameters…..

10 Running in parallel (Aquila)
OpenFOAM vs. OpenFOAM-1.5 PC vs Aquila testing The OpenFOAM installed in Aquila is version 1.5 different from OpenFOAM-2.1.0, installed in my desktop. In order to check the difference between the two version and learn how to run the case in parallel in aquila, a simple case is built, shown here. Initially, the output boundary is set to be totalPressure, which means that the total pressure on this boundary is fixed. The case can run stably in my desktop but it crashed after 7s when ran in aquila. So I changed the boundary condition to be zeroGradient. This time the case can run stably in aquila too. The case is run in parallel with 4 cores and 4 processors respectively. Boundary conditions: attempted: totoalPressure for output boundary PC: stable Aquila: dump after 7s modified to: zeroGradient PC: stable Aquila: stable Running the case PC: 4 cores Aquila: 4 processors

11 Running in parallel (Aquila)
t = 5s t = 10s t = 15s t = 20s t = 25s The comparison between these two results are done and shown in this slice. There are small discrepancy between the results. Not sure if it caused by version difference or by running in aquila. Further study is needed. Green line : PC results, red line: Aquila results

12 Increase computational cost
Future work Simulation interactions between waves and floating bodies. dynamic mesh Simulation interactions between waves and real WECs. complex geometries and structures’ shape Finally, I would like to introduce my future work. That is, simulation interactions between waves and floating bodies and real WECs. First one would need dynamic mesh, the second one would lead to complex geometries and structures’ shape. All these would increase computational cost sharply. It is very important to run the case using local HPC system to save the time and help finishing the PhD study in time. Increase computational cost

13 Thank you!


Download ppt "Use of OpenFOAM in Modelling of wave-structure interactions"

Similar presentations


Ads by Google