A Review of Software Tools to Study the Energetic Potential of Tidal Currents

: Tides can be a vast and predictable source of renewable energy. Due to the solar and lunar inﬂux on our planet, they move large amounts of water periodically, and this energy can be harnessed using devices designed and positioned adequately, such as current turbines. However, the relation between the energy obtained with actual devices and the economic and environmental cost of their installation limits the practical application of these solutions. In order to optimize the design of this technology and achieve its successful installation and use, a detailed knowledge about the energy potential of tides at the speciﬁc location is necessary. This calculation is not easy and requires the use of specialized software tools. Currently, there is no speciﬁc software to evaluate the tidal currents energy potential, but there are more than a few codes able to calculate the hydraulic ﬂow in rivers, estuaries and coastal regions. These programs are usually used for the calculation of pollutant dispersion and ﬂoods, but they can be adapted with more or less success. This paper reviews the available 1D, 2D, and 3D software tools with the aim of analyzing their functionality and their validity to evaluate the energy potential of tidal currents.


Introduction
The worldwide theoretical tidal energy potential, which is the energy derived by the changes in sea level, caused by the gravitational attraction of the moon, the sun and other astronomical bodies on oceanic water bodies, has been estimated at~7800 TWh/year in 2011 [1].
Tidal energy can be harnessed in two forms: taking advantage of the height difference (head) between high and low tides in tidal dams or using the kinetic energy of marine currents in energy devices, mainly tidal current turbines. Although the technology of tidal dams is mature and reliable (most tidal dams have been built between the 1960s and 1980s), these projects have not been widely extended because of their environmental impact and high construction costs. In recent years, that situation has prompted the research on hydrokinetic turbines to obtain energy from the tidal currents in coastal zones [2].
Nowadays prototypes that take advantage of marine currents are the focus of an intense investigation in order to reduce installation investments as well as operation and maintenance costs [3]. Those installations are beginning to attract the interest of investors, mainly due to the predictability and amount of the resource [4].
To analyze the hydrokinetic power of tidal currents is important to realize that this power has a direct relationship with the velocities involved. Specifically, the tidal current power per m 2 is defined as where, • P is the hydrokinetic power (W/m 2 ) • v is the velocity of the current (m/s) • ρ is the water density (kg/m 3 ) The energetic potential is defined as where, • E is the energetic potential calculated in a certain period (Wh/m 2 ) Both power and energy depend on the cube of the current speed. They are greatly boosted by any small increment in the available velocity. The variability of the sea water density is much lower than the current speed. Therefore, the velocity can be considered as the only relevant factor for estimating the potential of the currents.
To evaluate the feasibility of a possible energy installation based on devices obtaining energy from tidal currents, the first issue is to know the energetic potential (of tidal currents) in the site of study. This usually implies the development of a hydrodynamic numerical model using a specific tool (or code) validated by field measurements.
There are one-, two-, and three-dimensional commercial codes, widely used to obtain hydraulic dynamic models for different purposes, usually sediment and pollutants transport and flood studies (in rivers, estuaries and coastal regions). If they can be easily adapted to calculate tidal energy potential, they could be a very useful tool, as they are contrasted and have been used for many years, with an important user´s and developer´s communities and, therefore, experience and support. Recently a study has been published analyzing the applicability of these codes to calculate the tidal range energy potential [5]. This application is relatively simple because it only involves the sea level changes and does not have to take into account the machinery. However, the studies concerning the energy potential of tidal currents are relatively scarce and with a wide range in depth and quality. Preliminary studies do not consider the variations of the velocity field due to the presence of turbines, while in the most complete their presence is considered through different approaches [6,7].
To model tidal hydrokinetic turbines, it is important not only to take into account the energy extracted but also, the blockage effect produced. Mainly, there are two different methodologies that are employed: the losses approach and the momentum sink approach. The first one considers that the energy extraction by hydrokinetic turbines is equivalent to an energy drop produced by a singular loss or an increment in the bottom friction losses. It have been used in 1D analytical models [8,9] and 2D models [10]. The momentum sink approach is based on the actuator disc theory, and alters the momentum equations in the cells where the hydrokinetic turbines are positioned, by including an equivalent external momentum sink provided by Yang et al. [11]. It has been used in 3D models demonstrating that, with 3D mesh adaption (flexible mesh) to the turbines, more accurate results are obtained comparing them to those to 2D codes results that do not take into account the real profile of the velocity field around the turbine, and therefore overestimate the energy extraction [12].
In addition to the turbine models, when these codes are specifically used to study the tidal currents, it is essential they have the possibility of obtaining results for unsteady regimes and flow discontinuities, as wave fronts or hydraulic jumps. 1D software tools are a simplified option, suitable when the tidal currents have a predominant direction. The information needed to elaborate the geometrical model is small (transversal sections separated a certain distance) and requires few computational resources. 2D software tools are more suitable than 1D in cases of abrupt variations of the geometry (narrowings, curves, etc.), because the tidal currents are highly bidimensional. They require an increased computational time and more accurate information to elaborate the geometrical models. Nowadays, the three dimensional (3D) numerical models provide the most realistic analysis of the flow behavior, however, they involve the highest need of computational resources details of the geometry. This paper presents a review of the existing 1D, 2D, and 3D codes, analyzing their characteristics and looking into their functionality to perform evaluation of the energetic potential of tidal currents.

