texactTestN.h - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch)
 (HTM) git clone git://src.adamsgaard.dk/pism
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
       texactTestN.h (3685B)
       ---
            1 /*
            2    Copyright (C) 2010, 2014, 2016 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 #ifndef __exactTestN_h
           22 #define __exactTestN_h 1
           23 
           24 #ifdef __cplusplus
           25 extern "C"
           26 {
           27 #endif
           28 
           29 /*
           30 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
           31 ! exactTestN is a C implementation of the parabolic solution in 
           32 ! Bodvardsson (1955), treated here as a manufactured exact solution to
           33 ! a steady-state SSA flow problem, including the mass continuity equation.
           34 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
           35 */
           36 
           37 struct TestNConstants {
           38   double H0;    /* = dome thickness (m) */
           39   double L0;    /* = full flow-line length from dome to margin where H->0 (m) */
           40   double xc;    /* = in Bueler interpretation, the location of the calving front (m) */
           41   double a;     /* = surface mass balance lapse rate, with elevation (s-1) */
           42   double H_ela; /* = elevation of equilibrium line (m) */
           43   double k;     /* = coefficient for sliding */
           44   double H_xc;  /* = thickness at calving front */
           45   double T_xc;  /* = vertically-integrated longitudinal stress at calving front */
           46 };
           47 
           48 struct TestNConstants exactNConstants();
           49 
           50 struct TestNParameters {
           51   int error_code;
           52   double H;               /* (m; ice thickness) */
           53   double h_x;             /* (; surface slope) */
           54   double u;               /* (m s-1; ice horizontal velocity) */
           55   double M;               /* (m s-1; surface mass balance) */
           56   double B;               /* (Pa s^(1/3); ice hardness) */
           57   double beta;            /* (Pa s m-1; linear sliding coefficient) */
           58 };
           59 
           60 struct TestNParameters exactN(double x);
           61    /* input    : x                   (m; 0.0 <= x <= L0)
           62 
           63       Assumes n = 3.
           64       
           65       In Bueler interpretation, M(x) and A(x) are constructed so that the
           66       solution in Bodvardsson (1955) can be thought of as solving mass continuity
           67       and SSA stress balance simultaneously:
           68 
           69          M(x) - (u H)_x = 0
           70 
           71          (2 H B(x) |u_x|^((1/n)-1) u_x)_x - beta(x) u = rho g H h_x
           72          
           73       Here H = H(x) is ice thickness and u = u(x) is ice velocity.  Also
           74       h(x) = H(x), up to a constant the user may choose, because the bed is flat.
           75       Following Bodvardsson, here is the equilibrium line altitude, surface
           76       mass balance, and the sliding coefficient:
           77          
           78          Hela = H0 / 1.5
           79          M(x) = a (h(x) - Hela)
           80          beta(x) = k rho g H(x)
           81       
           82       The boundary conditions are
           83       
           84          H(0) = H0
           85 
           86       and
           87       
           88          T(xc) = 0.5 (1 - rho/rhow) rho g H(xc)^2
           89 
           90       where T(x) is the vertically-integrated viscous stress,
           91       
           92          T(x) = 2 H(x) B(x) |u_x|^((1/n)-1) u_x.
           93 
           94       But B(x) is chosen so that this quantity is constant:  T(x) = T0.
           95 
           96       The boundary condition at x = xc implies that the calving front is
           97       exactly at the location where the ice sheet reaches flotation.
           98 
           99       return value =
          100          0 if successful
          101          1 if x < 0
          102          2 if x > L0
          103       
          104    */
          105 
          106 #ifdef __cplusplus
          107 }
          108 #endif
          109 
          110 #endif  /* __exactTestN_h */
          111