24 #include "pism/util/EnthalpyConverter.hh"
25 #include "pism/util/Vector2d.hh"
52 return 0.5 * (u_x * u_x + v_y * v_y + w_z * w_z + 0.5*(u_y + v_x)*(u_y + v_x));
84 double *nu,
double *dnu)
const;
87 double *nu,
double *dnu)
const;
89 std::string
name()
const;
94 double hardness(
double E,
double p)
const;
95 void hardness_n(
const double *enthalpy,
const double *pressure,
96 unsigned int n,
double *result)
const;
98 double softness(
double E,
double p)
const;
100 double flow(
double stress,
double enthalpy,
double pressure,
double grain_size)
const;
101 void flow_n(
const double *stress,
const double *E,
102 const double *pressure,
const double *grainsize,
103 unsigned int n,
double *result)
const;
106 virtual double flow_impl(
double stress,
double E,
107 double pressure,
double grainsize)
const;
108 virtual void flow_n_impl(
const double *stress,
const double *E,
109 const double *pressure,
const double *grainsize,
110 unsigned int n,
double *result)
const;
112 virtual void hardness_n_impl(
const double *enthalpy,
const double *pressure,
113 unsigned int n,
double *result)
const;
158 double ice_thickness,
159 unsigned int kbelowH,
160 const double *zlevels,
161 const double *enthalpy);
A class for storing and accessing PISM configuration flags and parameters.
std::shared_ptr< EnthalpyConverter > Ptr
This class represents a 2D vector field (such as ice velocity) at a certain grid point.
A virtual class collecting methods common to ice and bedrock 3D fields.
double m_crit_temp
critical temperature (cold – warm transition)
double softness_paterson_budd(double T_pa) const
Return the softness parameter A(T) for a given temperature T.
double m_schoofReg
regularization parameter for
virtual double hardness_impl(double E, double p) const
double m_A_warm
Paterson-Budd softness, warm case.
double m_A_cold
Paterson-Budd softness, cold case.
double m_Q_cold
Activation energy, cold case.
double m_standard_gravity
acceleration due to gravity
double m_viscosity_power
; used to compute viscosity
virtual ~FlowLaw()=default
void flow_n(const double *stress, const double *E, const double *pressure, const double *grainsize, unsigned int n, double *result) const
virtual void hardness_n_impl(const double *enthalpy, const double *pressure, unsigned int n, double *result) const
void effective_viscosity(double hardness, double gamma, double *nu, double *dnu) const
Computes the regularized effective viscosity and its derivative with respect to the second invariant ...
void hardness_n(const double *enthalpy, const double *pressure, unsigned int n, double *result) const
FlowLaw(const std::string &prefix, const Config &config, EnthalpyConverter::Ptr EC)
double softness(double E, double p) const
virtual double softness_impl(double E, double p) const =0
double m_hardness_power
; used to compute hardness
double m_melting_point_temp
melting point temperature (for water, 273.15 K)
EnthalpyConverter::Ptr EC() const
double m_beta_CC_grad
Clausius-Clapeyron gradient.
double flow(double stress, double enthalpy, double pressure, double grain_size) const
The flow law itself.
double m_ideal_gas_constant
ideal gas constant
virtual double flow_impl(double stress, double E, double pressure, double grainsize) const
double m_Q_warm
Activation energy, warm case.
double m_n
power law exponent
double hardness(double E, double p) const
EnthalpyConverter::Ptr m_EC
virtual void flow_n_impl(const double *stress, const double *E, const double *pressure, const double *grainsize, unsigned int n, double *result) const
void averaged_hardness_vec(const FlowLaw &ice, const array::Scalar &thickness, const array::Array3D &enthalpy, array::Scalar &result)
double averaged_hardness(const FlowLaw &ice, double thickness, unsigned int kbelowH, const double *zlevels, const double *enthalpy)
Computes vertical average of B(E, p) ice hardness, namely .
bool FlowLawUsesGrainSize(const FlowLaw &flow_law)
static double secondInvariant_2D(const Vector2d &U_x, const Vector2d &U_y)