1
$\begingroup$

I'm trying to calculate the divergence of a vector quantity $L(L_x, L_y, L_z)$ in COMSOL. I calculate it using the built-in differentiation operator as follow:

$$\nabla L = d(L_x,x)+d(L_y,y)+d(L_z,z)$$

I'm wondering what is the notation or the function for divergence. Does COMSOL calculate the divergence of $L$ correctly in the way that I did in above?

$\endgroup$
  • 1
    $\begingroup$ Is $L$ a scalar or a vector in your case? $\endgroup$ – Wolfgang Bangerth Sep 21 '13 at 2:38
1
$\begingroup$

First of all, your definition of the divergence is different from the standard definition. (Assuming you are in cartesian coordinates $(x,y,z)$, and $d(\cdot,x)$ means the partial derivative wrt $x$.

Regarding Comsol. When in cartesian coordinates, $\nabla \cdot L$ always gives you the divergence of a vector quantity $L$ in the sense linked above.

In different coordinate systems, $\nabla \cdot$ acts differently depending on the interface where you apply it. I would love to link to the corresponding entries of the Comsol documentation, but it is not commonly available.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.