Main Characteristics of 1D, 2D, and 3D Codes
Numerical codes applied for the description of tidal flows must take into account different numerical difficulties, such as complex geometries, large size domains, and the determination of the free-surface, which represents a mobile boundary condition. Therefore, these codes must assume certain simplifications, looking for a compromise between accuracy and computational costs.
Regarding 1D and 2D numerical codes, the most important simplification is that these codes solve a depth-averaged form of the differential Shallow Water Equations also referred as Saint-Venant equations. These equations are obtained from the continuity and momentum Reynolds-Averaged Navier-Stokes (RANS) equations, integrating them over the water depth, assuming incompressible flow and hydrostatic pressure distribution, and thus disregarding the effect of the vertical length scale, as it is much smaller than the horizontal one. Additionally, the turbulence stresses are calculated with Boussinesq assumption, with different eddy viscosity approaches depending on the code. This allows obtaining horizontal depth-averaged velocities and the free-surface height in large domains with affordable computational costs.
These codes use the Saint-Venant equations in their conservative form, which has great advantages when considering solving schemes that allow discontinuities in the solutions (wave fronts or hydraulic jumps). The final conservative equations in vector form are where, • U = (h, hU, hV) is the vector of depth-averaged flow variables; h is the water depth; and U and V are the velocities in the horizontal plane • F(U) is the tensor including spatial variations of the flow variables (or convective terms) • N(U) is the tensor including the turbulent stresses (or diffusive terms) • S is the tensor of source terms; it includes the effects of bed slope and bottom friction and, depending on the code, the wind stress and Coriolis force Regarding 3D codes, they solve the full Navier-Stokes equations (continuity and momentum conservation equations) in 3D geometries for incompressible flow with simplifications due to the usually large zones they are applied to. The most relevant simplification is not considering inertial accelerations in the vertical momentum equation and, therefore, assuming a hydrostatic pressure distribution. The resulting equations are called three-dimensional shallow water equations (3D-SW) [13]. However, for flows where depth cannot be assumed to be much smaller than the horizontal length scale, some models include a nonhydrostatic option [13]. To consider the turbulence effects, the equations are solved (in most cases) with averaged variables, the simplified Reynolds-Averaged Navier-Stokes equations, and completed with turbulent models based on Boussinesq's hypothesis. The codes use different numerical schemes to solve the differential equations. They are based on different spatial discretization methodologies -finite volumes (FV), finite differences (FD) or finite elements (FE)-applied over a mesh dividing the domain into cells. Usually, the codes give the user the possibility of defining the mesh features in the domain: zones of different mesh characteristics, number, geometry and size of the cells, etc. The decision is a compromise between the accuracy and the resolution time. The numerical schemes imply the use of a resolution technique-explicit or implicit-and different order discretization of the derivatives terms-first-or second-order. Additionally, each scheme implements its wetting and drying algorithm, eliminating or including different zones in the calculation while determining the position of the free surface.

1D Codes
The 1D models are the simplest, but also the least accurate ones. They are valid when the tidal flow is one-dimensional or where the direction of the water movement is aligned to the center line of the tidal channel. They solve one-dimensional Saint-Venant unsteady equations (in our case, the tides fluctuations require the unsteady terms). The results obtained with these models are the water depth and the cross-section mean velocity. It is common that these codes do not implement turbulence effects nor Coriolis forces. Additionally, the numerical schemes are mainly implicit FD, but each scheme has its own resolution methods for discontinuities in the flow. In these simulations, the computational effort is typically very low. They are considered useful for a first approach of tidal energy evaluation but, usually, the energetic potential calculation is not very accurate because it does not take into account the section differences. In the following sections, the most used codes are analyzed.

HEC-RAS 1D
HEC-RAS is a free code developed by the Hydrologic Engineering Center (HEC) of the United States Army Corps of Engineers (USACE) [14]. This software includes only the bed slope and bottom friction in the source tensor, with both Manning and Chézy equations. It poses the unsteady flow equations by using an implicit FD numerical scheme based on the four-point implicit Preissmann one [15]. The system of linear equations is solved using a skyline solution algorithm.
Examples of the use of this software in tidal evaluations are the study carried out in the East river in Manhattan (New York, USA) [16] or in the Nalón River [17], the approach used in the last one is shown in Figure 1. Additionally, each scheme implements its wetting and drying algorithm, eliminating or including different zones in the calculation while determining the position of the free surface.

1D Codes
The 1D models are the simplest, but also the least accurate ones. They are valid when the tidal flow is one-dimensional or where the direction of the water movement is aligned to the center line of the tidal channel. They solve one-dimensional Saint-Venant unsteady equations (in our case, the tides fluctuations require the unsteady terms). The results obtained with these models are the water depth and the cross-section mean velocity. It is common that these codes do not implement turbulence effects nor Coriolis forces. Additionally, the numerical schemes are mainly implicit FD, but each scheme has its own resolution methods for discontinuities in the flow. In these simulations, the computational effort is typically very low. They are considered useful for a first approach of tidal energy evaluation but, usually, the energetic potential calculation is not very accurate because it does not take into account the section differences. In the following sections, the most used codes are analyzed.

HEC-RAS 1D
HEC-RAS is a free code developed by the Hydrologic Engineering Center (HEC) of the United States Army Corps of Engineers (USACE) [14]. This software includes only the bed slope and bottom friction in the source tensor, with both Manning and Chézy equations. It poses the unsteady flow equations by using an implicit FD numerical scheme based on the four-point implicit Preissmann one [15]. The system of linear equations is solved using a skyline solution algorithm.
Examples of the use of this software in tidal evaluations are the study carried out in the East river in Manhattan (New York, USA) [16] or in the Nalón River [17], the approach used in the last one is shown in Figure 1.

