8#include <compile_time_options.h>
15 namespace EulerInitialStates
28 template <
typename Description,
int dim,
typename Number>
40 const std::string subsection)
42 , hyperbolic_system_(hyperbolic_system)
45 this->add_parameter(
"reference density",
47 "The material reference density");
50 this->add_parameter(
"reference pressure",
52 "The material reference pressure");
55 this->add_parameter(
"mach number",
57 "Mach number of traveling smooth wave");
66 const auto view = hyperbolic_system_.template view<dim, Number>();
68 auto point_bar = point;
69 point_bar[0] = point_bar[0] - mach_number_ * t;
70 const auto x = Number(point_bar[0]);
72 const Number polynomial = Number(64) *
73 ryujin::fixed_power<3>(x - left_) *
74 ryujin::fixed_power<3>(right_ - x) /
75 ryujin::fixed_power<6>(right_ - left_);
78 Number rho = density_ref_;
79 if (left_ <= point_bar[0] && point_bar[0] <= right_)
80 rho = density_ref_ + polynomial;
84 initial_state[0] = rho;
85 initial_state[1] = mach_number_;
86 initial_state[dim + 1] = pressure_ref_;
88 return view.from_initial_state(initial_state);
SmoothWave(const HyperbolicSystem &hyperbolic_system, const std::string subsection)
typename Description::HyperbolicSystem HyperbolicSystem
typename View::ScalarNumber ScalarNumber
state_type compute(const dealii::Point< dim > &point, Number t) final
typename Description::template HyperbolicSystemView< dim, Number > View
typename View::state_type state_type
Euler::HyperbolicSystem HyperbolicSystem