Peano
FrictionLaws Namespace Reference

Variables

string friction_coefficients
 
string max_eigenvalue
 
string flux
 
string nonconservative_product
 
string coulomb_friction
 
string material_dependent_basal_friction
 

Variable Documentation

◆ coulomb_friction

string FrictionLaws.coulomb_friction
Initial value:
1 = friction_coefficients + r"""
2  S[Shortcuts::h] = 0.0;
3  S[Shortcuts::hu] = 0.0;
4  S[Shortcuts::hv] = 0.0;
5 
6  if (tarch::la::greater(Q[Shortcuts::h], 0.0)) {
7  const double u{Q[Shortcuts::hu + 0] / Q[Shortcuts::h]};
8  const double v{Q[Shortcuts::hu + 1] / Q[Shortcuts::h]};
9  const double velMagnitudeSqr{u * u + v * v};
10  if (tarch::la::greater(velMagnitudeSqr, 0.0)) {
11  const double zx{Q[Shortcuts::bx] / h(0)};
12  const double zy{Q[Shortcuts::by] / h(1)};
13  const double c{1.0 / std::sqrt(1.0 + zx * zx + zy * zy)};
14  const double friction{-GRAV * (Mu1 * Q[Shortcuts::h] * c)};
15  const double velMagnitude{std::sqrt(velMagnitudeSqr)};
16  S[Shortcuts::hu] += u / velMagnitude * friction;
17  S[Shortcuts::hv] += v / velMagnitude * friction;
18  }
19  }
20 """

Definition at line 98 of file FrictionLaws.py.

◆ flux

string FrictionLaws.flux
Initial value:
1 = friction_coefficients + r"""
2  if (tarch::la::greater(Q[Shortcuts::h], 0.0)) {
3  const double ih = 1.0 / Q[Shortcuts::h];
4  F[Shortcuts::h] = Q[Shortcuts::hu + normal];
5  switch (normal) {
6  case 0:
7  F[Shortcuts::hu] = ih * Q[Shortcuts::hu] * Q[Shortcuts::hu] + 0.5 * GRAV * std::cos(Zeta) * Q[Shortcuts::h] * Q[Shortcuts::h];
8  F[Shortcuts::hv] = ih * Q[Shortcuts::hu] * Q[Shortcuts::hv];
9  break;
10  case 1:
11  F[Shortcuts::hu] = ih * Q[Shortcuts::hv] * Q[Shortcuts::hu];
12  F[Shortcuts::hv] = ih * Q[Shortcuts::hv] * Q[Shortcuts::hv] + 0.5 * GRAV * std::cos(Zeta) * Q[Shortcuts::h] * Q[Shortcuts::h];
13  break;
14  }
15  } else {
16  F[Shortcuts::h] = 0.0;
17  F[Shortcuts::hu] = 0.0;
18  F[Shortcuts::hv] = 0.0;
19  }
20 """

Definition at line 42 of file FrictionLaws.py.

◆ friction_coefficients

string FrictionLaws.friction_coefficients
Initial value:
1 = r"""
2  const double Zeta = 35.0 * tarch::la::PI / 180.0; // Conversion of degrees to radians
3  const double Zeta1 = 28.95 * tarch::la::PI / 180.0;
4  const double Zeta2 = 44.09 * tarch::la::PI / 180.0;
5  const double Zeta3 = 31.81 * tarch::la::PI / 180.0;
6 
7  const double Mu1 = std::tan(Zeta1);
8  const double Mu2 = std::tan(Zeta2);
9  const double Mu3 = std::tan(Zeta3);
10 
11  constexpr double Beta = 1.07;
12  constexpr double Gamma = 2.01;
13  constexpr double BetaStar = 0.06;
14  // Kappa in the friction law is assumed to be 1 and is just initialised as a
15  // const double here using Kappa. The user can apply std::pow((Fr/BetaStar),
16  // Kappa) for evaluating T here in case the value of Kappa is different
17  // from 1.
18 
19  constexpr double Kappa = 1.0;
20  constexpr double FrictionLengthScale = 0.00035;
21 
22  const double Nu = (2.0 / 9.0) * (FrictionLengthScale / Beta) * (GRAV * std::sin(Zeta) / std::sqrt(GRAV * std::cos(Zeta))) * (((Mu2 - Mu1) / (std::tan(Zeta) - Mu1)) - 1.0);
23  const double Hstart = FrictionLengthScale * (((Mu2 - Mu1) / (std::tan(Zeta) - Mu3)) - 1.0);
24  const double Hstop = FrictionLengthScale * (((Mu2 - Mu1) / (std::tan(Zeta) - Mu1)) - 1.0);
25 """

Definition at line 4 of file FrictionLaws.py.

◆ material_dependent_basal_friction

string FrictionLaws.material_dependent_basal_friction

Definition at line 119 of file FrictionLaws.py.

◆ max_eigenvalue

string FrictionLaws.max_eigenvalue
Initial value:
1 = friction_coefficients + r"""
2  double result{0.0};
3 
4  if (tarch::la::greater(Q[Shortcuts::h], 0.0)) {
5  const double u = Q[Shortcuts::hu + normal] / Q[Shortcuts::h];
6  const double c = std::sqrt(GRAV * std::cos(Zeta) * Q[Shortcuts::h]);
7  result = std::fmax(std::fabs(u - c), std::fabs(u + c));
8  }
9 
10  return result;
11 """

Definition at line 30 of file FrictionLaws.py.

◆ nonconservative_product

string FrictionLaws.nonconservative_product

Definition at line 63 of file FrictionLaws.py.