ISIS 1D
ISIS is a free software developed by Halcrow, CH2M Hill company. They claim that ISIS 1D is able to model open channels and overbank flows in any network [18]. As with the previous software, the ource tensor includes the effects of bed slope and bottom friction with the Manning equation, and the differential equations are discretized by the FD implicit Preissmann four-point scheme. In this case, the matrix is inverted employing a sparse matrix solver.
This code has been widely used in studies of interaction of tides and river flow (tidal rivers) [19].

MASCARET 1D
MASCARET is a free code developed by the French Electricity Board (EDF) and the Center for Studies and Expertise on Risks, Environment, Mobility and Development [20]. In this code, the effect of friction in the momentum equation is calculated with the Strickler relation. The source tensor includes the effects of bed slope and bottom friction. Furthermore, this software handles the Saint-Venant equations with an implicit FD method based on the Wendroff scheme [21]. The discretized equations can be solved with three computational algorithms: SARAP, REZO or MASCARET, depending on the case of study (steady or unsteady) and the flow characteristics [22]. When there is a discontinuity, it uses an implicit or explicit Finite Volume (FV) scheme (depending on the severity of the discontinuity), solved with a Godunov scheme based on the Riemann solver, specifically the Roe one.
There are different examples of studies where this code has been applied to evaluate the hydrodynamic of tidal rivers like the performed in Huelva estuary (Spain) [23].

SOBEK 1D
SOBEK is an integrated software package for river hydraulic modeling, urban or rural management. It has been developed by Deltares in partnership with the National Dutch Institute of Inlad Water Management and Wastewater Treatment (RIZA), and the major Dutch consulting companies. SOBEK 1D includes source terms for the bed slope and the bottom friction, using different roughness definitions: Bos-Bijkerk, Chezy, Manning, Nikuradse, Stricler, or White-Colebrook. It also includes a term for the wind friction. The computation of the water levels and discharges in this software is performed with its own scheme, named Delft scheme [24]. It solves the Saint-Venant equations by means of a staggered grid and uses a minimum degree algorithm with an iterative simulation technique.
An example of the application of this code is the study of the interactions of river discharges with tides made by Horrevoets et al. [25]. There are also studies combining 1D SOBEK (river areas) with Delft 3D (coastal zones) to simulate the hydrodynamic of river estuaries. With this approach, Lam et al. [26] study the zone of Thuan An (Vietnan) and Twigt et al. [27] study river Pearl Delta (Guangdong, China).

MIKE 11
MIKE 11 is a code developed by DHI [28]. It includes tools for modeling complex river channel networks, lakes, and reservoirs. This software provides three different simplifications of the equations, appropriate in function of the flow conditions. The source terms depend on the simplification selected and include bed slope, bottom friction (Chezy or Manning), wind shear stress, etc. It uses a 6-point Abbott implicit FD scheme [29].
There are different examples where this code is used in tidal rivers studies, for instance, the one performed in the Red River delta in Northern Vietnam [30] or in the coast of Bangladesh [31]. It is worth mentioning the enhancement of the characteristics proposed by Panda et al. [32] with a combination of MIKE 11 and an artificial neural network, which can be useful in cases where there are not enough available data to perform hydrodynamic studies. It gives an idea of the possibilities the code has when combined with other developments.

2D Codes
These models are applied to flows with more complex geometries, or when there are some strong variations of the velocity in the cross-section (recirculations, vortex, gradients, etc.). They can obtain a more accurate description of the velocity field and, therefore, a better estimation of the energy potential.
For unsteady cases, like tidal flows, the 2D codes solve the full (two-dimensional) Saint-Venant equations. The results obtained are the water depth and depth-averaged velocities. Basically all of them address the turbulence with the Boussinesq eddy viscosity approach, giving the user the choice of different turbulent models. Furthermore, these 2D codes implement high resolution schemes to obtain accurate results in cases of flow discontinuities (wave front or hydraulic jumps). It is very popular the high precision FV explicit schemes based on Riemann solvers [33,34]. It is also common (when they are an evolution of finite differences 1D codes) the use of resolution schemes based on the FD Alternating Direction Implicit (ADI) methodologies.
As it has been commented, 1D codes are rather limited for the calculation of the energy extracted by the current turbines. The 2D codes, however, are more suitable. None of them has an explicit module to handle current turbines, but they can be simulated using different approaches depending on the capabilities of the software, for example, as an increased bottom roughness or a singular head loss.

