simulation.py 文件源码

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

项目:Codes 作者: SP2RC-Coding-Club 项目源码 文件源码
def __init__(self, plasma):
        """
        """
        self.dt = 1e-4 * u.s
        self.current_iteration = 0
        self.current_time = 0 * u.s
        self.plasma = plasma
        # Domain size
        # self.grid_size = grid_size

        # Physical parameters
        # self.gamma = gamma

        grids = (self.plasma.x.si, self.plasma.y.si, self.plasma.z.si)
        ranges = [grid for grid in grids if len(grid) > 1]
        stepsize = [range[1] - range[0] for range in ranges] * grids[0].unit
        self.solver = Solver(stepsize)

        # Collect equations into a nice easy-to-use list
        self.equations = [self._ddt_density, self._ddt_momentum,
                          self._ddt_energy, self._ddt_magfield]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号