simple_waves_ideal_gas.hpp
Go to the documentation of this file.
1 
6 #ifndef SIMPLE_WAVES_IDEAL_GAS_HPP
7 #define SIMPLE_WAVES_IDEAL_GAS_HPP 1
8 
9 #include <string>
10 #include "../one_dimensional/spatial_distribution1d.hpp"
11 #include "../common/equation_of_state.hpp"
12 #include "../common/ideal_gas.hpp"
13 
14 //using namespace std;
15 using std::string;
16 
23 double calc_entropy(double d, double p, double g);
24 
28 {
29 public:
30 
36  ConstEntropy(SpatialDistribution1D const& density,
37  double s, double g);
38 
39  double operator()(double x) const;
40 
41 private:
42 
43  SpatialDistribution1D const& density_;
44  const double s_;
45  const double g_;
46 };
47 
51 {
52 public:
53 
59  SoundSpeedDist(SpatialDistribution1D const& pressure,
60  SpatialDistribution1D const& density,
61  EquationOfState const& eos);
62 
63  double operator()(double x) const;
64 
65 private:
66 
67  SpatialDistribution1D const& pressure_;
68  SpatialDistribution1D const& density_;
69  EquationOfState const& eos_;
70 };
71 
79 double calc_riemann_invariant(double v, double c,
80  double g, bool dir);
81 
84 {
85 public:
86 
93  ConstRiemannInv(double rv, bool dir,
94  SpatialDistribution1D const& sound_speed,
95  double g);
96 
97  double operator()(double x) const;
98 
99 private:
100 
101  const double rv_;
102  const bool dir_;
103  SpatialDistribution1D const& sound_speed_;
104  const double g_;
105 };
106 
111 {
112 public:
113 
121  (SpatialDistribution1D const& density,
122  double entropy,
123  double adiabatic_index,
124  double edge=3);
125 
129  IdealGas const& getEOS(void) const;
130 
135  SpatialDistribution1D const& getProfile(string pname) const;
136 
137 private:
138 
139  SpatialDistribution1D const& density_;
140  ConstEntropy pressure_;
141  IdealGas eos_;
142  SoundSpeedDist sound_speed_;
143  double c_edge_;
144  double rv_edge_;
145  ConstRiemannInv xvelocity_;
146  Uniform yvelocity_;
147 };
148 
151 {
152 public:
153 
159  EntropyProf(SpatialDistribution1D const& density,
160  SpatialDistribution1D const& pressure,
161  double adiabatic_index);
162 
163  double operator()(double x) const;
164 
165 private:
166 
167  SpatialDistribution1D const& density_;
168  SpatialDistribution1D const& pressure_;
169  double g_;
170 };
171 
172 #endif // SIMPLE_WAVES_IDEAL_GAS_HPP
Ideal gas equation of state.
Definition: ideal_gas.hpp:13
Uniform distribution.
Spatial distribution of the speed of sound.
double calc_riemann_invariant(double v, double c, double g, bool dir)
Calculates the Riemann invariant.
Velocity distribution where the Riemann invariant is constant throughout.
Spatial distribution of the entropy.
Pressure distribution with constant entropy construct.
Base class for initial conditions.
Base class for equation of state.
Initial conditions for simple waves in an ideal gas.
double calc_entropy(double d, double p, double g)
Calculates the entropy of an ideal gas.
ConstEntropy(SpatialDistribution1D const &density, double s, double g)
Class constructor.
double operator()(double x) const
Calculates initial conditions.