Skip to content

Commit

Permalink
use tangent hyperbolic stretching
Browse files Browse the repository at this point in the history
  • Loading branch information
szy21 committed Sep 11, 2024
1 parent a22b643 commit 00bd37b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
dt_save_state_to_disk: "100days"
initial_condition: "IsothermalProfile"
hyperdiff: false
z_elem: 70
z_elem: 63
dt: "3hours"
idealized_h2o: true
t_end: "654days"
dz_top: 10000.0
idealized_clouds: true
dz_bottom: 100.0
dz_bottom: 30.0
config: "column"
insolation: "timevarying"
z_max: 70000.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
dt_save_state_to_disk: "100days"
initial_condition: "IsothermalProfile"
hyperdiff: false
z_elem: 70
z_elem: 63
dt: "3hours"
idealized_h2o: true
t_end: "654days"
dz_top: 10000.0
dz_bottom: 100.0
dz_bottom: 30.0
config: "column"
z_max: 70000.0
dt_save_to_sol: "30hours"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ hyperdiff: false
config: "column"
initial_condition: "IsothermalProfile"
z_max: 70000
z_elem: 70
dz_bottom: 100
z_elem: 63
dz_bottom: 30
dz_top: 10000
t_end: "654days"
dt: "3hours"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
dt_save_state_to_disk: "100days"
initial_condition: "IsothermalProfile"
hyperdiff: false
z_elem: 70
# It seems radiative equilibrium needs a larger dz near the top
# to be stable, so we use a smaller z_elem
z_elem: 50
dt: "3hours"
t_end: "654days"
dz_top: 10000.0
dz_bottom: 100.0
dz_bottom: 30.0
config: "column"
z_max: 70000.0
dt_save_to_sol: "30hours"
Expand Down
8 changes: 4 additions & 4 deletions src/solver/type_getters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function get_spaces(parsed_args, params, comms_ctx)
h_space =
make_horizontal_space(horizontal_mesh, quad, comms_ctx, bubble)
z_stretch = if parsed_args["z_stretch"]
Meshes.GeneralizedExponentialStretching(dz_bottom, dz_top)
Meshes.HyperbolicTangentStretching(dz_bottom)
else
Meshes.Uniform()
end
Expand Down Expand Up @@ -219,7 +219,7 @@ function get_spaces(parsed_args, params, comms_ctx)
h_space =
make_horizontal_space(horizontal_mesh, quad, comms_ctx, bubble)
z_stretch = if parsed_args["z_stretch"]
Meshes.GeneralizedExponentialStretching(dz_bottom, dz_top)
Meshes.HyperbolicTangentStretching(dz_bottom)
else
Meshes.Uniform()
end
Expand All @@ -241,7 +241,7 @@ function get_spaces(parsed_args, params, comms_ctx)
h_space =
make_horizontal_space(horizontal_mesh, quad, comms_ctx, bubble)
z_stretch = if parsed_args["z_stretch"]
Meshes.GeneralizedExponentialStretching(dz_bottom, dz_top)
Meshes.HyperbolicTangentStretching(dz_bottom)
else
Meshes.Uniform()
end
Expand All @@ -265,7 +265,7 @@ function get_spaces(parsed_args, params, comms_ctx)
h_space =
make_horizontal_space(horizontal_mesh, quad, comms_ctx, bubble)
z_stretch = if parsed_args["z_stretch"]
Meshes.GeneralizedExponentialStretching(dz_bottom, dz_top)
Meshes.HyperbolicTangentStretching(dz_bottom)
else
Meshes.Uniform()
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ warp_function = CA.generate_topography_warp(earth_spline)
# Create meshes and spaces
h_elem = 16
nh_poly = 3
z_max = 45e3
z_max = 42e3
z_elem = 33
dz_bottom = 300.0
dz_top = 5000.0
Expand All @@ -109,7 +109,7 @@ horizontal_mesh = CA.cubed_sphere_mesh(; radius, h_elem)
h_space = CA.make_horizontal_space(horizontal_mesh, quad, comms_ctx, false)


z_stretch = Meshes.GeneralizedExponentialStretching(dz_bottom, dz_top)
z_stretch = Meshes.HyperbolicTangentStretching(dz_bottom)
center_space, face_space = CA.make_hybrid_spaces(
h_space,
z_max,
Expand Down

0 comments on commit 00bd37b

Please sign in to comment.