GSI_Toolbox 1.0.0 A toolbox for Gas-Surface Interaction simulations

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Gas< T > Class Template Reference

Class representing a Gas with properties such as density, temperature, molar mass, and speed. More...

`#include <Gas.h>`

## Public Member Functions
| Gas ()
| Default constructor for the Gas class.
| Gas (T density, T temperature, T molar_mass, T speed)
| Parameterized constructor for the Gas class.
| Gas (const Gas< T > &other)
| Copy constructor for the Gas class.
| Gas (Gas< T > &&other)
| Move constructor for the Gas class.
| ~Gas ()
| Destructor for the Gas class.
Gas & | operator= (const Gas &other)
| Copy assignment operator for the Gas class.
Gas & | operator= (Gas &&other)
| Move assignment operator for the Gas class.
Matrix< T > | get_thermal_velocity ()
| Computes the thermal velocity of the gas in three dimensions.
T | get_temperature () const
| Returns the temperature of the gas.
T | get_density () const
| Returns the density of the gas.
T | get_molar_mass () const
| Returns the molar mass of the gas.
T | get_speed () const
| Returns the speed of the gas.

## Detailed Description

template<typename T>
class Gas< T >

Class representing a Gas with properties such as density, temperature, molar mass, and speed.

This class models the behavior of a gas and provides methods to calculate gas properties such as thermal velocity.

Template Parameters

  T | The data type used for gas properties (e.g., float, double).

## Constructor & Destructor Documentation

## ◆ Gas() [1/4]

template<typename T >

Gas< T >::Gas | ( |  | ) |
| inline

Default constructor for the Gas class.

Initializes the gas properties to zero.

## ◆ Gas() [2/4]

template<typename T >

Gas< T >::Gas | ( | T | density,
|  | T | temperature,
|  | T | molar_mass,
|  | T | speed )
| inline

Parameterized constructor for the Gas class.

Initializes the gas properties with specified values.

Parameters

  density | Initial density of the gas.
  temperature | Initial temperature of the gas.
  molar_mass | Initial molar mass of the gas.
  speed | Initial speed of the gas.

## ◆ Gas() [3/4]

template<typename T >

Gas< T >::Gas | ( | const Gas< T > & | other | ) |
| inline

Copy constructor for the Gas class.

Initializes a new gas object by copying properties from another gas object.

Parameters

  other | The gas object to copy from.

## ◆ Gas() [4/4]

template<typename T >

Gas< T >::Gas | ( | Gas< T > && | other | ) |
| inline

Move constructor for the Gas class.

Initializes a new gas object by moving properties from another gas object. The source object is reset to zero after the move.

Parameters

  other | The gas object to move from.

## ◆ ~Gas()

template<typename T >

Gas< T >::~Gas | ( |  | ) |
| inline

Destructor for the Gas class.

Resets the gas properties to zero.

## Member Function Documentation

## ◆ get_density()

template<typename T >

T Gas< T >::get_density | ( |  | ) | const
| inline

Returns the density of the gas.

Returns
  T The current density of the gas.

## ◆ get_molar_mass()

template<typename T >

T Gas< T >::get_molar_mass | ( |  | ) | const
| inline

Returns the molar mass of the gas.

Returns
  T The current molar mass of the gas.

## ◆ get_speed()

template<typename T >

T Gas< T >::get_speed | ( |  | ) | const
| inline

Returns the speed of the gas.

Returns
  T The current speed of the gas.

## ◆ get_temperature()

template<typename T >

T Gas< T >::get_temperature | ( |  | ) | const
| inline

Returns the temperature of the gas.

Returns
  T The current temperature of the gas.

## ◆ get_thermal_velocity()

template<typename T >

Matrix< T > Gas< T >::get_thermal_velocity | ( |  | ) |

Computes the thermal velocity of the gas in three dimensions.

Computes the thermal velocity of the gas.

This function generates random velocities in the x, y, and z directions based on a normal distribution and the temperature and molar mass of the gas.

Returns
  Matrix<T> A 3x1 matrix containing the thermal velocity components (v_x, v_y, v_z).

This function generates random thermal velocities in the x, y, and z directions using a normal distribution based on the gas temperature and molar mass.

Returns
  Matrix<T> A 3x1 matrix containing the thermal velocity components (v_x, v_y, v_z).

## ◆ operator=() [1/2]

template<typename T >

Gas & Gas< T >::operator= | ( | const Gas< T > & | other | ) |
| inline

Copy assignment operator for the Gas class.

Copies the properties from another gas object.

Parameters

  other | The gas object to copy from.

Returns
  Gas& Reference to the current gas object.

## ◆ operator=() [2/2]

template<typename T >

Gas & Gas< T >::operator= | ( | Gas< T > && | other | ) |
| inline

Move assignment operator for the Gas class.

Moves the properties from another gas object, and resets the source object to zero.

Parameters

  other | The gas object to move from.

Returns
  Gas& Reference to the current gas object.

The documentation for this class was generated from the following file:

- src/Gas.h