Comparing Open-Source BEM solvers for analysing wave energy converters

Ocean wave energy has immense potential and can provide at least twice as much electricity as globally produced now due to its high energy density. In order to efficiently extract this energy and make this commercially viable, Wave Energy Converters (WECs) need to interact with the resource in an optimized way for the expanse of sea states. This interaction is critical to power production by these devices and hence an accurate modelling of this is paramount. The Boundary element method (BEM) based on the linear potential flow theory has yielded accurate results at low computational costs when compared to complex Computational Fluid Dynamics methods. Hydrodynamic Analysis of Marine Structures (HAMS) and Capytaine are recently developed open-source BEM frequency domain solvers, originally created for large marine structures. These solvers have since been utilized for studying wave energy converters, though, for very few converter geometries. Owing to the implementation of parallelization in both HAMS and Capytaine, both these solvers could be capable for significantly lower computational costs as compared to the traditional BEM solvers such as Nemoh. This research aims to compare hydrodynamic coefficients and computational costs in Nemoh, HAMS and Capytaine for various WEC geometries.


Introduction
Given its high energy density, ocean wave energy can provide at least twice as much electricity as globally produced in the world [1].Apart from the vastness of the resource, waves are more predictable, and available throughout the year when compared with other forms of renewable energy.For the rapid development of the wave energy industry, it is essential to develop efficient numerical tools which would offer the advantage of employing significantly less expenses as compared to performing physical tests on scaled models using wave tank testing.
BEM is perhaps the most common numerical method for studying wave-structure interaction in the field of wave energy with those employing the linear potential flow theory being the most popular.There are well established commercial codes such as WAMIT [2] and ANSYS AQWA [5] as well as open-source codes such as Nemoh [3], Aquadyn and Aquaplus [6] with WAMIT and Nemoh being the most popular.Capytaine [4] and HAMS [10] are two recently developed open-source solvers for modelling wave-structure interaction and provide valuable options to meet the numerical challenges within the field of ocean engineering, particularly the possibility of low computational effort with good accuracy.
This research makes some comparisons between the open-source solvers Nemoh, HAMS and Capytaine for two different types of WECs: a semi-immersed cylindrical Point Absorber (PA) and a semi-immersed Oscillating Surge Wave Energy Converter (OSWEC).The compared parameters include hydrodynamic coefficients, exciting forces and computational efficiency.Within the context of the IOP Publishing doi:10.1088/1742-6596/2647/7/072002 2 dynamics of wave energy converters, the hydrodynamic coefficients and exciting forces can be used to obtain the Response Amplitude Operators (RAOs) from the dynamic equation of motion of the floating devices in the frequency domain.The derivation of the RAOs is not part of this research.
Although the Cylindrical PA has been widely studied with BEM solvers as a simple benchmark case( [9], [10], [12], [13]), it has been chosen here to show an example of the capability of HAMS to efficiently remove the so-called 'irregular' frequencies, which is also possible on the commercial solvers such as WAMIT or Aquadyn.Additionally, the case of OSWEC is demonstrated as this has only been analyzed previously with Nemoh and HAMS.Looking deeper into the algorithms used within these solvers, all of them employ panel methods based on the linear potential flow theory, which uses the Green's function to solve the diffraction/radiation problem of the source distribution on the surface of the body.Based on this, Boundary Integral Equations (BIE) are established using specific Green's function that satisfy the free surface condition and wave radiation condition at infinity.Nemoh and Capytaine employ an interpolation based on a look-up table to solve for the wave part of the Green's function [13] while HAMS employs algorithms based on Newman's approximation methods for solving the free surface Green's function, thus running these approximations for each individual run.

BEM
While Nemoh has been shown to provide good solutions for many problems in wave-structure interaction, it is still susceptible to 'irregular frequencies', which are purely numerical and arise from ill-conditioning in the BIE problems, sometimes resulting in large underestimation or overestimation of hydrodynamic parameters at certain frequencies [7].These are shown to coincide with the eigen frequencies of the hypothetical sloshing modes, which are obtained from the internal Dirichlet problem [11] and numerically caused by the interaction of the water-plane section of the floating bodies intersecting with the free-water surface [10].HAMS is capable of tackling this by discretizing the free surface within the body and solving an extended BIE problem ( [2], [10]).

Hydrodynamic analysis of WEC devices using BEM
In this section, the geometries of the examined two types of WECs are initially introduced.This is followed by the comparison of the hydrodynamic coefficients and exciting forces.

