PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
BlatterTestvanderVeen.hh
Go to the documentation of this file.
1 /* Copyright (C) 2020, 2021, 2022 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 #ifndef BLATTERTESTVANDERVEEN_H
21 #define BLATTERTESTVANDERVEEN_H
22 
23 #include "pism/stressbalance/blatter/Blatter.hh"
24 
25 namespace pism {
26 namespace stressbalance {
27 
28 /*!
29  * Implements the Dirichlet BC at the inflow boundary and the stress BC at the calving
30  * front boundary for the X-Z van der Veen shelf setup.
31  *
32  * The basal drag coefficient beta is x-dependent but its values are passed in using the
33  * basal yield stress input field.
34  */
36 public:
37  BlatterTestvanderVeen(std::shared_ptr<const Grid> grid, int Mz, int coarsening_factor);
38 
39  // Exact ice velocity
40  Vector2d u_exact(double x) const;
41 
42  // Exact ice thickness
43  double H_exact(double x) const;
44 
45  // Exact bed elevation
46  double b_exact(double x) const;
47 
48  // Exact sliding coefficient beta
49  double beta_exact(double x) const;
50 private:
51  bool dirichlet_node(const DMDALocalInfo &info, const fem::Element3::GlobalIndex& I);
52 
53  bool marine_boundary(int face,
54  const int *node_type,
55  const double *ice_bottom,
56  const double *sea_level);
57 
58  Vector2d u_bc(double x, double y, double z) const;
59 
60  void residual_lateral(const fem::Q1Element3 &element,
61  const fem::Q1Element3Face &face,
62  const double *surface_nodal,
63  const double *z_nodal,
64  const double *sl_nodal,
65  Vector2d *residual);
66 
67  void residual_surface(const fem::Q1Element3 &element,
68  const fem::Q1Element3Face &face,
69  Vector2d *residual);
70 
71  // constant ice hardness
72  double m_B;
73 
74  // thickness at the inflow boundary
75  double m_H0;
76 
77  // velocity at the inflow boundary
78  double m_V0;
79 
80  // ratio of surface elevation to ice thickness
81  double m_alpha;
82 
83  // ice density
84  double m_rho_ice;
85 
86  // gravitational acceleration
87  double m_g;
88 };
89 
90 } // end of namespace stressbalance
91 } // end of namespace pism
92 
93 #endif /* BLATTERTESTVANDERVEEN_H */
std::shared_ptr< const Grid > grid() const
Definition: Component.cc:105
This class represents a 2D vector field (such as ice velocity) at a certain grid point.
Definition: Vector2d.hh:29
3D Q1 element
Definition: Element.hh:351
Vector2d u_bc(double x, double y, double z) const
bool dirichlet_node(const DMDALocalInfo &info, const fem::Element3::GlobalIndex &I)
bool marine_boundary(int face, const int *node_type, const double *ice_bottom, const double *sea_level)
BlatterTestvanderVeen(std::shared_ptr< const Grid > grid, int Mz, int coarsening_factor)
void residual_surface(const fem::Q1Element3 &element, const fem::Q1Element3Face &face, Vector2d *residual)
void residual_lateral(const fem::Q1Element3 &element, const fem::Q1Element3Face &face, const double *surface_nodal, const double *z_nodal, const double *sl_nodal, Vector2d *residual)
const int I[]
Definition: ssafd_code.cc:24