pmutt.statmech.trans.FreeTrans

class pmutt.statmech.trans.FreeTrans(n_degrees=3, molecular_weight=None, atoms=None)

Bases: _ModelBase

Translational mode using ideal gas assumption. Equations sourced from:

  • Sandler, S. I. An Introduction to Applied Statistical Thermodynamics; John Wiley & Sons, 2010.

n_degrees

Number of degrees of freedom. Default is 3

Type:

int, optional

molecular_weight

Molecular weight of the molecule in g/mol.

Type:

float

atoms

An atoms object can be used to calculate molecular weight. Not stored by FreeTrans

Type:

ase.Atoms object, optional

__init__(n_degrees=3, molecular_weight=None, atoms=None)

Methods

__init__([n_degrees, molecular_weight, atoms])

from_dict(json_obj)

Recreate an object from the JSON representation.

get_Cp(units, **kwargs)

Calculate the heat capacity (constant P)

get_CpoR()

Calculates the dimensionless heat capacity at constant pressure

get_Cv(units, **kwargs)

Calculate the heat capacity (constant V)

get_CvoR()

Calculates the dimensionless heat capacity at constant volume

get_F(units[, T])

Calculate the Helmholtz energy

get_FoRT(T[, P])

Calculates the dimensionless Helmholtz energy

get_G(units[, T])

Calculate the Gibbs energy

get_GoRT(T[, P])

Calculates the dimensionless Gibbs energy

get_H(units[, T])

Calculate the enthalpy

get_HoRT()

Calculates the dimensionless enthalpy

get_S(units, **kwargs)

Calculate the entropy

get_SoR(T[, P])

Calculates the dimensionless entropy

get_U(units[, T])

Calculate the internal energy

get_UoRT()

Calculates the dimensionless internal energy

get_V(T, P)

Calculates the molar volume of an ideal gas at T and P

get_q(T[, P])

Calculates the partition function

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_Cp(units, **kwargs)

Calculate the heat capacity (constant P)

Parameters:
  • units (str) – Units as string. See R() for accepted units.

  • kwargs (keyword arguments) – Parameters needed by get_CpoR

Returns:

Cp – Heat capacity (constant P) in appropriate units

Return type:

float

get_CpoR()

Calculates the dimensionless heat capacity at constant pressure

\(\frac{Cp^{trans}}{R}=\frac{Cv^{trans}}{R} + 1\)

Returns:

CpoR_trans – Translational dimensionless heat capacity at constant P

Return type:

float

get_Cv(units, **kwargs)

Calculate the heat capacity (constant V)

Parameters:
  • units (str) – Units as string. See R() for accepted units.

  • kwargs (keyword arguments) – Parameters needed by get_CvoR

Returns:

Cv – Heat capacity (constant V) in appropriate units

Return type:

float

get_CvoR()

Calculates the dimensionless heat capacity at constant volume

\(\frac{Cv^{trans}}{R}=\frac{n_{degrees}}{2}\)

Returns:

CvoR_trans – Translational dimensionless heat capacity at constant V

Return type:

float

get_F(units, T=298.15, **kwargs)

Calculate the Helmholtz energy

Parameters:
  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

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

  • kwargs (keyword arguments) – Parameters needed by get_FoRT

Returns:

F – Hemholtz energy in appropriate units

Return type:

float

get_FoRT(T, P=1.0)

Calculates the dimensionless Helmholtz energy

\(\frac{A^{trans}}{RT}=\frac{U^{trans}}{RT}-\frac{S^{trans}}{R}\)

Parameters:
  • T (float) – Temperature in K

  • P (float, optional) – Pressure (bar) or pressure-like quantity. Default is atmospheric pressure

Returns:

FoRT_trans – Translational dimensionless Helmholtz energy

Return type:

float

get_G(units, T=298.15, **kwargs)

Calculate the Gibbs energy

Parameters:
  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

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

  • kwargs (keyword arguments) – Parameters needed by get_GoRT

Returns:

G – Gibbs energy in appropriate units

Return type:

float

get_GoRT(T, P=1.0)

Calculates the dimensionless Gibbs energy

\(\frac{G^{trans}}{RT}=\frac{H^{trans}}{RT}-\frac{S^{trans}}{R}\)

Parameters:
  • T (float) – Temperature in K

  • P (float, optional) – Pressure (bar) or pressure-like quantity. Default is atmospheric pressure

Returns:

GoR_trans – Translational dimensionless Gibbs energy

Return type:

float

get_H(units, T=298.15, **kwargs)

Calculate the enthalpy

Parameters:
  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

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

  • kwargs (keyword arguments) – Parameters needed by get_HoRT

Returns:

H – Enthalpy in appropriate units

Return type:

float

get_HoRT()

Calculates the dimensionless enthalpy

\(\frac{H^{trans}}{RT}=\frac{U^{trans}}{RT} + 1\)

Returns:

HoRT_trans – Translational enthalpy

Return type:

float

get_S(units, **kwargs)

Calculate the entropy

Parameters:
  • units (str) – Units as string. See R() for accepted units.

  • kwargs (keyword arguments) – Parameters needed by get_SoR

Returns:

S – Entropy in appropriate units

Return type:

float

get_SoR(T, P=1.0)

Calculates the dimensionless entropy

\(\frac{S^{trans}}{R}=1+\frac{n_{degrees}}{2}+\log\bigg(\big( \frac{2\pi mk_bT}{h^2})^\frac{n_{degrees}}{2}\frac{RT}{PN_a}\bigg)\)

Parameters:
  • T (float) – Temperature in K

  • P (float, optional) – Pressure (bar) or pressure-like quantity. Default is atmospheric pressure

Returns:

SoR_trans – Translational dimensionless entropy

Return type:

float

get_U(units, T=298.15, **kwargs)

Calculate the internal energy

Parameters:
  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

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

  • kwargs (keyword arguments) – Parameters needed by get_UoRT

Returns:

U – Internal energy in appropriate units

Return type:

float

get_UoRT()

Calculates the dimensionless internal energy

\(\frac{U^{trans}}{RT}=\frac{n_{degrees}}{2}\)

Returns:

UoRT_trans – Translational internal energy

Return type:

float

get_V(T, P)

Calculates the molar volume of an ideal gas at T and P

\(V_m=\frac{RT}{P}\)

Parameters:
  • T (float) – Temperature in K

  • P (float) – Pressure in bar

Returns:

V – Molar volume in m3

Return type:

float

get_q(T, P=1.0)

Calculates the partition function

\(q_{trans} = \bigg(\frac{2\pi \sum_{i}^{atoms}m_ikT}{h^2} \bigg)^\frac {n_{degrees}} {2}V\)

Parameters:
  • T (float) – Temperature in K

  • P (float, optional) – Pressure (bar) or pressure-like quantity. Default is atmospheric pressure

Returns:

q_trans – Translational partition function

Return type:

float

to_dict()

Represents object as dictionary with JSON-accepted datatypes

Returns:

obj_dict

Return type:

dict