Semi-immersed cylindrical point absorber (PA)
A cylindrical PA of height 3.0 m and radius of 3.0 m radius is considered.Its draft is 1.5 m, thus, it is modelled as a truncated cylinder.The center of gravity coincides with the origin of the global coordinate systems oxyz located at the Mean Water Level (MWL), while the center of buoyancy is at 0.75 m below the MWL.Deep water condition is considered for the PA.
In order to remove the irregular frequencies in HAMS, an additional water-plane mesh needs to be provided as input when running the simulation.Hence, two cases are considered here: Case (a) -Only hull, where, just the hull of the structure is modelled and Case (b) -Hull and water plane, where both the hull and the interior water-plane are modelled to enable the removal of irregular frequencies.The interior water-plane is modelled with an additional mesh applied at the level of the MSL within the circumference of the cylindrical PA.The meshes for the two cases are shown in figure 1 and figure 2.
The mesh in figure 1 is used for the hull in Nemoh, HAMS and Capytaine.The mesh in figure 2 is used for removal of irregular frequencies for HAMS.As seen in figures 3, 4 and 5, the results of Nemoh, HAMS and Capytaine are relatively close.The hydrodynamic coefficients and exciting forces of Nemoh and Capytaine are almost identical, which reinforces the similarity of the backend algorithms used.Slight deviation is observed for frequencies > 3 rad/s for the A33 when comparing Nemoh/Capytaine with HAMS.Additionally, in Case (a) when not solving for irregular frequencies, a small jump is observed in HAMS while a larger jump is observed for Nemoh/Capytaine at the 'irregular frequency' (close to 3 rad/s) for A33 and B33 for the same case.This could possibly come from the differences in the way the Green's function is computed in HAMS and Nemoh/Capytaine.
As seen in figures 6, 7 and 8, the irregular frequency is suppressed in HAMS when comparing it with Nemoh and Capytaine.In this case, a hull and water mesh is given as input for the simulation in HAMS.HAMS employs an extended boundary integral equation which assumes that the potentials in the interior of the water plane are zero.This equation is hence used as an additional equation to the input boundary integral equations which are solved on the hull surface simultaneously [10].

Semi-immersed oscillating surge WEC (OSWEC)
The dimensions of the OSWEC were taken from [12] and correspond to the Oyster device.The height of the device, h, is 12.0 m, its length is 20.0 m and its width is 2.0 m.The draft is considered equal to 10.0 m.The OSWEC is bottom hinged.In order to emulate this condition in the analysis, the center of rotation was taken at the bot-tom (z = -10.0m).The shallow water depth of 10.5 m was considered, to keep the bottom of the OSWEC close to the sea bottom.The mesh (hull) of the OSWEC model in HAMS is shown in figure 9.
The hydrodynamic coefficients and exciting forces for the OSWEC are shown in figures 10, 11 and 12 respectively.Only pitching degree of freedom was considered here.Exciting forces, F5, are normalized by ρgAh 3 , while added mass, A55, and radiation damping, B55, coefficients by ρh 5 and ρωh 5  respectively.From figures 10, 11 and 12, it can be observed that the results for all solvers are close.HAMS slightly differs in the pitch added mass, radiation damping and exciting force when compared to Nemoh and Capytaine close to 0.75 rad/s.

Comparison of Computational Time
For making a fair comparison of the three solvers, the simulations were carried out in the same device.The device is a 64-bit laptop with 16 GB RAM, 4 cores and Intel i7-1185G7 processor of 3.00 GHz CPU.The comparison of the computation effort is shown in table 1. 80 frequencies between 0.2 and 4.2 rad/s were considered for the analysis.While Nemoh does not have the capability for parallelizing the calculation, both Capytaine and HAMS have the capability to do this.HAMS uses OpenMP parallelization while Capytaine allows for two types of parallelization -through OpenMP and through joblib.When solving a single problem, matrix constructions and linear algebra operations can be parallelized through OpenMP.This can be controlled using the environment variable OMP_NUM_THREADS on a Windows system.When solving multiple problems, joblib can be utilized in addition to OpenMP to run multiple jobs.The calculations performed with 8 threads in Capytaine as seen in Table 1 were performed utilizing both OpenMP and joblib with running 8 jobs simultaneously.Further research into an optimized way of utilizing OpenMP and joblib could help make Capytaine faster.This was not done as part of this research.
From table 1, it can be seen that HAMS is faster than Nemoh (about 15 times for the case of PA with only hull mesh) and Capytaine (2-3 times for the PA) when using the parallelization in both HAMS and Capytaine.Similar results were observed for the OSWEC, albeit the multipliers were slightly lower.It should be noted that for the OSWEC case, the diffraction and radiation problem in Nemoh was solved only for pitch, while in the case of HAMS and Capytaine, this was done for all DOFs.When irregular frequency removal is taken into account, HAMS takes 5 times longer for the calculation as compared to Case(a).When comparing the results for the PA (figures 3 to 8), it could be important to check if the water plane mesh is actually required with regard to the range of frequencies that are important to a certain analysis.

