file: Nektar2d/src/rotational.c
/* ------------------------------------------------------------------------- *
* VxOmega() - Calculate the nonlinear terms in rotational form *
* *
* The following function calculates the nonlinear portion of the Navier- *
* Stokes equation in rotational form to minimize work. It may be expressed *
* as: *
* *
* N(V) = [ v.wz - w.wy ] i + [ w.wx - u.wz ] j + [ u.wy - v.wx ] k *
* *
* where V = (u,v,w) are the three velocity components and (wx,wy,wz) are *
* the corresponding components of the vorticty vector. * //OVERLOAD CALL: vector: Coords.c(?), Curvi.c(?)
* *
* RCS Information
* ---------------
* $Author: tcew $
* $Date: 1996/06/07 18:50:29 $
* $Source: /users/tcew/Hybrid/Nektar2d/src/RCS/rotational.C,v $
* $Revision: 1.1 $
* ------------------------------------------------------------------------- */
#include "nektar.h"
/* ----------------- 2D Nonlinear Terms ------------------- */
void VxOmega(Domain *omega) //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?)
{
Element_List *U = omega->U, *V = omega->V,
*Nx = omega->Uf, *Ny = omega->Vf,
*Qz = omega->Vf;
U->Grad(0,Nx,0,'y'); //OVERLOAD CALL: Grad: Gradient.c(Tet), Gradient.c(Pyr), Gradient.c(Prism), Gradient.c(Hex), Element_List.c(Element_List), Gradient.c(Tri), Gradient.c(Quad)
V->Grad(Ny,0,0,'x'); //OVERLOAD CALL: Grad: Gradient.c(Tet), Gradient.c(Pyr), Gradient.c(Prism), Gradient.c(Hex), Element_List.c(Element_List), Gradient.c(Tri), Gradient.c(Quad)
dvsub(U->htot, Ny->base_h, 1, Nx->base_h, 1, Qz->base_h, 1);
dvmul(U->htot, V->base_h, 1, Qz->base_h, 1, Nx->base_h, 1);
dvmul(U->htot, U->base_h, 1, Qz->base_h, 1, Ny->base_h, 1);
dneg(U->htot, Ny->base_h, 1);
Nx->Set_state('p');
Ny->Set_state('p');
return;
}
C++ to HTML Conversion by ctoohtml