lanl / singularity-eos

Performance portable equations of state and mixed cell closures
https://lanl.github.io/singularity-eos/
BSD 3-Clause "New" or "Revised" License
27 stars 8 forks source link

Gibbs Free Energy #397

Closed Yurlungur closed 1 month ago

Yurlungur commented 2 months ago

Given we have an entropy call, it seems relatively trivial now to add a Gibbs free energy call to the EOS base class that automatically converts between potentials.

$$G(\rho, T) = \varepsilon(\rho, T) + \frac{P(\rho, T)}{\rho} - T S(\rho, T)$$

jhp-lanl commented 2 months ago

That's fine with me. We can also think about the density-energy call too:

G(\rho, \epsilon) = \epsilon + \frac{P(\rho, \epsilon)}{\rho} - T(\rho, \epsilon) S(\rho, \epsilon)