mirror of
https://github.com/aselimov/cea-rs.git
synced 2026-04-21 09:24:21 +00:00
Remove unneeded code and add improved comment
This commit is contained in:
parent
fc268abdbb
commit
361973819e
1 changed files with 3 additions and 13 deletions
|
|
@ -22,6 +22,9 @@ pub struct GasMixture {
|
|||
}
|
||||
|
||||
impl MixtureComponent {
|
||||
// µ/RT for the current mixture component at fixed temp and pressure
|
||||
// µ = Molar Gibbs free energy = H - TS
|
||||
// Therefore µ/RT = H/RT - S/R
|
||||
pub fn chem_potential_over_rt(&self, temp: f64, pressure: f64, nsum: f64) -> f64 {
|
||||
match self.s.phase {
|
||||
Phase::Gas => {
|
||||
|
|
@ -49,19 +52,6 @@ impl MixtureComponent {
|
|||
Phase::Condensed => todo!(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn h_over_rt(&self, temp: f64) -> f64 {
|
||||
match self.s.phase {
|
||||
Phase::Gas => {
|
||||
let p = self
|
||||
.s
|
||||
.polynomial_at(temp)
|
||||
.expect("Gas doesn't have a polynomial");
|
||||
self.n * p.h_over_rt(temp)
|
||||
}
|
||||
Phase::Condensed => todo!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl GasMixture {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue