"model.get_dmBnvirdTm(2, 3, 300, z) # third temperature derivative of the "
"model.get_dmBnvirdTm(2, 3, 300, z) # third temperature derivative of the second virial coefficient"
]
]
}
}
],
],
...
...
%% Cell type:markdown id:1afc4517 tags:
%% Cell type:markdown id:1afc4517 tags:
# Thermodynamic Derivatives
# Thermodynamic Derivatives
## Helmholtz energy derivatives
## Helmholtz energy derivatives
Thermodynamic derivatives are at the very heart of teqp. All models are defined in the form $\alpha^r(T, \rho, z)$, where $\rho$ is the molar density, and z are mole fractions. There are exceptions for models for which the independent variables are in simulation units (Lennard-Jones and its ilk).
Thermodynamic derivatives are at the very heart of teqp. All models are defined in the form $\alpha^r(T, \rho, z)$, where $\rho$ is the molar density, and z are mole fractions. There are exceptions for models for which the independent variables are in simulation units (Lennard-Jones and its ilk).
Thereofore, to obtain the residual pressure, it is obtained as a derivative:
Thereofore, to obtain the residual pressure, it is obtained as a derivative:
$$ p^r = \rho R T \left( \rho \left(\frac{\partial \alpha^r}{\partial \rho}\right)_{T}\right)$$
$$ p^r = \rho R T \left( \rho \left(\frac{\partial \alpha^r}{\partial \rho}\right)_{T}\right)$$
and other residual thermodynamic properties are defined likewise.
and other residual thermodynamic properties are defined likewise.
1.9 µs ± 38.5 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
1.9 µs ± 38.5 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
2.07 µs ± 24.8 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
2.07 µs ± 24.8 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
%% Cell type:markdown id:d05e9070 tags:
%% Cell type:markdown id:d05e9070 tags:
Note: calling overhead is usually on the order of 1 microsecond
Note: calling overhead is usually on the order of 1 microsecond
%% Cell type:markdown id:502e9830 tags:
%% Cell type:markdown id:502e9830 tags:
## Virial coefficients
## Virial coefficients
Virial coefficients represent the thermodynamics of the interaction of two-, three-, ... bodies interacting with each other. They can be obtained rigorously if the potential energy surface of interaction is fully known. In general, such a surface can only be constructed for small rigid molecules. Many simple thermodynamic models do a poor job of predicting the thermodynamics captured by the virial coefficients.
Virial coefficients represent the thermodynamics of the interaction of two-, three-, ... bodies interacting with each other. They can be obtained rigorously if the potential energy surface of interaction is fully known. In general, such a surface can only be constructed for small rigid molecules. Many simple thermodynamic models do a poor job of predicting the thermodynamics captured by the virial coefficients.