pmutt.eos.IdealGasEOS

class pmutt.eos.IdealGasEOS

Bases: _pmuttBase

Ideal gas equation of state

\(PV=nRT\)

__init__()

Methods

__init__()

from_dict(json_obj)

Recreate an object from the JSON representation.

get_P([T, V, n])

Calculates the pressure of an ideal gas

get_T([V, P, n])

Calculates the temperature of an ideal gas

get_V([T, P, n])

Calculates the volume of an ideal gas

get_n([V, P, T])

Calculates the moles of an ideal gas

to_dict()

Represents object as dictionary with JSON-accepted datatypes

classmethod from_dict(json_obj)

Recreate an object from the JSON representation.

Parameters:

json_obj (dict) – JSON representation

Returns:

Obj

Return type:

Appropriate object

get_P(T=298.15, V=0.0247895618937, n=1.0)

Calculates the pressure of an ideal gas

Parameters:
  • T (float, optional) – Temperature in K. Default is standard temperature

  • V (float, optional) – Volume in m3. Default is standard volume

  • n (float, optional) – Number of moles (in mol). Default is 1 mol

Returns:

P – Pressure in bar

Return type:

float

get_T(V=0.0247895618937, P=1.0, n=1.0)

Calculates the temperature of an ideal gas

Parameters:
  • V (float, optional) – Volume in m3. Default is standard volume

  • P (float, optional) – Pressure in bar. Default is standard pressure

  • n (float, optional) – Number of moles (in mol). Default is 1 mol

Returns:

T – Temperature in K

Return type:

float

get_V(T=298.15, P=1.0, n=1.0)

Calculates the volume of an ideal gas

Parameters:
  • T (float, optional) – Temperature in K. Default is standard temperature

  • P (float, optional) – Pressure in bar. Default is standard pressure

  • n (float, optional) – Number of moles (in mol). Default is 1 mol

Returns:

V – Volume in m3

Return type:

float

get_n(V=0.0247895618937, P=1.0, T=298.15)

Calculates the moles of an ideal gas

Parameters:
  • V (float, optional) – Volume in m3. Default is standard volume

  • P (float, optional) – Pressure in bar. Default is standard pressure

  • T (float, optional) – Temperature in K. Default is standard temperature

Returns:

n – Number of moles in mol

Return type:

float

to_dict()

Represents object as dictionary with JSON-accepted datatypes

Returns:

obj_dict

Return type:

dict