plasma.py 文件源码

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

项目:Codes 作者: SP2RC-Coding-Club 项目源码 文件源码
def velocity(self, velocity: u.m / u.s):
        """Defines the velocity throughout the simulation, and automatically
        updates the momentum based on the current density values.

        Parameters
        ----------

        velocity : ndarray
            Array of velocity vectors with shape (3, x, [y, z]) where x, y and
            z are the spatial grid sizes of the simulation.
            Note that a full 3D vector is required even if the simulation is
            run for fewer than 3 dimensions.
            Must have units of velocity.

        """
        assert velocity.shape == (3, *self.domain_shape), """Specified velocity
            array shape does not match simulation grid."""
        self.momentum = velocity * self.density
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号