compute the divergence of a vector field
group DVdivrg {
Mesh+Node_Data+Iparam &in { /* input field */
xform_nonotify;
nnodes+req;
coordinates.values+req;
};
int+Iparam comp;
Node_Data+write+nonotify out_nd;
Mesh+Node_Data+nonotify+OPort2 &out => merge(out_nd, in);
method+notify_val+notify_inst upd_divrg = "divrg";
};
DVdivrg computes the divergence of a vector field with any mesh type.
The input is a reference to a field with any mesh type. The Node_Data must have one or more 3-vector components.
An integer. Sets which component's divergence to compute. The selected component must be a 3-vector.
This output is a new Node_Data object. It contains one scalar float component at each node that represents the divergence.
This output is a new object that is the merge of the new out_nd Node_Data plus a reference to the original input field.
The algorithm used to compute the divergence in structured meshes is a finite difference approximation based on a central difference scheme. For unstructured meshes, the function is based on the cell shape functions and their derivatives.
In both cases, where the vector node data component is:
The equation used to compute the divergence is:
Libraries.Main.Filters.divergence