14 namespace ShallowWaterInitialStates
21 template <
typename Description,
int dim,
typename Number>
31 const std::string subsection)
33 , hyperbolic_system_(hyperbolic_system)
37 "still water depth", depth_,
"Depth of still water");
40 this->add_parameter(
"amplitude", amplitude_,
"Amplitude of soliton");
45 const auto view = hyperbolic_system_.template view<dim, Number>();
46 const auto g = view.gravity();
48 const auto &x = point[0];
50 const auto celerity = std::sqrt(g * (amplitude_ + depth_));
51 const auto width = std::sqrt(
52 3. * amplitude_ / (4. * depth_ * depth_ * (amplitude_ + depth_)));
53 const auto sechSqd = 1. /
std::pow(cosh(width * (x - celerity * t)), 2);
56 const auto profile = depth_ + amplitude_ * sechSqd;
57 const auto h = std::max(profile, Number(0.));
59 const auto 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