Skip to content

Commit

Permalink
Remove valley width from perturbation analysis to analytical solution
Browse files Browse the repository at this point in the history
Should really revisit this approach; could be useful.
(Thanks erstwhile next-door physicist!)
  • Loading branch information
awickert committed Jul 14, 2020
1 parent 0fb0b04 commit a4c7f34
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions grlp/grlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -446,20 +446,18 @@ 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
K = self.k_Qs * self.sinuosity * self.intermittency \
/ (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) \
Expand Down

0 comments on commit a4c7f34

Please sign in to comment.