Compute divergence of vector field using python

前端 未结 10 2615
甜味超标
甜味超标 2020-12-03 21:58

Is there a function that could be used for calculation of the divergence of the vectorial field? (in matlab) I would expect it exists in numpy/scipy but I can not find it us

10条回答
  •  無奈伤痛
    2020-12-03 22:15

    Just a hint for everybody reading that:

    the functions above do not compute the divergence of a vector field. they sum the derivatives of a scalar field A:

    result = dA/dx + dA/dy

    in contrast to a vector field (with three dimensional example):

    result = sum dAi/dxi = dAx/dx + dAy/dy + dAz/dz

    Vote down for all! It is mathematically simply wrong.

    Cheers!

提交回复
热议问题