Peano
Loading...
Searching...
No Matches
MeteotsunamiLaws.cpph
Go to the documentation of this file.
1// This file is part of the ExaHyPE2 project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#include <cmath>
4
5template <auto param>
7 return param;
8};
9
10template <auto f0, auto beta>
12 return f0 + (beta * y);
13};
14
15template <auto omega>
17 constexpr auto D2R = M_PI / 180.0;
18 return 2.0 * omega * std::sin(D2R * latDeg);
19};
20
21template <auto gravity, auto param>
23 manningFriction(const auto h, const auto hu, const auto hv) {
24 const auto h73 = (h * h * std::cbrt(h)); // h^(7/3) is not stable for small h -> 0, TODO may need some
25 // more work
26 return -gravity * param * param * std::hypot(hu, hv) / h73;
27}
static auto manningFriction(const auto h, const auto hu, const auto hv)
Computes the Manning bottom friction.
static auto constant()
Returns the Coriolis parameter f for a given position.
static auto betaPlane(const auto y)
Returns the Coriolis parameter f for a given position.
static auto sphere(const auto latDeg)
Returns the Coriolis parameter f for a given position.