Skip to content

Commit

Permalink
miscellaneous
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertoCuadra committed Aug 5, 2021
1 parent 41a39f2 commit c269b6d
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 9 deletions.
Binary file modified Settings/__pycache__/Define_FOI.cpython-38.pyc
Binary file not shown.
Binary file modified Settings/__pycache__/Initialize.cpython-38.pyc
Binary file not shown.
14 changes: 10 additions & 4 deletions Solver/Chemical_Equilibrium/SolveProblem.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,18 @@
----------------------------------------------------------------------
"""
from Solver.Chemical_Equilibrium.Equilibrate import equilibrate
from Solver.Shocks_and_detonations.Shock_incident import shock_incident

def SolveProblem(self, i):
if not i:
self.PS.strP.append(equilibrate(self, self.PS.strR[i], self.PD.pP.Value))
else:
self.PS.strP.append(equilibrate(self, self.PS.strR[i], self.PD.pP.Value, self.PS.strP[i - 1]))
if not any(self.PD.ProblemType.upper() == pt for pt in ['SHOCK_I', 'SHOCK_R', 'DET', 'DET_OVERDRIVEN']):
if not i:
self.PS.strP.append(equilibrate(self, self.PS.strR[i], self.PD.pP.Value))
else:
self.PS.strP.append(equilibrate(self, self.PS.strR[i], self.PD.pP.Value, self.PS.strP[i - 1]))
elif self.PD.ProblemType.upper() == 'SHOCK_I':
str1, str2 = shock_incident(self, self.PS.strR[i], self.PD.pR.Value, self.PD.TR.Value, self.PD.u1.Value)
self.PS.strR.append(str1)
self.PS.strP.append(str2)

return self

Binary file not shown.
Binary file modified Solver/Chemical_Equilibrium/__pycache__/SolveProblem.cpython-38.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions Solver/Functions/ComputeProperties.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +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.cP = sum(SpeciesMatrix[:, 5]) # [J/K]
self.cV = sum(SpeciesMatrix[:, 6]) # [J/K]
self.W = 1/np.nansum(self.Yi / SpeciesMatrix[:, 11]) # []
Ni = SpeciesMatrix[:, 0] # [mol]
self.Xi = Ni / self.N # [-]
Expand Down
3 changes: 0 additions & 3 deletions Solver/Functions/SetSpecies.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
Office 1.1.D22, Universidad Carlos III de Madrid
"""
import numpy as np
from NASA_database.set_reference_form_of_elements_with_T_intervals import set_reference_form_of_elements_with_T_intervals
from NASA_database.isRefElm import isRefElm
from NASA_database.detect_location_of_phase_specifier import detect_location_of_phase_specifier

def SetSpecies(self, Species, N, T):
M = self.C.M0.Value.copy()
Expand Down
Binary file modified Solver/Functions/__pycache__/ComputeProperties.cpython-38.pyc
Binary file not shown.

0 comments on commit c269b6d

Please sign in to comment.