def pressure(self):
"""Sets the simulation's kinetic pressure profile to the specified array.
The kinetic pressure is defined as:
.. math::
p = (\\gamma - 1) (e_0 - \\frac{\\rho\\textbf{v}^2}{2})
"""
v = self.velocity
return (self.gamma - 1) \
* (self.energy - ((self.density * dot(v, v)) / 2))
评论列表
文章目录