40 #include "libmesh/quadrature.h"
41 #include "libmesh/elem.h"
42 #include "libmesh/unstructured_mesh.h"
43 #include "libmesh/fem_system.h"
54 libMesh::Gradient grad_u, grad_v;
55 grad_u = context.interior_gradient(this->
_flow_vars.
u(), qp);
56 grad_v = context.interior_gradient(this->
_flow_vars.
v(), qp);
58 libMesh::Real vorticity_value;
59 vorticity_value = fabs(grad_v(0) - grad_u(1));
61 if(context.get_system().get_mesh().mesh_dimension() == 3)
63 libMesh::Gradient grad_w;
64 grad_w = context.interior_gradient(this->
_flow_vars.
w(), qp);
66 libMesh::Real vorticity_component_0 = grad_w(1) - grad_v(2);
67 libMesh::Real vorticity_component_1 = grad_u(2) - grad_v(0);
69 libMesh::Real term = vorticity_component_0*vorticity_component_0
70 + vorticity_component_1*vorticity_component_1
71 + vorticity_value*vorticity_value;
73 vorticity_value += std::sqrt(term);
76 return vorticity_value;
const VelocityVariable & _flow_vars
libMesh::Real vorticity(AssemblyContext &context, unsigned int qp) const