Skip to content

Commit

Permalink
fixed bug computing heat capacities
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertoCuadra committed Aug 5, 2021
1 parent 458f118 commit d71beaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Solver/Functions/ComputeProperties.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ def __init__(self, app, SpeciesMatrix, p, T):
self.ef = sum(SpeciesMatrix[:, 3]) # [kJ]
self.ehT = sum(SpeciesMatrix[:, 4]) # [kJ]
self.e = self.ef + self.ehT # [kJ]
self.cP = sum(SpeciesMatrix[:, 5]) # [J/K]
self.cV = sum(SpeciesMatrix[:, 6]) # [J/K]
self.S0 = sum(SpeciesMatrix[:, 7]) # [kJ/K]
self.pv = sum(SpeciesMatrix[:, 8]) # [J/K]
self.p = p # [bar]
Expand All @@ -50,6 +48,8 @@ def __init__(self, app, SpeciesMatrix, p, T):
self.mi = sum(SpeciesMatrix[:, 10]) * 1e-3 # [kg]
self.rho = self.mi / self.v * 1e3 # [kg/m3]
self.Yi = SpeciesMatrix[:, 10] / self.mi * 1e-3 # [-]
self.cP = sum(SpeciesMatrix[:, 5] * self.Yi) # [J/K]
self.cV = sum(SpeciesMatrix[:, 6] * self.Yi) # [J/K]
self.W = 1/np.nansum(self.Yi / SpeciesMatrix[:, 11]) # []
Ni = SpeciesMatrix[:, 0] # [mol]
self.Xi = Ni / self.N # [-]
Expand Down

0 comments on commit d71beaa

Please sign in to comment.