2.3.5. swHypclDipG

Defined in swCore/swCore.h

class swHypclDipG : public swModel

Implementation of the Dual Integral Porosity model.

Public Functions

swHypclDipG(void)

Construct the empty and numerical parameters.

~swHypclDipG(void)

Class’s destructor.

void setParameters(swSettings *settings, swMesh *mesh, swTimeSeries *time_series)

Set the numerical parameters.

Parameters
  • settings: contains the user defined parameters

  • mesh: pointer to mesh structure

  • time_series: used to compute time series for the boundary conditions

double solve(double t, double d_t, const xt::xarray<double> &bcval, int istor, int layer = 0)

Update the solution over a time step.

Return

time step

Parameters
  • t: time

  • d_t: time step

  • bc_val: values of the boundary conditions at this instant

  • istor: flag for producing output

void writeBoundaries(double time, int layer = 0)

Write total fluxes through boundary interfaces.

void computeFluxMultiplicators(void)
void computeTotalWaterDepth(double t, double d_t, const xt::xarray<double> &bc_val)

Private Functions

void hllc_impervious(double zbL, double PhiL, double bL, double zbR, double PhiR, double bR, double PhiG, double zL, double qqL, double rrL, double zR, double qqR, double rrR, double &F1, double &F2, double &F3, double &s2L, double &s2R)

Compute the fluxes and source terms through an interface when its porosity is null.

Parameters
  • zbL: bottom elevation of the left-hand cell w.r.t. the interface;

  • PhiL: cell porosity of the left-hand cell w.r.t. the interface;

  • bL: Boussinesq coefficient of the left-hand cell w.r.t. the interface;

  • zbR: bottom elevation of the right-hand cell w.r.t. the interface;

  • PhiR: cell porosity of the right-hand cell w.r.t. the interface;

  • bR: Boussinesq coefficient of the right-hand cell w.r.t. the interface;

  • zL: surface elevation of the left-hand cell w.r.t. the interface;

  • qqL: x unit discharge of the left-hand cell w.r.t. the interface;

  • rrL: y unit discharge of the left-hand cell w.r.t. the interface;

  • zR: surface elevation of the right-hand cell w.r.t. the interface;

  • qqR: x unit discharge of the right-hand cell w.r.t. the interface;

  • rrR: y unit discharge of the right-hand cell w.r.t. the interface;

  • F1: mass flux through the interface (output)

  • F2: x momentum through the interface (output)

  • F3: y momentum through the interface (output)

  • s2L: left-distributed source term (bottom and porosity variations) at the interface (output)

  • s2R: right-distributed source term (bottom and porosity variations) at the interface (output)

void hllc_v2(int detail, double zbL, double PhiL, double bL, double zbR, double PhiR, double bR, double PhiG, double PhiGL, double PhiGR, double zL, double qL, double rL, double zR, double qR, double rR, double &F1, double &F2, double &F3, double &s2L, double &s2R)

Compute the fluxes and source terms through an interface in the Dual Integral Porosity model.

Parameters
  • detail: debugging flag (if 1 output detailed informations of the fluxes’ computations)

  • zbL: bottom elevation of the left-hand cell w.r.t. the interface;

  • PhiL: cell porosity of the left-hand cell w.r.t. the interface;

  • bL: Boussinesq coefficient of the left-hand cell w.r.t. the interface;

  • zbR: bottom elevation of the right-hand cell w.r.t. the interface;

  • PhiR: cell porosity of the right-hand cell w.r.t. the interface;

  • bR: Boussinesq coefficient of the right-hand cell w.r.t. the interface;

  • PhiG: interface porosity of the interface;

  • PhiGL: interface porosity of the left-hand cell w.r.t. the interface;

  • PhiGR: interface porosity of the right-hand cell w.r.t. the interface;

  • zL: surface elevation of the left-hand cell w.r.t. the interface;

  • qL: x unit discharge of the left-hand cell w.r.t. the interface;

  • rL: y unit discharge of the left-hand cell w.r.t. the interface;

  • zR: surface elevation of the right-hand cell w.r.t. the interface;

  • qR: x unit discharge of the right-hand cell w.r.t. the interface;

  • rR: y unit discharge of the right-hand cell w.r.t. the interface;

  • F1: mass flux through the interface (output)

  • F2: x momentum through the interface (output)

  • F3: y momentum through the interface (output)

  • s2L: left-distributed source term (bottom and porosity variations) at the interface (output)

  • s2R: right-distributed source term (bottom and porosity variations) at the interface (output)

void BC2(double t, QChar side, QChar typBC, double valBC, double A, double zb, double L, double normx, double normy, double PhiW, double PhiG, double zD, double qD, double rD, double &F1, double &F2, double &F3)

Compute the flux through a boundary interface.

Parameters
  • t: time

  • side: side of the outer cell with respect to the boundary interface (‘L’ or ‘R’)

  • typBC: type of boundary condition (‘f’, ‘c’, ‘h’, ‘z’, ‘q’)

  • valBC: value of the boundary condition

  • A: area of the inner cell w.r.t. the boundary interface;

  • zb: bottom elevation of the inner cell w.r.t. the boundary interface;

  • normx: x component of the normal unit vector to the interface;

  • normy: y component of the normal unit vector to the interface;

  • PhiW: cell porosity of the inner cell w.r.t. the boundary interface;

  • PhiG: interface porosity of the boundary interface;

  • zD: surface elevation at the inner cell w.r.t. the boundary interface;

  • qD: x unit discharge at the inner cell w.r.t. the boundary interface;

  • rD: y unit discharge at the inner cell w.r.t. the boundary interface;

  • F1: mass flux through the interface (output)

  • F2: x momentum through the interface (output)

  • F3: y momentum through the interface (output)

double DivCor(double t, double d_t, std::vector<double> &F1, std::vector<double> &F2, std::vector<double> &F3, std::vector<double> &s2L, std::vector<double> &s2R, int layer)

Divergence Correction over the entire domain.

Parameters
  • t: time

  • d_t: time step

  • F1: mass fluxes through the mesh interfaces

  • F2: x momentum fluxes through the mesh interfaces

  • F3: y momentum fluxes through the mesh interfaces

  • s2L: left-distributed source term (bottom and porosity variations) at the mesh interfaces

  • s2R: right-distributed source term (bottom and porosity variations) at the mesh interfaces

double DivCor2(double t, double d_t, std::vector<double> &F1, std::vector<double> &F2, std::vector<double> &F3, std::vector<double> &s2L, std::vector<double> &s2R, int layer)

Divergence Correction over the entire domain (version 2)

Parameters
  • t: time

  • d_t: time step

  • F1: mass fluxes through the mesh interfaces

  • F2: x momentum fluxes through the mesh interfaces

  • F3: y momentum fluxes through the mesh interfaces

  • s2L: left-distributed source term (bottom and porosity variations) at the mesh interfaces

  • s2R: right-distributed source term (bottom and porosity variations) at the mesh interfaces

Private Members

class swHypclDipGPrivate *d