AdH Kraken 0.0.0
Next generation Adaptive Hydraulics
Loading...
Searching...
No Matches
sw2_bc_vel_ele.c File Reference
#include "adh.h"

Functions

int fe_sw2_bc_vel_ele (SMODEL_SUPER *mod, double *elem_rhs, int ie, double perturbation, int perturb_node, int perturb_var, int perturb_sign, int DEBUG)
 Computes the 1D element residual for the SW-2D model. More...
 

Detailed Description

This file collections functions responsible for the 2D shallow water boundary contributions to the elemental residual.

Function Documentation

◆ fe_sw2_bc_vel_ele()

int fe_sw2_bc_vel_ele ( SMODEL_SUPER mod,
double *  elem_rhs,
int  ie,
double  perturbation,
int  perturb_node,
int  perturb_var,
int  perturb_sign,
int  DEBUG 
)

Computes the 1D element residual for the SW-2D model.

Author
Charlie Berger, Ph.D.
Gaurav Savant, Ph.D.
Gary Brown, Ph.D.
Corey Trahan, Ph.D.
Bug:
none
Warning
none
Note
CJT :: Uses the SW2D model struct
Parameters
[out]elem_rhsthe 1D elemental residual array
[in]moda pointer to the model struct
[in]iethe elemental id
[in]pertubationthe Newton pertubation
[in]perturb_nodethe node to be perturbed
[in]perturb_varthe variable to be perturbed
[in]perturb_signthe direction of Newton perturbation
[in]DEBUGa debug flag

Integrates the weak, discrete outflow boundary terms:

\begin{eqnarray*}
  \residDA{i}{}{c}   &=& dt * \intbe{\phidd{i} \, q_n}{e} = dt * \intbe{\phidd{i} \, (\velb{h} \cdot \nrml) \, \depth{h}}{e} \\
  \residDA{i}{}{mx}  &=& dt * \bigg[
                               \bcConv{}{e}{\phidd{i}}{(\velb{h} \, \ub{h} \, \depth{h})}
                            +  \bcFriction{}{e}{\phidd{i}}{\ub{h}}{\velb{h}}
                            +  \bcPressureDD{}{e}{\phidd{i}}{(\depth{h})}{x}
                            +  \bcPressureDD{}{e}{\phidd{i} \,\rho^h}{(\depth{h})}{x}
                              \bigg] \\
  \residDA{i}{}{my}  &=& dt * \bigg[
                               \bcConv{}{e}{\phidd{i}}{(\velb{h} \, \ub{h} \, \depth{h})}
                            +  \bcFriction{}{e}{\phidd{i}}{\vb{h}}{\velb{h}}
                            +  \bcPressureDD{}{e}{\phidd{i}}{(\depth{h})}{y}
                            +  \bcPressureDD{}{e}{\phidd{i} \,\rho^h}{(\depth{h})}{y}
                              \bigg]
 \end{eqnarray*}

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

FINITE ELEMENT INTEGRATIONS

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

ELEVATION + VELOCITIES BOUNDARY CONTRIBUTION

Calculates applied tailwater + velocity natural boundaries to the elemental residual.

Note
CJT ::