HEC-RAS 2D
It is the two-dimensional evolution of the one-dimensional HEC RAS free code, and it is included in the latest version v5.0 of the software [15]. It can handle supercritical and subcritical flow, as well as the transitions (hydraulic jumps) [35]. This code gives the choice of two different equations sets: the full Saint-Venant equations or the simplified 2D Diffusion Wave (2DW) approximation [15]. The simplified approach reduces computational time while limiting the accuracy of the results obtained. When using the full equations, the source tensor includes terms in both the continuity (mass sources and sinks) and the momentum equation (bed slope, bottom friction, and Coriolis Effect). In the case of the 2DW approximation, only bed slope and bottom friction are taken into account in the source tensor. The turbulence is modeled using an eddy viscosity approach, which depends on the flow shear velocity, the depth, and an empirical constant (function of the geometry and bottom/wall surfaces characteristics). Regarding the numerical scheme, it gives the choice between FD and FV methodologies. It can employ a scheme based on the FD Crank-Nicolson second-order explicit scheme or a proprietary FV method.
A recent example of HEC RAS 2D application is the study of the energetic potential of the tidal currents for the Ría del Eo (Spain), which has been performed by the authors. Figure 2 shows a map of the annual energetic potential of this zone. These models are applied to flows with more complex geometries, or when there are some strong variations of the velocity in the cross-section (recirculations, vortex, gradients, etc.). They can obtain a more accurate description of the velocity field and, therefore, a better estimation of the energy potential.
For unsteady cases, like tidal flows, the 2D codes solve the full (two-dimensional) Saint-Venant equations. The results obtained are the water depth and depth-averaged velocities. Basically all of them address the turbulence with the Boussinesq eddy viscosity approach, giving the user the choice of different turbulent models. Furthermore, these 2D codes implement high resolution schemes to obtain accurate results in cases of flow discontinuities (wave front or hydraulic jumps). It is very popular the high precision FV explicit schemes based on Riemann solvers [33,34]. It is also common (when they are an evolution of finite differences 1D codes) the use of resolution schemes based on the FD Alternating Direction Implicit (ADI) methodologies.
As it has been commented, 1D codes are rather limited for the calculation of the energy extracted by the current turbines. The 2D codes, however, are more suitable. None of them has an explicit module to handle current turbines, but they can be simulated using different approaches depending on the capabilities of the software, for example, as an increased bottom roughness or a singular head loss.

HEC-RAS 2D
It is the two-dimensional evolution of the one-dimensional HEC RAS free code, and it is included in the latest version v5.0 of the software [15]. It can handle supercritical and subcritical flow, as well as the transitions (hydraulic jumps) [35]. This code gives the choice of two different equations sets: the full Saint-Venant equations or the simplified 2D Diffusion Wave (2DW) approximation [15]. The simplified approach reduces computational time while limiting the accuracy of the results obtained. When using the full equations, the source tensor includes terms in both the continuity (mass sources and sinks) and the momentum equation (bed slope, bottom friction, and Coriolis Effect). In the case of the 2DW approximation, only bed slope and bottom friction are taken into account in the source tensor. The turbulence is modeled using an eddy viscosity approach, which depends on the flow shear velocity, the depth, and an empirical constant (function of the geometry and bottom/wall surfaces characteristics). Regarding the numerical scheme, it gives the choice between FD and FV methodologies. It can employ a scheme based on the FD Crank-Nicolson second-order explicit scheme or a proprietary FV method.
A recent example of HEC RAS 2D application is the study of the energetic potential of the tidal currents for the Ría del Eo (Spain), which has been performed by the authors. Figure 2 shows a map of the annual energetic potential of this zone.

IBER
IBER was designed by the University groups of GEAMA (University of A Coruña) and Flumen (University of Cataluña) [36]. It is a free software, which includes three computational modules: hydrodynamic, turbulence, and transport of sediment. The code has been applied in different studies of river hydrodynamics, dam break analysis, sediment transport calculation, and tidal flow in estuaries [37]. In the source tensor it takes into account the effect of the bottom friction, bed slope, wind friction on the water surface, Coriolis effect, and many other terms like infiltration, precipitation, etc., including user-defined variables, which can be used for modeling other effects. The turbulence models include constant, parabolic, mixing length, and Rastogi-Rodi k-E eddy viscosity. Regarding the numerical scheme, it combines different FV numerical explicit schemes (one-or second-order accuracy) for the different terms of the equations. Specifically, a high precision Roe scheme is used for convective and diffusive terms, and is adequate in cases of unsteady flow discontinuities (hydraulic jumps or wave fronts). This software uses an unstructured mesh determined by the user. Figures 3 and 4 show the results obtained by the authors of an evaluation of the energetic potential of tidal currents of Ría de Ribadesella (Spain) and Port of Avilés (Spain), respectively.
Energies 2019, 12, x 7 of 18 IBER was designed by the University groups of GEAMA (University of A Coruña) and Flumen (University of Cataluña) [36]. It is a free software, which includes three computational modules: hydrodynamic, turbulence, and transport of sediment. The code has been applied in different studies of river hydrodynamics, dam break analysis, sediment transport calculation, and tidal flow in estuaries [37]. In the source tensor it takes into account the effect of the bottom friction, bed slope, wind friction on the water surface, Coriolis effect, and many other terms like infiltration, precipitation, etc., including user-defined variables, which can be used for modeling other effects. The turbulence models include constant, parabolic, mixing length, and Rastogi-Rodi k-Ɛ eddy viscosity. Regarding the numerical scheme, it combines different FV numerical explicit schemes (oneor second-order accuracy) for the different terms of the equations. Specifically, a high precision Roe scheme is used for convective and diffusive terms, and is adequate in cases of unsteady flow discontinuities (hydraulic jumps or wave fronts). This software uses an unstructured mesh determined by the user. Figures 3 and 4 show the results obtained by the authors of an evaluation of the energetic potential of tidal currents of Ría de Ribadesella (Spain) and Port of Avilés (Spain), respectively.

