Skip to content
Snippets Groups Projects
forces.rst 2.09 KiB

Drag and lift computation

Two operators are dedicated to drag and lift computation: :class:`MomentumForces` and :class:`NocaForces`.

Momentum formula

Reference?

The :class:`Momentum` may be used to compute Drag and lift forces as :

Forces = \int_O (\tilde v - v_k) dt

O is the obstacle inside the flow and \tilde v is the penalised velocity, such that :

\tilde v = -\chi_O\frac{v_k}{1 + \lambda dt}

where v_k is the current velocity, dt the time step, \lambda a penalisation coefficient, with \chi the indicator function of the obstacle:

\chi_O(x) = \left\{
\begin{align}
   1  & \  if x \in O\\
   0  & \ if x \notin O
\end{align}\right. \  \forall x \in \Omega

Notice that this formula depends only on the velocity and on the obstacle but requires a penalisation.

The velocity is not impacted by this operator, a temporary buffer is used for all penalisation operations.

Noca's formula

See :cite:`Noca-1999` or even :cite:`Noca-thesis` for the whole details about Noca's formulation.

About buffers

Depending on the formula used, some buffers are required to compute time derivatives of velocity, inside the control box or on its surfaces.

D is the domain dimension. Faces are sorted in this order : [xmin, xmax, ymin, ymax ...], index gives s_id. For each face, i_n is the normal direction, i_t the tangential directions. self._previous_velo is a list of D * D * 2 components. with self_previous_velo[s_id * D + j] corresponding to velocity, component j on face s_id.

Noca I :
  • buffer for integral on the volume : a D dim vector, save the sum over points inside the control box
Noca II:
  • buffer on for integral on the volume, same as Noca I.
  • for each face, we need time derivative of velocity components of index i_t --> 2 buffers for each face.
Noca III:
  • for each face, we need time derivative of all velocity components --> 3 buffers for each face.