buffer_zone_and_extrapolation.py 文件源码

python
阅读 37 收藏 0 点赞 0 评论 0

项目:tango 作者: LLNL 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号