PISM, A Parallel Ice Sheet Model 2.3.0-79cae578d committed by Constantine Khrulev on 2026-03-22
Loading...
Searching...
No Matches
GPBLD.cc
Go to the documentation of this file.
1/* Copyright (C) 2015, 2016, 2017, 2018, 2023, 2025, 2026 PISM Authors
2 *
3 * This file is part of PISM.
4 *
5 * PISM is free software; you can redistribute it and/or modify it under the
6 * terms of the GNU General Public License as published by the Free Software
7 * Foundation; either version 3 of the License, or (at your option) any later
8 * version.
9 *
10 * PISM is distributed in the hope that it will be useful, but WITHOUT ANY
11 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with PISM; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#include "pism/rheology/GPBLD.hh"
21#include "pism/util/Config.hh"
22
23namespace pism {
24namespace rheology {
25
26/*!
27 This constructor just sets flow law factor for nonzero water content, from
28 \ref AschwandenBlatter and \ref LliboutryDuval1985.
29*/
30GPBLD::GPBLD(double exponent, const Config &config, std::shared_ptr<EnthalpyConverter> ec)
31 : FlowLaw(exponent, config, ec) {
32 m_name = "Glen-Paterson-Budd-Lliboutry-Duval";
33
34 m_T_0 = config.get_number("constants.fresh_water.melting_point_temperature"); // K
35 m_water_frac_coeff = config.get_number("flow_law.gpbld.water_frac_coeff");
36
37 m_water_frac_observed_limit = config.get_number("flow_law.gpbld.water_frac_observed_limit");
38}
39
40//! The softness factor in the Glen-Paterson-Budd-Lliboutry-Duval flow law. For constitutive law form.
41/*!
42 This is a modification of Glen-Paterson-Budd ice, which is PatersonBudd. In particular, if
43 \f$A()\f$ is the softness factor for PatersonBudd, if \f$E\f$ is the enthalpy, and \f$p\f$ is
44 the pressure then the softness we compute is
45 \f[A = A(T_{pa}(E, p))(1+184\omega).\f]
46 The pressure-melting temperature \f$T_{pa}(E, p)\f$ is computed by pressure_adjusted_temperature().
47*/
48double GPBLD::softness_impl(double enthalpy, double pressure) const {
49 const double E_s = m_EC->enthalpy_cts(pressure);
50 if (enthalpy < E_s) { // cold ice
51 double T_pa = m_EC->pressure_adjusted_temperature(enthalpy, pressure);
52 return softness_paterson_budd(T_pa);
53 }
54
55 // temperate ice
56 double omega = m_EC->water_fraction(enthalpy, pressure);
57 // as stated in \ref AschwandenBuelerBlatter, cap omega at max of observations:
58 omega = std::min(omega, m_water_frac_observed_limit);
59 // next line implements eqn (23) in \ref AschwandenBlatter2009
60 return softness_paterson_budd(m_T_0) * (1.0 + m_water_frac_coeff * omega);
61}
62
63void GPBLD::flow_n_impl(const double *stress, const double *enthalpy,
64 const double *pressure, const double *grainsize,
65 unsigned int n, double *result) const {
66 // optimize the common case of Glen n=3
67 if (m_n == 3.0) {
68 for (unsigned int k = 0; k < n; ++k) {
69 result[k] = this->softness(enthalpy[k], pressure[k]) * (stress[k] * stress[k]);
70 }
71
72 return;
73 }
74
75 for (unsigned int k = 0; k < n; ++k) {
76 result[k] = this->flow(stress[k], enthalpy[k], pressure[k], grainsize[k]);
77 }
78}
79
80} // end of namespace rheology
81} // end of namespace pism
double get_number(const std::string &name, UseFlag flag=REMEMBER_THIS_USE) const
Definition Config.cc:188
A class for storing and accessing PISM configuration flags and parameters.
Definition Config.hh:56
double softness_paterson_budd(double T_pa) const
Return the softness parameter A(T) for a given temperature T.
Definition FlowLaw.cc:82
std::shared_ptr< EnthalpyConverter > m_EC
Definition FlowLaw.hh:124
double softness(double E, double p) const
Definition FlowLaw.cc:115
double flow(double stress, double enthalpy, double pressure, double grain_size) const
The flow law itself.
Definition FlowLaw.cc:90
double m_n
power law exponent
Definition FlowLaw.hh:150
double m_water_frac_observed_limit
Definition GPBLD.hh:41
double softness_impl(double enthalpy, double pressure) const
The softness factor in the Glen-Paterson-Budd-Lliboutry-Duval flow law. For constitutive law form.
Definition GPBLD.cc:48
void flow_n_impl(const double *stress, const double *enthalpy, const double *pressure, const double *grainsize, unsigned int n, double *result) const
Definition GPBLD.cc:63
double m_water_frac_coeff
Definition GPBLD.hh:41
GPBLD(double exponent, const Config &config, std::shared_ptr< EnthalpyConverter > EC)
Definition GPBLD.cc:30
#define n
Definition exactTestM.c:37
static const double k
Definition exactTestP.cc:42