Nek routines to compute the different terms in the momentum equation in strong and weak formulation.
-
$\mathbf{C}$ : Convection operator -
$\mathbf{M}$ : Mass matrix -
$\mathbf{K}$ : Stiffness matrix -
$\frac{\partial u_i}{\partial t}$ : Computed using BDF2, considering current solutionvxand two previous time stepsvxlag. Then scaled by the mass matrix -
$\mathbf{D}_i^T p$ :opgradt(px,py,pz,pr)(innavier1.f) wherepris defined in the pressure mesh and the outpoutspx,pyandpzare defined in the velocity mesh. -
$\mathbf{K} u_i$ :wlaplacian(lapu,u,diff,1)(innavier1.f) -
$M f_i$ :makeufwill call user defined forces and put them inBFX,BFYandBFZ - The convective term is computed in nek as:
convop(convu,u_i)and then scaled by the mass matrix (checkadvabroutine innavier1.f)
- Helmoltz operator:
$\mathbf{H}= \frac{b_0}{\Delta t}\mathbf{M} + \frac{1}{Re}\mathbf{K}$ $h_i^{n+1}=-\sum_{j=1}^k\frac{b_j}{\Delta t} \mathbf{M}u_i^{n+1-j} - \sum_{j=1}^k a_j\mathbf{C}u_i^{n+1-j} + \mathbf{M}f_i^n$