IdealGas

class IdealGas : public fprops::SinglePhaseFluidProperties

Ideal gas.

Public Functions

IdealGas(double gamma, double molar_mass)

Constructor.

Parameters
  • gamma – Adiabatic index (ratio of specific heats cp/cv)

  • molar_mass – Molar mass \([kg/mol]\)

double get_gamma() const

Get adiabatic index.

Returns

Adiabatic index (ratio of specific heats cp/cv)

double get_specific_gas_constant() const

Get specific gas constant.

Returns

Specific gas constant

void set_mu(double mu)

Set dynamic viscosity.

Parameters

mu – Dynamic viscosity \([Pa-s]\)

void set_k(double k)

Set thermal conductivity.

Parameters

k – Thermal conductivity \([W/(m-K)]\)

virtual State rho_T(double rho, double T) const override

Compute thermodynamical state given density and temperature.

Parameters
  • rho – Density \([kg/m^3]\)

  • T – Temperature \([K]\)

virtual State rho_p(double rho, double p) const override

Compute thermodynamical state given density and pressure.

Parameters
  • rho – Density \([kg/m^3]\)

  • p – Pressure \([Pa]\)

virtual State p_T(double p, double T) const override

Compute thermodynamical state given pressure and temperature.

Parameters
  • p – Pressure \([Pa]\)

  • T – Temperature \([K]\)

virtual State v_u(double v, double u) const override

Compute thermodynamical state given specific volume and internal energy.

Parameters
  • v – Specific volume \([m^3/kg]\)

  • u – Specific internal energy \([J/kg]\)

virtual State h_s(double h, double s) const override

Compute thermodynamical state given specific enthalpy and entropy.

Parameters
  • h – Specific enthalpy \([J/kg]\)

  • s – Entropy \([J/(kg-K)]\)