diff --git a/grlp/grlp.py b/grlp/grlp.py index 4bd60dc..9228935 100644 --- a/grlp/grlp.py +++ b/grlp/grlp.py @@ -434,7 +434,7 @@ def analytical_threshold_width(self, P_xQ=None, x0=None, x1=None, self.zanalytical = self.k_a * self.x**self.P_a + self.c_a return self.zanalytical - def analytical_threshold_width_perturbation(self, P_xB=None, P_xQ=None, x0=None, x1=None, + def analytical_threshold_width_perturbation(self, P_xQ=None, x0=None, x1=None, z0=None, z1=None, U=None): if x0 is None: x0 = self.x[0] @@ -446,12 +446,10 @@ def analytical_threshold_width_perturbation(self, P_xB=None, P_xQ=None, x0=None, z1 = self.z[-1] if P_xQ is None: P_xQ = self.P_xQ - if P_xB is None: - P_xB = self.P_xB if U is None: U = self.U # Base state coefficients (no perturbation) - #self.P_a = 1 + 6*(P_xB - P_xQ)/7. # beta + #self.P_a = 1 - 6*P_xB/7. # beta #self.k_a = (z1 - z0)/(x1**self.P_a - x0**self.P_a) # alpha #self.c_a = z0 - x0**self.P_a/(x1**self.P_a - x0**self.P_a) * (z1 - z0) # gamma # Coefficients @@ -459,7 +457,7 @@ def analytical_threshold_width_perturbation(self, P_xB=None, P_xQ=None, x0=None, / (1 - self.lambda_p) \ * abs(self.k_a * self.P_a)**(1/6.) \ * self.k_xQ / self.k_xB - P = self.P_xQ - self.P_xB + (self.P_xB - 1.)/6. + P = self.P_xQ print(P) # Constants of integration #c1 = self.U * (x0**(P+2) - x1**(P+2)) / (K*(P-2)*(self.P_a + P - 2) \