def __call__(self, t, x, n):
# Define the contributions to the H coefficients for the Shestakov Problem
H1 = np.ones_like(x)
#H7 = shestakov_nonlinear_diffusion.H7contrib_Source(x)
H7 = source(x)
(H2turb, H3, extradata) = self.turbhandler.Hcontrib_turbulent_flux(n)
H4 = None
H6 = None
# add "other" diffusive contributions by specifying a diffusivity, H2 = V'D [but V' = 1 here]
H2constdiff = 0.03
def diffusivity_right(x):
diffusivity = np.zeros_like(x)
xr = 0.85
D0 = 7
diffusivity[x > xr] = D0
return diffusivity
H2 = H2turb + H2constdiff
#H2 = H2turb + H2constdiff + diffusivity_right(x) # if adding const to right edge
return (H1, H2, H3, H4, H6, H7, extradata)
评论列表
文章目录