Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terrain simulation diverging #1475

Closed
indra098124 opened this issue Mar 4, 2024 · 4 comments
Closed

terrain simulation diverging #1475

indra098124 opened this issue Mar 4, 2024 · 4 comments

Comments

@indra098124
Copy link

indra098124 commented Mar 4, 2024

Hi,
I am trying a simulation with terrain that keeps crashing with the error "Assertion `cell_data(i,j,k,RhoTheta_comp) > 0". This is with inflow-outflow. With periodic boundary conditions it runs fine. What strategies do you recommend to debug such cases?

Thank you!

Copy link
Collaborator

Can you share in which directory you built the code and what inputs file you used?  Thx!  I’ll try to take a look

@indra098124
Copy link
Author

indra098124 commented Mar 4, 2024

Many thanks @asalmgren for the quick response. This is the simulation I have setup on my own following Terrain3DHemisphere. It uses custom terrain. Here is the example input file I am using.

`

------------------ INPUTS TO MAIN PROGRAM -------------------

max_step = 1000
#amr.restart = "chk00300"
amrex.fpe_trap_invalid = 0

fabarray.mfiter_tile_size = 1024 1024 1024

PROBLEM SIZE & GEOMETRY

geometry.prob_lo = 0. 0. 0.
geometry.prob_hi = 5888. 4096. 512.
amr.n_cell = 368 256 128

erf.use_terrain = 1
#erf.terrain_smoothing = 2
#erf.grid_stretching_ratio = 1.02
#erf.initial_dz = 1.0

geometry.is_periodic = 0 0 0

MOST BOUNDARY (DEFAULT IS ADIABATIC FOR THETA)

xlo.type = "Inflow"
xhi.type = "Outflow"
ylo.type = "SlipWall"
yhi.type = "SlipWall"
xlo.velocity = 1.0 0.08 0.
xlo.density = 1.22
xlo.theta = 300.
xlo.scalar = 1.
zlo.type = "Most"
erf.most.average_policy = 0 # POLICY FOR AVERAGING
erf.most.use_normal_vector = false # USE NORMAL VECTOR W/ TERRAIN
erf.most.use_interpolation = true # USE INTERPOLATION ON DESTINATION
#erf.most.time_average = true # USE TIME AVERAGING
#erf.most.radius = 1 # SPECIFIED REGION RADIUS
#-----------------------------------------------------------------

#zlo.type = "NoSlipWall"
erf.most.z0 = 0.1 # from Cuxart et al. 2006
erf.most.zref = 2.0 # == dz/2
erf.most.surf_temp = 300.0 # initial value, should match input_sounding

zhi.type = "SlipWall"

TIME STEP CONTROL

#erf.fixed_dt = 0.1 # fixed time step depending on grid resolution
erf.cfl = 0.3

DIAGNOSTICS & VERBOSITY

erf.sum_interval = 1 # timesteps between computing mass
erf.v = 1 # verbosity in ERF.cpp
amr.v = 1 # verbosity in Amr.cpp

REFINEMENT / REGRIDDING

amr.max_level = 0 # maximum level number allowed

CHECKPOINT FILES

erf.check_file = chk # root name of checkpoint file
erf.check_int = 100 # number of timesteps between checkpoints

PLOTFILES

erf.plot_file_1 = plt # prefix of plotfile name
erf.plot_int_1 = 100 # number of timesteps between plotfiles
erf.plot_vars_1 = density rhoadv_0 x_velocity y_velocity z_velocity pressure temp theta z_phys

SOLVER CHOICE

erf.alpha_T = 0.0
erf.alpha_C = 1.0
erf.use_gravity = true

#erf.theta_ref = 300
erf.dycore_vert_adv_type = "Upwind_3rd"

erf.moisture_model = "Kessler"

erf.molec_diff_type = "None"
erf.les_type = "Smagorinsky"
erf.Cs = 0.1

#erf.init_type = "uniform"

INITIALIZATION (Cuxart et al. 2006)

erf.init_type = "input_sounding"
erf.init_sounding_ideal = 1
erf.input_sounding_file = "sounding_file"

PROBLEM PARAMETERS

prob.rho_0 = 1.0
prob.A_0 = 1.0

prob.U_0 = 0.0
prob.V_0 = 0.0
prob.W_0 = 0.0
prob.T_0 = 300.0

Higher values of perturbations lead to instability

Instability seems to be coming from BC

prob.U_0_Pert_Mag = 0.8
prob.V_0_Pert_Mag = 0.01 #
prob.W_0_Pert_Mag = 0.08
prob.T_0_Pert_Mag = 0.1
#pert_ref_height = 30.0

erf.input_bndry_planes = 0
erf.bndry_file = "BndryFiles"
erf.bndry_input_var_names = temperature density velocity
`

@asalmgren
Copy link
Collaborator

asalmgren commented Mar 4, 2024 via email

@asalmgren
Copy link
Collaborator

I believe this problem has been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants