21#include "pism/basalstrength/basal_resistance.hh"
23#include "pism/util/ConfigInterface.hh"
24#include "pism/util/Logger.hh"
41 log.
message(threshold,
"Using purely plastic till with eps = %10.5e m year-1.\n",
50 return tauc / sqrt(magreg2);
61 double *beta,
double *dbeta)
const {
64 *beta = tauc / sqrt(magreg2);
67 *dbeta = -1 * (*beta) / magreg2;
88 "Using linearly viscous till with u_threshold = %.2f m year-1.\n",
92 "Using pseudo-plastic till with eps = %10.5e m year-1, q = %.4f,"
93 " and u_threshold = %.2f m year-1.\n",
175 double *beta,
double *dbeta)
const
187 *dbeta = (
m_q - 1) * (*beta) / magreg2;
196 m_q = config.
get_number(
"basal_resistance.pseudo_plastic.q");
205 "Using regularized Coulomb till with eps = %10.5e m year-1, q = %.4f,"
206 " and u_threshold = %.2f m year-1.\n",
234 double *beta,
double *dbeta)
const {
236 magreg2sqr = sqrt(magreg2);
240 *beta = (tauc / Aq) * pow(magreg2sqr, (
m_q - 1)) * pow((magreg2sqr +
m_u_threshold), -
m_q);
246 *dbeta = (((
m_q - 1) / magreg2) - (
m_q / (magreg2sqr * (magreg2sqr +
m_u_threshold)))) * (*beta);
double get_number(const std::string &name, UseFlag flag=REMEMBER_THIS_USE) const
A class for storing and accessing PISM configuration flags and parameters.
virtual double drag(double tauc, double vx, double vy) const
Compute the drag coefficient for the basal shear stress.
double m_plastic_regularize
virtual void print_info(const Logger &log, int threshold, units::System::Ptr system) const
IceBasalResistancePlasticLaw(const Config &config)
virtual void drag_with_derivative(double tauc, double vx, double vy, double *drag, double *ddrag) const
Compute the drag coefficient and its derivative with respect to .
Class containing physical constants and the constitutive relation describing till for SSA.
IceBasalResistancePseudoPlasticLaw(const Config &config)
virtual double drag(double tauc, double vx, double vy) const
Compute the drag coefficient for the basal shear stress.
double m_u_threshold_factor
virtual void print_info(const Logger &log, int threshold, units::System::Ptr system) const
double m_sliding_scale_factor_reduces_tauc
virtual void drag_with_derivative(double tauc, double vx, double vy, double *drag, double *ddrag) const
Compute the drag coefficient and its derivative with respect to .
virtual double drag(double tauc, double vx, double vy) const
Compute the drag coefficient for the basal shear stress.
virtual void print_info(const Logger &log, int threshold, units::System::Ptr system) const
IceBasalResistanceRegularizedLaw(const Config &config)
virtual void drag_with_derivative(double tauc, double vx, double vy, double *drag, double *ddrag) const
Compute the drag coefficient and its derivative with respect to .
double m_sliding_scale_factor_reduces_tauc
void message(int threshold, const char format[],...) const __attribute__((format(printf
Print a message to the log.
std::shared_ptr< System > Ptr
double convert(System::Ptr system, double input, const std::string &spec1, const std::string &spec2)
Convert a quantity from unit1 to unit2.
static double square(double x)