diff --git a/Settings/__pycache__/Define_FOI.cpython-38.pyc b/Settings/__pycache__/Define_FOI.cpython-38.pyc index 6341ca5..2ada7a0 100644 Binary files a/Settings/__pycache__/Define_FOI.cpython-38.pyc and b/Settings/__pycache__/Define_FOI.cpython-38.pyc differ diff --git a/Settings/__pycache__/Initialize.cpython-38.pyc b/Settings/__pycache__/Initialize.cpython-38.pyc index 8995b88..ab61168 100644 Binary files a/Settings/__pycache__/Initialize.cpython-38.pyc and b/Settings/__pycache__/Initialize.cpython-38.pyc differ diff --git a/Solver/Chemical_Equilibrium/SolveProblem.py b/Solver/Chemical_Equilibrium/SolveProblem.py index cdb83fb..ad49023 100644 --- a/Solver/Chemical_Equilibrium/SolveProblem.py +++ b/Solver/Chemical_Equilibrium/SolveProblem.py @@ -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 \ No newline at end of file diff --git a/Solver/Chemical_Equilibrium/__pycache__/GibbsMinimization.cpython-38.pyc b/Solver/Chemical_Equilibrium/__pycache__/GibbsMinimization.cpython-38.pyc index 7f3b883..2a176fc 100644 Binary files a/Solver/Chemical_Equilibrium/__pycache__/GibbsMinimization.cpython-38.pyc and b/Solver/Chemical_Equilibrium/__pycache__/GibbsMinimization.cpython-38.pyc differ diff --git a/Solver/Chemical_Equilibrium/__pycache__/SolveProblem.cpython-38.pyc b/Solver/Chemical_Equilibrium/__pycache__/SolveProblem.cpython-38.pyc index d27f702..19b0181 100644 Binary files a/Solver/Chemical_Equilibrium/__pycache__/SolveProblem.cpython-38.pyc and b/Solver/Chemical_Equilibrium/__pycache__/SolveProblem.cpython-38.pyc differ diff --git a/Solver/Functions/ComputeProperties.py b/Solver/Functions/ComputeProperties.py index 424379e..56994f6 100644 --- a/Solver/Functions/ComputeProperties.py +++ b/Solver/Functions/ComputeProperties.py @@ -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 # [-] diff --git a/Solver/Functions/SetSpecies.py b/Solver/Functions/SetSpecies.py index d9ce42c..f9ccdcd 100644 --- a/Solver/Functions/SetSpecies.py +++ b/Solver/Functions/SetSpecies.py @@ -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() diff --git a/Solver/Functions/__pycache__/ComputeProperties.cpython-38.pyc b/Solver/Functions/__pycache__/ComputeProperties.cpython-38.pyc index 109b829..334d1d3 100644 Binary files a/Solver/Functions/__pycache__/ComputeProperties.cpython-38.pyc and b/Solver/Functions/__pycache__/ComputeProperties.cpython-38.pyc differ