rapidity.thermodynamics module

Thermodynamic observables for integrable models.

This module provides functions for computing derived thermodynamic quantities from a TBAState:

rapidity.thermodynamics.find_mu(model, grid, density, T, mu_bounds=(-10.0, 20.0), tol=1e-10)

Find the chemical potential that reproduces a target density.

Solves:

\[\int d\theta\, \rho_p(\theta) = N/L\]

for the chemical potential \(\mu\).

Parameters:
  • model (Model) – The integrable model.

  • grid (Grid1D) – The rapidity grid.

  • density (float) – Target particle density N/L.

  • T (float) – Temperature.

  • mu_bounds (tuple[float, float]) – Bounds for the chemical potential search. Default is (-10.0, 20.0).

  • tol (float) – Tolerance for the density matching. Default is 1e-10.

Returns:

The chemical potential.

Return type:

float

Raises:

ValueError – If the target density cannot be achieved within the given bounds.

rapidity.thermodynamics.sound_velocity(state)

Compute the sound velocity.

\[v_s = \sqrt{\frac{\partial P}{\partial \rho}}\]
Parameters:

state (TBAState) – The thermodynamic state.

Returns:

The sound velocity.

Return type:

float