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]
评论列表
文章目录