1
$\begingroup$

Is it computationally safe and accurate to use the following equation in COMSOL to compute the divergence of the vector quantity J (instead of using its general built-in equations that have $\nabla$ operations):

$$div_J = d(J_x,x)+d(J_y,y)+d(J_z,z)$$

$\endgroup$
  • $\begingroup$ It is ok as long as you derive the correct weak form (if the divergence term comes from a heat or momentum diffusion equation for instance). However, why would you want to do this ? $\endgroup$ – SAAD Aug 21 '14 at 11:27
1
$\begingroup$

Based on so many simulations that I've run using my manual divergence calculation. The answer is yes. I also compared manual calculation with the built-in one and no error or different was observed.

$\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.