MIKE 21
Developed by DHI, MIKE 21 is a code that allows a wide approach to coast modeling due to its capacity of simulating physical, chemical, or biological processes [38] using different modules. It is widely employed in port designs and studies of coastal works, environmental impact, marine water IBER was designed by the University groups of GEAMA (University of A Coruña) and Flumen (University of Cataluña) [36]. It is a free software, which includes three computational modules: hydrodynamic, turbulence, and transport of sediment. The code has been applied in different studies of river hydrodynamics, dam break analysis, sediment transport calculation, and tidal flow in estuaries [37]. In the source tensor it takes into account the effect of the bottom friction, bed slope, wind friction on the water surface, Coriolis effect, and many other terms like infiltration, precipitation, etc., including user-defined variables, which can be used for modeling other effects. The turbulence models include constant, parabolic, mixing length, and Rastogi-Rodi k-Ɛ eddy viscosity. Regarding the numerical scheme, it combines different FV numerical explicit schemes (oneor second-order accuracy) for the different terms of the equations. Specifically, a high precision Roe scheme is used for convective and diffusive terms, and is adequate in cases of unsteady flow discontinuities (hydraulic jumps or wave fronts). This software uses an unstructured mesh determined by the user. Figures 3 and 4 show the results obtained by the authors of an evaluation of the energetic potential of tidal currents of Ría de Ribadesella (Spain) and Port of Avilés (Spain), respectively.

MIKE 21
Developed by DHI, MIKE 21 is a code that allows a wide approach to coast modeling due to its capacity of simulating physical, chemical, or biological processes [38] using different modules. It is widely employed in port designs and studies of coastal works, environmental impact, marine water

MIKE 21
Developed by DHI, MIKE 21 is a code that allows a wide approach to coast modeling due to its capacity of simulating physical, chemical, or biological processes [38] using different modules. It is widely employed in port designs and studies of coastal works, environmental impact, marine water forecasting assessment, etc. Specifically, its hydrodynamic module is used for the hydraulic phenomena in lakes, estuaries, bays, coastal areas, and seas. This module solves the Saint-Venant equations including, in the source tensor, the effects of the bed slope, bottom friction, wind friction on the water surface, Coriolis effect, and other options like infiltration or leakage [39]. The turbulence is modeled by different approaches of the eddy viscosity: constant value (a unique value for the entire domain or different for each cell) or time-varying value defined using the Smagorinsky formulation [40]. This code offers the user two possible numerical schemes, which provide good results in rapidly varying flows: one based on the Alternate Direction Implicit (ADI) scheme, and the other based on the FV explicit Roe scheme. The first calculates over a regular grid, while the second uses a nonstructured grid, which provides flexibility in the adaptation to complex contours [41].
Examples of tidal energy studies using this software have been carried out in the tidal strait of Pentland Firth (Scotland, UK) [42,43], around the Irish coast [44], or at the Ría of Avilés in Spain ( Figure 5) [45]. This software has been used to model the effect of current turbines by increasing the bottom friction in the cells where they are included [43] or a decision support system to improve the location and configuration of tidal turbine arrays [46]. forecasting assessment, etc. Specifically, its hydrodynamic module is used for the hydraulic phenomena in lakes, estuaries, bays, coastal areas, and seas. This module solves the Saint-Venant equations including, in the source tensor, the effects of the bed slope, bottom friction, wind friction on the water surface, Coriolis effect, and other options like infiltration or leakage [39]. The turbulence is modeled by different approaches of the eddy viscosity: constant value (a unique value for the entire domain or different for each cell) or time-varying value defined using the Smagorinsky formulation [40]. This code offers the user two possible numerical schemes, which provide good results in rapidly varying flows: one based on the Alternate Direction Implicit (ADI) scheme, and the other based on the FV explicit Roe scheme. The first calculates over a regular grid, while the second uses a nonstructured grid, which provides flexibility in the adaptation to complex contours [41].
Examples of tidal energy studies using this software have been carried out in the tidal strait of Pentland Firth (Scotland, UK) [42,43], around the Irish coast [44], or at the Ría of Avilés in Spain ( Figure 5) [45]. This software has been used to model the effect of current turbines by increasing the bottom friction in the cells where they are included [43] or a decision support system to improve the location and configuration of tidal turbine arrays [46].

TELEMAC 2D
The TELEMAC code was developed by the National Hydraulics and Environment Laboratory (LNHE) of the Research and Development Directorate of EDF, in collaboration with other research institutes [47]. The main application of TELEMAC-2D is the calculation of the position of the water free-surface, both maritime and rivers. In this software, the source tensor includes the effect of the wind, Coriolis force, bed slope, bottom friction, and a sink or source of momentum. The bottom friction can be modeled using different laws: Haaland's, Chézy's, Strickler's, Manning's, Nikuradse's, Log law of the wall, or Colebrook-White's. The code also includes different turbulence models: constant viscosity coefficient, Elder model, k-Ɛ, and Smagorinski. Offers the user the possibility of different numerical schemes [48] based on the FE method and other high resolution FV explicit schemes, such as Roe, Kinetic order 1 or Kinetic order 2 [49]. There are other schemes in development like Tchamen and Zokagoa. Regarding the discretization of the domain, the equations are solved over an unstructured mesh, which usually allows a better adaptation to complex contours than the structured one.
Examples of the use of this software in tidal energy evaluations are the studies of Skarpsundet tidal channel in Norway [50] and in Portland Bill (Dorset, UK) [51]. Also, Piano et al. [52] evaluated

