25 Gas() : density(0.0), temperature(0.0), molar_mass(0.0), speed(0.0) {}
37 Gas(T density, T temperature, T molar_mass, T speed) : density(density), temperature(temperature), molar_mass(molar_mass), speed(speed) {}
46 Gas(
const Gas<T>& other) : density(other.density), temperature(other.temperature), molar_mass(other.molar_mass), speed(other.speed) {}
56 Gas(
Gas<T>&& other) : density(other.density), temperature(other.temperature), molar_mass(other.molar_mass), speed(other.speed) {
58 other.temperature = 0.0;
59 other.molar_mass = 0.0;
84 density = other.density;
85 temperature = other.temperature;
86 molar_mass = other.molar_mass;
100 density = other.density;
101 temperature = other.temperature;
102 molar_mass = other.molar_mass;
106 other.temperature = 0.0;
107 other.molar_mass = 0.0;
162 std::random_device rd;
163 std::seed_seq fullSeed{rd(), rd(), rd(), rd(), rd(), rd(), rd(), rd()};
164 std::mt19937 rng(fullSeed);
165 std::normal_distribution<T> normDist(0.0f, 1.0f);
168 T v_x = sqrt(R_gas * temperature / molar_mass) * normDist(rng);
169 T v_y = sqrt(R_gas * temperature / molar_mass) * normDist(rng);
170 T v_z = sqrt(R_gas * temperature / molar_mass) * normDist(rng);
Class representing a Gas with properties such as density, temperature, molar mass,...
Definition Gas.h:10
Gas()
Default constructor for the Gas class.
Definition Gas.h:25
Gas(Gas< T > &&other)
Move constructor for the Gas class.
Definition Gas.h:56
T get_molar_mass() const
Returns the molar mass of the gas.
Definition Gas.h:141
T get_density() const
Returns the density of the gas.
Definition Gas.h:134
Matrix< T > get_thermal_velocity()
Computes the thermal velocity of the gas in three dimensions.
Definition Gas.h:160
T get_temperature() const
Returns the temperature of the gas.
Definition Gas.h:127
~Gas()
Destructor for the Gas class.
Definition Gas.h:68
Gas(T density, T temperature, T molar_mass, T speed)
Parameterized constructor for the Gas class.
Definition Gas.h:37
Gas & operator=(Gas &&other)
Move assignment operator for the Gas class.
Definition Gas.h:99
T get_speed() const
Returns the speed of the gas.
Definition Gas.h:148
Gas & operator=(const Gas &other)
Copy assignment operator for the Gas class.
Definition Gas.h:83
Gas(const Gas< T > &other)
Copy constructor for the Gas class.
Definition Gas.h:46
This class implements a matrix object used for linear algebra and vectorized operations.
Definition Matrix.h:25