Solvers

namespace solvers
class Fwave
#include <Fwave.h>

Public Static Functions

static void netUpdates(t_real i_hL, t_real i_hR, t_real i_huL, t_real i_huR, t_real i_bL, t_real i_bR, t_real o_netUpdateL[2], t_real o_netUpdateR[2])

Computes the net-updates.

Parameters:
  • i_hL – height of the left side.

  • i_hR – height of the right side.

  • i_huL – momentum of the left side.

  • i_huR – momentum of the right side.

  • i_bL – left bathymetry

  • i_bR – right bathymetry

  • o_netUpdateL – will be set to the net-updates for the left side; 0: height, 1: momentum.

  • o_netUpdateR – will be set to the net-updates for the right side; 0: height, 1: momentum.

Private Static Functions

static void computeEigenvalues(t_real i_hL, t_real i_hR, t_real i_uL, t_real i_uR, t_real &eigenvalueRoe_1, t_real &eigenvalueRoe_2)

Calculates the roe eigenvalues.

Author

Luca-Philipp Grumbach

Author

Richard Hofmann

Description

Fwave solver for the one-dimensional shallow water equations.

Parameters:
  • i_hL – height of the left side.

  • i_hR – height of the right side.

  • i_uL – particle velocity of the left side.

  • i_uR – particle velocity of the right side.

  • eigenvalueRoe_1 – will be set to the speed of the wave propagating to the left.

  • eigenvalueRoe_2 – will be set to the speed of the wave propagating to the right.

static void computeEigencoefficients(t_real i_hL, t_real i_hR, t_real i_huL, t_real i_huR, t_real i_bL, t_real i_bR, t_real i_waveSpeedL, t_real i_waveSpeedR, t_real &o_strengthL, t_real &o_strengthR)

Computes the roe eigencoefficients.

Parameters:
  • i_hL – height of the left side.

  • i_hR – height of the right side.

  • i_huL – momentum of the left side.

  • i_huR – momentum of the right side.

  • i_bL – left bathymetry

  • i_bR – right bathymetry

  • i_waveSpeedL – speed of the wave propagating to the left.

  • i_waveSpeedR – speed of the wave propagating to the right.

  • o_strengthL – will be set to the strength of the wave propagating to the left.

  • o_strengthR – will be set to the strength of the wave propagating to the right.

Private Static Attributes

static constexpr t_real m_g = 9.80665

gravity constant

static constexpr t_real l_gHalf = 4.903325
static constexpr t_real m_gSqrt = 3.131557121

square root of gravity

class Roe
#include <Roe.h>

Public Static Functions

static void netUpdates(t_real i_hL, t_real i_hR, t_real i_huL, t_real i_huR, t_real o_netUpdateL[2], t_real o_netUpdateR[2])

Computes the net-updates.

Parameters:
  • i_hL – height of the left side.

  • i_hR – height of the right side.

  • i_huL – momentum of the left side.

  • i_huR – momentum of the right side.

  • o_netUpdateL – will be set to the net-updates for the left side; 0: height, 1: momentum.

  • o_netUpdateR – will be set to the net-updates for the right side; 0: height, 1: momentum.

Private Static Functions

static void waveSpeeds(t_real i_hL, t_real i_hR, t_real i_uL, t_real i_uR, t_real &o_waveSpeedL, t_real &o_waveSpeedR)

Computes the wave speeds.

Author

Alexander Breuer (alex.breuer AT uni-jena.de)

Description

Roe Riemann solver for the shallow water equations.

Parameters:
  • i_hL – height of the left side.

  • i_hR – height of the right side.

  • i_uL – particle velocity of the leftside.

  • i_uR – particles velocity of the right side.

  • o_waveSpeedL – will be set to the speed of the wave propagating to the left.

  • o_waveSpeedR – will be set to the speed of the wave propagating to the right.

static void waveStrengths(t_real i_hL, t_real i_hR, t_real i_huL, t_real i_huR, t_real i_waveSpeedL, t_real i_waveSpeedR, t_real &o_strengthL, t_real &o_strengthR)

Computes the wave strengths.

Parameters:
  • i_hL – height of the left side.

  • i_hR – height of the right side.

  • i_huL – momentum of the left side.

  • i_huR – momentum of the right side.

  • i_waveSpeedL – speed of the wave propagating to the left.

  • i_waveSpeedR – speed of the wave propagating to the right.

  • o_strengthL – will be set to the strength of the wave propagating to the left.

  • o_strengthR – will be set to the strength of the wave propagating to the right.

Private Static Attributes

static constexpr t_real m_gSqrt = 3.131557121

square root of gravity