PISM, A Parallel Ice Sheet Model 2.3.0-79cae578d committed by Constantine Khrulev on 2026-03-22
Loading...
Searching...
No Matches
SSA.hh
Go to the documentation of this file.
1// Copyright (C) 2004--2020, 2022, 2023, 2024, 2025 Jed Brown, Ed Bueler and Constantine Khroulev
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#ifndef _SSA_H_
20#define _SSA_H_
21
22#include "pism/stressbalance/ShallowStressBalance.hh"
23#include "pism/util/array/CellType.hh"
24
25namespace pism {
26
27class Geometry;
28
29namespace stressbalance {
30
31//! Gives an extension coefficient to maintain ellipticity of SSA where ice is thin.
32/*!
33 The SSA is basically a nonlinear elliptic, but vector-valued, equation which
34 determines the ice velocity field from the driving stress, the basal shear
35 stress, the ice hardness, and some boundary conditions. The problem loses
36 ellipticity (coercivity) if the thickness actually goes to zero. This class
37 provides an extension coefficient to maintain ellipticity.
38
39 More specifically, the SSA equations are
40 \f[
41 \def\ddx#1{\ensuremath{\frac{\partial #1}{\partial x}}}
42 \def\ddy#1{\ensuremath{\frac{\partial #1}{\partial y}}}
43 - 2 \ddx{}\left[\nu H \left(2 \ddx{u} + \ddy{v}\right)\right]
44 - \ddy{}\left[\nu H \left(\ddy{u} + \ddx{v}\right)\right]
45 + \tau_{(b)x} = - \rho g H \ddx{h},
46 \f]
47 and another similar equation for the \f$y\f$-component. Schoof
48 \ref SchoofStream shows that these PDEs are the variational equations for a
49 coercive functional, thus (morally) elliptic.
50
51 The quantity \f$\nu H\f$ is the nonlinear coefficient, and conceptually it is a
52 membrane strength. This class extends \f$\nu H\f$ to have a minimum value
53 at all points. It is a class, and not just a configuration constant, because
54 setting both the thickness \f$H\f$ and the value \f$\nu H\f$ are allowed, and
55 setting each of these does not affect the value of the other.
56*/
58public:
60
61 void set_notional_strength(double my_nuH);
62 void set_min_thickness(double my_min_thickness);
63 double get_notional_strength() const;
64 double get_min_thickness() const;
65private:
67};
68
69//! PISM's SSA solver.
70/*!
71 An object of this type solves equations for the vertically-constant horizontal
72 velocity of ice that is sliding over land or is floating. The equations are, in
73 their clearest divergence form
74 \f[ - \frac{\partial T_{ij}}{\partial x_j} - \tau_{(b)i} = f_i \f]
75 where \f$i,j\f$ range over \f$x,y\f$, \f$T_{ij}\f$ is a depth-integrated viscous
76 stress tensor (%i.e. equation (2.6) in [\ref SchoofStream]).
77 These equations determine velocity in a more-or-less elliptic manner.
78 Here \f$\tau_{(b)i}\f$ are the components of the basal shear stress applied to
79 the base of the ice. The right-hand side \f$f_i\f$ is the driving shear stress,
80 \f[ f_i = - \rho g H \frac{\partial h}{\partial x_i}. \f]
81 Here \f$H\f$ is the ice thickness and \f$h\f$ is the elevation of the surface of
82 the ice. More concretely, the SSA equations are
83 \f{align*}
84 - 2 \left[\nu H \left(2 u_x + v_y\right)\right]_x
85 - \left[\nu H \left(u_y + v_x\right)\right]_y
86 - \tau_{(b)1} &= - \rho g H h_x, \\
87 - \left[\nu H \left(u_y + v_x\right)\right]_x
88 - 2 \left[\nu H \left(u_x + 2 v_y\right)\right]_y
89 - \tau_{(b)2} &= - \rho g H h_y,
90 \f}
91 where \f$u\f$ is the \f$x\f$-component of the velocity and \f$v\f$ is the
92 \f$y\f$-component of the velocity [\ref MacAyeal, \ref Morland, \ref WeisGreveHutter].
93
94 Derived classes actually implement numerical methods to solve these equations.
95 This class is virtual, but it actually implements some helper functions believed
96 to be common to all implementations (%i.e. regular grid implementations) and it
97 provides the basic fields.
98*/
99class SSA : public ShallowStressBalance {
100public:
101 SSA(std::shared_ptr<const Grid> g);
102 virtual ~SSA();
103
105
106 virtual void update(const Inputs &inputs, bool full_update);
107
108 virtual std::string stdout_report() const;
109protected:
110 virtual std::set<VariableMetadata> state_impl() const;
111 virtual void write_state_impl(const OutputFile &output) const;
112
113 virtual void init_impl();
114
115 virtual void solve(const Inputs &inputs) = 0;
116
117 void extrapolate_velocity(const array::CellType1 &cell_type,
118 array::Vector1 &velocity) const;
119
120 std::string m_stdout_ssa;
121
122 array::Vector m_velocity_global; // global vector for solution
123};
124
125} // end of namespace stressbalance
126} // end of namespace pism
127
128#endif /* _SSA_H_ */
A class for storing and accessing PISM configuration flags and parameters.
Definition Config.hh:56
double get_notional_strength() const
Returns strength = (viscosity times thickness).
Definition SSA.cc:61
void set_min_thickness(double my_min_thickness)
Set minimum thickness to trigger use of extension.
Definition SSA.cc:50
double get_min_thickness() const
Returns minimum thickness to trigger use of extension.
Definition SSA.cc:66
void set_notional_strength(double my_nuH)
Set strength = (viscosity times thickness).
Definition SSA.cc:41
Gives an extension coefficient to maintain ellipticity of SSA where ice is thin.
Definition SSA.hh:57
virtual void update(const Inputs &inputs, bool full_update)
Update the SSA solution.
Definition SSA.cc:135
virtual void solve(const Inputs &inputs)=0
virtual void write_state_impl(const OutputFile &output) const
The default (empty implementation).
Definition SSA.cc:194
array::Vector m_velocity_global
Definition SSA.hh:122
void extrapolate_velocity(const array::CellType1 &cell_type, array::Vector1 &velocity) const
Definition SSA.cc:159
virtual std::set< VariableMetadata > state_impl() const
Definition SSA.cc:190
SSAStrengthExtension * strength_extension
Definition SSA.hh:104
virtual std::string stdout_report() const
Produce a report string for the standard output.
Definition SSA.cc:186
std::string m_stdout_ssa
Definition SSA.hh:120
virtual void init_impl()
Initialize a generic regular-grid SSA solver.
Definition SSA.cc:104
PISM's SSA solver.
Definition SSA.hh:99
const array::Vector1 & velocity() const
Get the thickness-advective 2D velocity.
Shallow stress balance (such as the SSA).
static const double g
Definition exactTestP.cc:36