TELEMAC 2D
The TELEMAC code was developed by the National Hydraulics and Environment Laboratory (LNHE) of the Research and Development Directorate of EDF, in collaboration with other research institutes [47]. The main application of TELEMAC-2D is the calculation of the position of the water free-surface, both maritime and rivers. In this software, the source tensor includes the effect of the wind, Coriolis force, bed slope, bottom friction, and a sink or source of momentum. The bottom friction can be modeled using different laws: Haaland's, Chézy's, Strickler's, Manning's, Nikuradse's, Log law of the wall, or Colebrook-White's. The code also includes different turbulence models: constant viscosity coefficient, Elder model, k-E, and Smagorinski. Offers the user the possibility of different numerical schemes [48] based on the FE method and other high resolution FV explicit schemes, such as Roe, Kinetic order 1 or Kinetic order 2 [49]. There are other schemes in development like Tchamen and Zokagoa. Regarding the discretization of the domain, the equations are solved over an unstructured mesh, which usually allows a better adaptation to complex contours than the structured one.
Examples of the use of this software in tidal energy evaluations are the studies of Skarpsundet tidal channel in Norway [50] and in Portland Bill (Dorset, UK) [51]. Also, Piano et al. [52] evaluated the energy of the tidal currents in the zone of Holy Island (UK), obtaining the most suitable locations for turbine installations. Bourban et al. [53] studied the energy that can be obtained from tidal currents around the UK using a software tool, called SMARtide, based on 2D TELEMAC. Special significance has the study carried out in Pentland Firth, which includes the power extraction effects as an increment in the horizontal energy losses [54].

INFOWORKS 2D
Infoworks was developed by Wallingford Software and today, belongs to Innovyze. It includes a full solution for modeling open channels, floodplains, embankments, and hydraulic structures [55]. This code does not take into account turbulence stresses and the source tensor includes only the effect of the bed slope and bottom friction (using Manning) [56]. It uses a numerical scheme based on the high resolution FV explicit Roe scheme over a triangular unstructured surface mesh.
It has been applied in different analysis related to tidal hydrodynamics like the study of the north Dublin coast [57].

SOBEK 2D
Sobek 2D is the evolution of Sobek 1D (developed by Delft hydraulics) and includes more complete applications: the analysis of irrigation, sewerage, rural and urban drainage (closed conduits, pipeline flows), open water channels, river systems, simulations of flood events, water quality predictions, and the design and optimization of control systems for canal and waterway automation [58]. This code uses a subset of the Saint-Venant equations not taking into account the diffusive stresses, which are considered relatively unimportant, in order to save computational effort. The source term includes the effects of bed slope and bottom and walls friction. The friction is modeled using different roughness definitions: Bos-Bijkerk, Chézy, Manning, Nikuradse, Strickler, and White-Colebrook. It solves the governing equations using the proprietary implicit Delft FD scheme, based on an unstructured and flexible staggered grid with rectangular cells. This scheme assures a solution even in case of significant discontinuities, such as, variable cross sections, hydraulic jumps, or drying and flooding.
An example of tidal energy evaluation using this code is the study carried out in the Scheldt Estuary of Netherlands [59].

TUFLOW
TUFLOW, developed by BMT WBM Pty Ltd, is a 2D code suitable for simulating flood, tide, storm tide, tsunamis, and coastal hydraulics [60]. In this case, the source tensor includes the effects of the bed slope, bottom friction, Coriolis, and wind stress. The bottom friction can be defined through Manning or Chézy coefficients. For modeling the turbulence, this code includes two eddy viscosity model options: constant or Smagorinsky. Furthermore, it offers two different software options to users: TUFLOW 2D and TUFLOW FV.
TUFLOW 2D uses a structured regular grid of square elements and gives the user two possibilities of numerical schemes: • TUFLOW ADI (Alternating Direction Implicit), a semi-implicit second-order FD scheme. • TUFLOW GPU (sold as an additional module), an explicit first-order FD scheme that claims to reduce the computational resources needed, which makes it suitable to run using the Graphic Processing Units (GPU) of graphic cards.
TUFLOW FV uses a Finite Volume numerical scheme designed by the manufacturer to generate accurate results on rapidly varying flows. It uses an unstructured flexible mesh of triangles and quadrilaterals, with options for first and second-order solutions.
This software has been used, for example, in the hydrodynamic analysis carried out in the East river in Manhattan to evaluate the interaction between tides and river flow [61], and in several works in the UK and Australia [62].

ISIS 2D
This code has been developed over the basis of the ISIS 1D, designed specifically to model flows in coastal environments, estuaries and flood plains [18]. Recently, the code changed its name to Flood Modeler. It solves the Saint-Venant equations without considering water turbulence stresses, thus, reducing computational effort. The source tensor includes only the effects of the bed slope and bottom friction, using Manning's roughness definition. Furthermore, it offers the user three numerical FD schemes, specifically developed to address different types of hydraulic conditions: Only the structured mesh option is currently available in ISIS 2D. This code has been applied in different hydrodynamic studies in tidal rivers like the one performed in the Mekong River Delta, Vietnam [63].

ADCIRC 2D
ADCIRC (Advanced CIRCulation) is a free and open-code developed by the US Army Corps and both Notre Dame and North Carolina at Chapel Hill Universities [64,65]. This code has been widely used coupled with other software tools to simulate storm surge, tides, and costal circulations problems. It solves the integrated continuity equation in the Generalized Wave Continuity Equation (GWCE) form [66] and the two-dimensional Depth Integrated (2DDI) momentum equation, with the approximations of hydrostatic pressure and Boussinesq. The source tensor includes the bottom friction (Chezy or Manning), the surface stress and the Coriolis Effect [67]. For modeling the turbulence, this code uses an average horizontal eddy viscosity. These equations are discretized in space using the finite element (FE) method on a triangular unstructured grid and the finite difference (FD) method for the time dependent terms. This software has been prepared to be parallelizable to assure quick resolutions.
This code has also a 3D version that basically substitutes the 2D Depth Integrated equation for a 3D momentum one.
Walkington and Burrows [68] used this code to evaluate the impact of tidal hydrokinetic turbine farms in the west coast of the UK. The turbines have been modeled considering an equivalent drag coefficient. Table 1 shows the main characteristics of the 2D codes.