Conclusions
This research makes some comparisons among the open-source solvers Nemoh, HAMS and Capytaine for two different types of WECs: a semi-submerged cylindrical PA and a semi-submerged OSWEC.The compared parameters include the hydrodynamic coefficients, excitation forces and the computational efficiency.
For the PA, two cases are highlighted here.Case (a) focuses on the simulation where only the hull mesh is used for all the three solvers.Case (b) focuses on the simulation where the water plane mesh is added to the hull mesh for HAMS.The water plane mesh is added particularly to remove irregular frequencies.When comparing the hydrodynamic coefficients and exciting force for Case (a) and Case (b), it can be concluded that all three solvers are generally close.For the PA case, slight difference is observed in the heave added mass for frequencies greater 3 rad/s between HAMS and Nemoh/Capytaine.IOP Publishing doi:10.1088/1742-6596/2647/7/07200210 Furthermore, when comparing Case(a) and Case(b) for the PA, it can be observed that with Case (b), the irregular frequency is suppressed with HAMS as compared to Nemoh and Capytaine.HAMS employs an extended boundary integral equation which assumes that the potentials in the interior of the water plane are zero.This equation is hence used as an additional equation to the input boundary integral equations which are solved on the hull surface, thus suppressing the irregular frequencies.In the case of the OSWEC, all solvers were generally close.Slight differences in HAMS with respect to Nemoh/Capytaine were observed for the pitch added mass, radiation damping and exciting force close to 0.75 rad/s.
The last segment of this research compares the computational efficiency of the BEM solvers.HAMS is significantly faster than Nemoh for all the simulations going up to 15 times for the case of the PA and 7 times for the OSWEC with only the hull mesh.When comparing HAMS (with OpenMP) with Capytaine (with OpenMP and joblib), HAMS is at least twice as fast.Further optimization of the combination of OpenMP and joblib could make Capytaine faster, but that was not done as part of this study.Considering the inclusion of the water plane mesh (Case (b)) in the case of the PA for removing irregular frequencies effects, HAMS is about 5 times slower than Case (a).Hence, when considering the water plane mesh, it is important to consider if this is really required, given the frequency of interest.If this holds true, a convergence test to set the limit of the mesh size is suggested to obtain accurate results with less computational effort.
Within the domain of open-source solvers for wave-structure interactions, HAMS offers some unique advantages as compared to Nemoh and Capytaine as seen.HAMS and Capytaine have the potential to become more valuable options to meet the numerical challenges within the field of ocean engineering, particularly the possibility of low computational effort with good accuracy.

Figure 1 .
Figure 1.Mesh for the hull (purple) of the cylindrical PA as modelled in Nemoh, HAMS and Capytaine

Figure 2 .
Figure 2. Mesh for the hull (purple) and water plane (cyan) for the cylindrical PA as modelled in HAMS.The global ox (red) oy (green) oz (blue) axes are shown in (a).

4 Figure 3 .
Figure 3. Heave added mass of the cylindrical PA where only the hull mesh is used (irregular frequency highlighted within the red circle)

Figure 4 . 5 Figure 5 .Figure 6 . 6 Figure 7 .Figure 8 .
Figure 4. Heave radiation damping of the cylindrical PA where only the hull mesh is used (irregular frequency highlighted within the red circle)

Figure 9 .Figure 10 . 8 Figure 11 .Figure 12 .
Figure 9. Hull mesh of OSWEC Nemoh is a Matlab/Fortran based BEM solver first released in 2014 and was originally developed by A. Babarit and G. Delhommeau.It is one of the most popular open-source BEM solvers for wave-structure interaction calculations for single body and multi-body interactions of floating rigid structures.HAMS was developed and released in 2019 by Y. Liu as an open-source Fortran based BEM solver for large floating offshore structures.Over the years, it has gained popularity for analysis of single floating structures, but still lacks the capability of solving multi-body wave-structure interaction problems.Capytaine, an open-source Python based BEM solver, was first released in 2019 and is a modified version of Nemoh developed by Matthieu Ancellin.The core routines of Nemoh, written in Fortran, were updated into a modern coding style together with a linear solver based on numpy and scipy libraries.While Nemoh does not allow for parallelization of the calculations, both HAMS and Capytaine are capable of parallelized calculations.

Table 1 .
Comparison of computation time of the applied BEM solvers