13 namespace EulerInitialStates
26 template <
typename Description,
int dim,
typename Number>
38 const std::string subsection)
40 , hyperbolic_system_(hyperbolic_system)
43 this->add_parameter(
"reference density",
45 "The material reference density");
48 this->add_parameter(
"reference pressure",
50 "The material reference pressure");
53 this->add_parameter(
"mach number",
55 "Mach number of traveling smooth wave");
64 const auto view = hyperbolic_system_.template view<dim, Number>();
66 auto point_bar = point;
67 point_bar[0] = point_bar[0] - mach_number_ * t;
68 const auto x = Number(point_bar[0]);
70 const Number polynomial = Number(64) *
71 ryujin::fixed_power<3>(x - left_) *
72 ryujin::fixed_power<3>(right_ - x) /
73 ryujin::fixed_power<6>(right_ - left_);
76 Number rho = density_ref_;
77 if (left_ <= point_bar[0] && point_bar[0] <= right_)
78 rho = density_ref_ + polynomial;
82 initial_state[0] = rho;
83 initial_state[1] = mach_number_;
84 initial_state[dim + 1] = pressure_ref_;
86 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