2.8. Convert \(f(T, V)\) to \(f(T,P)\)¶
This module will convert a function \(f\) of volume (\(V\)) and temperature (\(T\)), e.g., convert \(G(T, V)\) to the function of temperature and pressure, i.e., to \(G(T, P)\).
-
qha.v2p.
v2p
(func_of_t_v, p_of_t_v, desired_pressures)[source]¶ Obtain \(f(T, P)\) given \(f(T, V)\) and \(P(T, V)\) by doing a fourth-order Lagrangian interpolation.
- Parameters
func_of_t_v (array(float64, 2d, A)) – Any function \(f\) on \((T, V)\) grid, which has shape: (number of temperature, number of volumes).
p_of_t_v (array(float64, 2d, A)) – Pressures on \((T, V)\) grid, which has shape: (number of temperature, number of volumes).
desired_pressures (array(float64, 1d, A)) – A vector of pressures which user wants to apply.
- Return type
array(float64, 2d, A)
- Returns
The interpolated function \(f\) on \((T, P)\) grid.