3D Codes
3D models allow the definition of the complex numerical meshes sometimes needed due to the irregular surface geometry and depth of the coast. This characteristic is not so necessary to model the rivers, but it can be very useful for the analysis of the energy extraction with hydrokinetic turbines. All the codes divide the geometry in two parts: water surface and depth. For the water surface, the solutions are based on the use of structured orthogonal-curvilinear or unstructured meshes. For the depth or vertical dimension, the strategy proposed by the models is to divide the 3D geometry in different layers at diverse water depths, with two variations: Z-coordinate or σ-coordinate. In the first one, the domain is divided in horizontal layers with fixed thickness. When calculating, the code determines the number of active layers depending on the water level. The second one, the σ-coordinate, divides the depth in a constant number of layers with variable thickness, adapted to the bed shape and the water level. These codes usually take into account the turbulence by the Reynolds averaging of the Navier-Stokes equations (RANS), where Reynolds stresses are calculated using the Boussinesq´s hypothesis (eddy viscosity concept). The different turbulence models are basically the diverse implementations of these calculations. Another and more direct approach is the large eddy simulation (LES). In this case, the effect of the turbulence is directly calculated for the larger eddies, while the dissipation of the smaller ones is considered through a subscale turbulence model. This method should obtain a more accurate result, but it requires a rather finned mesh and quite large computational resources.
As the 2D codes, the 3D ones can simulate the effect of the current turbines using an increased bottom roughness. However, they can also employ more sophisticated models, such as, momentum sinks or porous surfaces (actuator disc theory), without blocking the whole depth, and allowing the water passage above and below the turbine. This can achieve a substantial improvement in the accuracy of the calculations.

DELFT 3D
DELFT3D-FLOW is an open-source code developed by Deltares Systems [69]. It is composed of a set of modules to perform 3D hydrodynamic simulations in coastal, river and estuarine areas. It can solve the full 3D Navier-Stokes equations, although it gives the user the possibility of the hydrostatic pressure approximation in the vertical dimension (shallow water assumption). Four options of turbulence models are provided: k-ε, k-L, algebraic, and constant model. Also, the code offers the possibility of using the large eddy simulation (LES) approach, but usually the hydrodynamic grids used are too rough to solve these fluctuations. It employs a structured orthogonal-curvilinear grid in the horizontal plane with Z-coordinate or σ-coordinate models, to divide vertical dimension into layers. The numerical scheme of this code is based on finite differences (FD).
This code has been used in different investigations related to tidal energy evaluations including the effects of horizontal axis tidal turbines. For this purpose, the momentum sink approach has been developed in Mungar [70]. Waldman et al. [71] use this turbine model to perform an evaluation of tidal currents energy potential of Pentland Firth and Orkney (UK). Ramos et al. [72] also use this approach to study the impacts of a tidal farm in an estuary.

ROMS
The open-source Regional Modeling System and the Terrain-following System (ROMS/TOMS) [73] has been developed and supported by researchers of Rutgers University and California University. Its intended fields of application are both atmospheric circulation and ocean currents. In its hydraulic module, it includes Coriolis acceleration, temperature, and sediment transport. The water free surface is calculated by a flood/drying algorithm. This software includes five models to calculate the turbulence effect: user-defined turbulent viscosity and turbulent diffusivity, Brunt-Vaisala frequency mix, parameterization profile K, Mellor-Yamada method, and Generic Length Scale Methods (based on two equations models k-ε and k-ω). In the vertical coordinate, the original equations are discretized by topographic variables using extensible and elastic coordinates, adaptable to the terrain ("terrain following"). The extensible coordinates, which are equivalent to the σ-coordinates, are intended to increase the resolution in the areas of interest, such as the thermocline and the contour layers on the background. The default program scheme uses finite second-order differences, centered in a staggered vertical grid.
This code has been applied in different studies related with tidal energy, such as, the evaluation of the tidal current energy potential of the Irish Sea [12,74] or the northwest European shelf seas [75], without taking into account the turbine effects.
To model the effect of tidal current turbines, Roc et al. [76] and Brown et al. [12] used the momentum sink approach in the momentum equation, as well as specific corrections for the turbulence k-E or k-w turbulence closure equations.

FVCOM was developed by Massachusetts University researchers and the Woods Hole
Oceanographic Institution [77]. It is based on solving the whole equations of the oceanic model [78], although the hydrostatic pressure approach is also available. The turbulence models are different in the horizontal and vertical dimension. Horizontally, the user can choose a constant diffusion coefficient or the Smagorinsky turbulence method. Vertically, the Mellor and Yamada, and the k-epsilon models are available. This code uses a finite volume scheme with an unstructured mesh in the surface and terrain-following coordinates similar to the σ-coordinates, in the vertical direction.
Different evaluations of tidal currents energy potential have been carried out with this model, such as [79,80] in the New Jersey coast and [81] in the Artic sea.
The energy extraction of tidal currents is modeled by Yang et al. [11] using the momentum sink approach. The same methodology is validated with experimental data by Li et al. [82], who used to study the effects of the installation of tidal current turbines in Pentland Firth (UK) [83,84].

