Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ElmerCSC
GitHub Repository: ElmerCSC/elmerfem
Path: blob/devel/elmerice/Tests/Emergence/buelerprofile.f90
3206 views
1
!/*****************************************************************************/
2
! *
3
! * Elmer/Ice, a glaciological add-on to Elmer
4
! * http://elmerice.elmerfem.org
5
! *
6
! *
7
! * This program is free software; you can redistribute it and/or
8
! * modify it under the terms of the GNU General Public License
9
! * as published by the Free Software Foundation; either version 2
10
! * of the License, or (at your option) any later version.
11
! *
12
! * This program is distributed in the hope that it will be useful,
13
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
! * GNU General Public License for more details.
16
! *
17
! * You should have received a copy of the GNU General Public License
18
! * along with this program (in file fem/GPL-2); if not, write to the
19
! * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20
! * Boston, MA 02110-1301, USA.
21
! *
22
! *****************************************************************************/
23
! ******************************************************************************
24
FUNCTION Bueler ( Model, nodenumber, coord) RESULT(elevation)
25
USE Types
26
USE DefUtils
27
IMPLICIT NONE
28
TYPE(Model_t) :: Model
29
INTEGER :: nodenumber
30
REAL(KIND=dp) :: coord(3), elevation
31
32
REAL(KIND=dp), PARAMETER :: L = 361.25d03, H0 = 2.06d03, n = 3.0_dp, minh=100.0_dp
33
REAL(KIND=dp) :: T1, T2, H, R
34
35
R = SQRT(coord(1)*coord(1) + coord(2)*coord(2))
36
T1 = ( H0/((n - 1.0_dp)**(n/(2.0_dp*n + 2.0_dp))) )
37
T2 = (n + 1.0_dp)*(R/L) - n*((R/L)**((n + 1.0_dp)/n)) + &
38
n*((1.0_dp - (R/L))**((n + 1.0_dp)/n) ) - 1.0
39
H = T1 * ( T2**(n/(2.0*n + 2.0)) )
40
elevation = MAX(H,minh)
41
END FUNCTION Bueler
42
43