Loading [MathJax]/extensions/tex2jax.js
PISM, A Parallel Ice Sheet Model 2.2.1-cd005eec8 committed by Constantine Khrulev on 2025-03-07
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
exactTestN.c
Go to the documentation of this file.
1/*
2 Copyright (C) 2010, 2014, 2016, 2023, 2025 Ed Bueler
3
4 This file is part of PISM.
5
6 PISM is free software; you can redistribute it and/or modify it under the
7 terms of the GNU General Public License as published by the Free Software
8 Foundation; either version 3 of the License, or (at your option) any later
9 version.
10
11 PISM is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14 details.
15
16 You should have received a copy of the GNU General Public License
17 along with PISM; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19*/
20
21#include <math.h>
22#include "pism/verification/tests/exactTestN.h"
23
24#define secpera 31556926.0 /* seconds per year; 365.2422 days */
25#define g 9.81
26#define rho 910.0 /* ice density; kg m-3 */
27#define rhow 1028.0 /* sea water density; kg m-3 */
28#define n 3.0 /* Glen power */
29
31 double s = 0.0;
32 struct TestNConstants result;
33
34 /* geometry */
35 result.H0 = 3000.0;
36 result.L0 = 500.0e3;
37 result.xc = 0.9 * (result.L0);
38
39 /* mass balance */
40 result.a = 0.003 / secpera; /* s-1; mass balance gradient with elevation */
41 result.H_ela = (result.H0) / 1.5; /* m; H0 = 1.5 H_ela exactly */
42
43 /* sliding */
44 /* s m-1; choose k so that eqn (24) gives our L0 */
45 result.k = 9.0 * (result.H_ela) / ((result.a) * (result.L0) * (result.L0));
46
47 /* grounded calving front boundary condition, imposed at xc = .9 L0, determines
48 constant vertically-integrated longitudinal stress T; see (2.12) in Schoof (2006);
49 treats Hc = H(xc) as exactly at flotation */
50 s = (result.xc) / (result.L0);
51 result.H_xc = (result.H0) * (1.0 - s * s);
52 result.T_xc = 0.5 * (1.0 - rho / rhow) * rho * g * (result.H_xc) * (result.H_xc);
53
54 return result;
55}
56
58
59 double q = 0.0, hxx = 0.0, ux = 0.0;
60 const struct TestNConstants c = exactNConstants();
61 struct TestNParameters result;
62
63 {
64 result.error_code = 0;
65 result.H = 0;
66 result.h_x = 0;
67 result.u = 0;
68 result.M = 0;
69 result.B = 0;
70 result.beta = 0;
71 }
72
73 if (x < 0.0) {
74 result.error_code = 1;
75 return result;
76 }
77
78 if (x > c.L0) {
79 result.error_code = 2;
80 return result;
81 }
82
83 q = (1.0 / n) - 1.0; /* a useful power */
84 hxx = - 2.0 * c.H0 / (c.L0 * c.L0); /* constant concavity of h(x) */
85 ux = - hxx / c.k; /* constant strain rate */
86
87 result.H = c.H0 * (1.0 - (x / c.L0) * (x / c.L0)); /* eqn (23) in Bodvardsson */
88
89 result.h_x = hxx * x;
90
91 result.u = - (result.h_x) / c.k; /* eqn (10) in Bodvardson, once SIA is dropped */
92
93 result.M = c.a * ((result.H) - c.H_ela); /* page 6 in Bodvardsson, just before eqn (23) */
94
95 result.B = c.T_xc / (2.0 * (result.H) * pow(fabs(ux),q) * ux); /* Bueler interpretation */
96
97 result.beta = c.k * rho * g * (result.H);
98
99 return result;
100}
101
102
#define g
Definition exactTestM.c:34
#define rhow
Definition exactTestM.c:36
#define n
Definition exactTestM.c:37
#define rho
Definition exactTestM.c:35
#define secpera
Definition exactTestN.c:24
struct TestNParameters exactN(double x)
Definition exactTestN.c:57
struct TestNConstants exactNConstants(void)
Definition exactTestN.c:30
struct TestNConstants exactNConstants(void)
Definition exactTestN.c:30