MITgcm
The model has been developed by the Massachusetts Institute of Technology [85] and addresses oceanic and atmospheric numerical simulations. It solves the fully nonlinear and nonhydrostatic Navier-Stokes equations (including Coriolis force) for an incompressible fluid, not only in small-scale, but also in large-scale domains using parallel computing. To reduce computational effort, it offers the possibility of simplified models of equations: primitive hydrostatic, quasi-hydrostatic, quasi-nonhydrostatic, and nonhydrostatic. The code uses a spatial finite-volume discretization on a curvilinear computational grid [86,87]. To consider turbulence effects, the Large Eddy Simulation (LES) approach is used with Smagorinsky or Leith [88] as subgrid viscosity models. To calculate the height of the water level, this software offers different algorithms: nonlinear, implicit in time (Crank-Nicholson), explicit, or implicit-explicit [88]. In the horizontal meshing, the domain is broken down into basic units or regions called "tiles" as the basic unit of domain decomposition for parallelization. The interior of each "tile" is a structured grid of quadrilateral cells. For vertical meshing, the model uses the Z-coordinates [87].
Related to tidal currents there are different studies that have been done using MITgcm, although without taking into account the turbines effect. In 2013, Sammartino et al. [89] evaluated the marine currents in the Bay of Algeciras in order to model the tides. The domain covers the Alboran Sea and the Gulf of Cádiz (Spain). Vlasenko et al. [90] developed a study in the Celtic Sea (Southern Ireland) because of its high-energy interest. [91] is an evolution of MIKE 21, suitable in cases where shallow waters simplifications cannot be applied. This code is based on solving 3D incompressible RANS equations with the hydrostatic pressure simplification, but including the Coriolis force. For the horizontal turbulent viscosity, the user can select between a constant turbulence or Smagorinsky formulation, while for the vertical it is possible to select a constant turbulence, logarithmic law, or k-ε. The spatial discretization of the governing equations is carried out under the finite volume method. In the horizontal plane an unstructured mesh is used, providing a high adaptation to complex geometries, while in the vertical a structured mesh is used, based on either σ-coordinates or a combination of σ and Z-coordinates.

MIKE 3 Flexible Mesh (FM)
Moharir et al. [92] have published a review of theoretical studies carried out with this software, including the Gota Alv River (Sweden), Caspian Sea, and Ariake Sea (Japan). Also, Goyal and Rathod [93] modeled the tidal flow from South Korea, predominant in the Jokor Strait.
Recently this code has developed a specific software module called "Turbine", which represents the effects of a horizontal axis tidal turbine using a simple actuator disc model. Waldman et al. [71] have applied this model to evaluate the energy extraction of tidal currents using 20 m diameter and 1 MW turbines in the Pentland Firth and Orkney Waters. Masters et al. [94] have compared the effects of this turbine module with CFD numerical simulations of the turbines.

TELEMAC 3D
TELEMAC 3D is the evolution of TELEMAC 2D [95], widely used in problems involving pollution, thermal dilution, sediment transport, and water quality. In this code, the modeling of the turbulence and the bottom friction are very similar to the 2D version, as well as the unstructured mesh in the horizontal plane. It uses a FV numerical scheme with σ-coordinates in the vertical direction.
There are several examples applying this code to simulate the tidal energy extraction by turbines, but they do not take into account their effect in the flow hydrodynamics. For instance, Cornett et al. [96] analyzed the tidal current resources in the Bay of Fundy, and Gillou and Chapalain [97] studied the optimum location and alignment of tidal turbines in the "Raz de Sein", a strait off western Brittany in France. Table 2 shows the main characteristics of the 3D codes.

Conclusions
The paper presents the main characteristics of different existing 1D, 2D, and 3D hydrodynamic codes focusing on the possibility of using them to evaluate the energy potential of tidal currents. Due to the very wide range of codes in existence, a comprehensive review of them all is not possible but we have tried to cover at least the most popular ones.
Until recently, these codes have been mainly used for calculation of flow pollutant dispersion and floods, but their characteristics and the existing experience in their use make them suitable to perform tidal energy studies.
The 1D and 2D codes are based on Saint-Venant equations, which can be applied to tidal flows in shallow waters conditions. It must be taken into account that there are some differences in the terms of the equations that the codes include in the calculation and the numerical scheme, usually due to a compromise between accuracy and computational time. Discontinuities, like hydraulic jumps and wave fronts, necessary to study tidal currents, are also determined by the general numerical scheme or by a specific calculation depending on the code.
The 3D codes solve the full Navier-Stokes equations including the vertical dimension. Depending on the code, they offer different options to model the turbulence effects. Normally, they utilize RANS equations with different approximations, but some of them allow the use of LES. The horizontal meshes can be structured or unstructured, which are easier to adapt to the coast geometry. In function of the code, a finite difference or a finite volume numerical scheme is employed. They are more accurate than the 2D models for cases with vertical velocity gradients, although they need more computational resources.
Different approaches have been used to evaluate the energy extracted by tidal turbines and the disturbed velocity field. In 2D codes, it has been mainly simulated as an increment of the bottom friction energy losses, while in 3D codes as a momentum sink representing energy losses as blockage effect. In this field, the 3D software tools are more appropriate because they do not block the whole depth, allowing the water passage above and below the turbine, better simulating the flow.