Path: blob/devel/elmerice/Tests/Calving3D_lset_parMMG/PROG/bedrockfunction_3D.F90
3206 views
FUNCTION initbedrock(Model, nodenumber, inputarray) RESULT(elevation)1USE ElementDescription2USE DefUtils34IMPLICIT NONE5TYPE(Model_t) :: Model6INTEGER :: nodenumber7REAL (KIND=dp) :: inputarray(*),x,y,elevation,elevation_x,&8elevation_y,z0, slope, centrality, trunk_hwidth, &9obs_length,obs_height,elevation_obstacle, bump_height, &10bump_radius, bump_1_dist, bump_1_elev, bump_2_dist, bump_2_elev1112x = inputarray(1)13y = inputarray(2)1415!Y varies from 5000.0 at input to 0 at calving front16!X varies from 0 at right margin to 5000.0 at left1718!longitudinal component of bed function19slope = 1.0_dp/40.020z0 = -550.0_dp21elevation_y = z0 + slope*y2223trunk_hwidth = (3000.0 + 2000.0 * (y/5000.0)) * 0.52425centrality = ABS(x - 2500.0) / trunk_hwidth !1 at margins, 0 at centerline26elevation_x = centrality**2.0 * 200.0 !vary depth from -550.0 at centerline to -350.0 at edge2728obs_length = 1000.0_dp29obs_height = 100.0_dp30elevation_obstacle = obs_height * EXP(-(y/obs_length)**2.0)3132bump_height = 100.0_dp33bump_radius = 500.0_dp3435bump_1_dist = ((x - 1800.0)**2.0 + (y - 0.0)**2.0)**0.536bump_1_elev = bump_height * EXP(-(bump_1_dist / bump_radius)**2.0)3738bump_2_dist = ((x - 3000.0)**2.0 + (y - 0.0)**2.0)**0.539bump_2_elev = bump_height * EXP(-(bump_2_dist / bump_radius)**2.0)4041elevation = elevation_y + elevation_x + elevation_obstacle + bump_1_elev + bump_2_elev4243END FUNCTION initbedrock4445FUNCTION initsurface(Model, nodenumber, inputarray) RESULT(elevation)46USE ElementDescription47USE DefUtils4849IMPLICIT NONE5051TYPE(Model_t) :: Model52INTEGER :: nodenumber53REAL (KIND=dp) :: inputarray(*),x,y, elevation, elevation_y, slope, z05455x = inputarray(1)56y = inputarray(2)5758!Y varies from 5000.0 at input to 0 at calving front59!X varies from 0 at right margin to 5000.0 at left6061!longitudinal component of bed function62slope = 1.0_dp/40.063z0 = 50.0_dp64elevation_y = z0 + slope*y65elevation = elevation_y66END FUNCTION initsurface676869