10#include <compile_time_options.h>
16 namespace ShallowWaterInitialStates
23 template <
typename Description,
int dim,
typename Number>
33 const std::string subsection)
35 , hyperbolic_system_(hyperbolic_system)
39 "still water depth", depth_,
"Depth of still water");
42 this->add_parameter(
"amplitude", amplitude_,
"Amplitude of soliton");
47 const auto view = hyperbolic_system_.template view<dim, Number>();
48 const Number g = view.gravity();
50 const auto &x = point[0];
52 const Number celerity = std::sqrt(g * (amplitude_ + depth_));
53 const Number width = std::sqrt(
54 3. * amplitude_ / (4. * depth_ * depth_ * (amplitude_ + depth_)));
55 const Number sechSqd =
56 1. /
std::pow(cosh(width * (x - celerity * t)), 2);
59 const Number profile = depth_ + amplitude_ * sechSqd;
60 const Number h = std::max(profile, Number(0.));
62 const Number v = celerity * (profile - depth_) / profile;
typename View::state_type state_type
state_type compute(const dealii::Point< dim > &point, Number t) final
typename Description::template HyperbolicSystemView< dim, Number > View
Soliton(const HyperbolicSystem &hyperbolic_system, const std::string subsection)
typename Description::HyperbolicSystem HyperbolicSystem
T pow(const T x, const T b)
Euler::HyperbolicSystem HyperbolicSystem