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

xrb spherical problem setup #2972

Merged
merged 32 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3ff0599
initial xrb spherical problem setup
zhichen3 Oct 7, 2024
a18761d
update inputfile
zhichen3 Oct 7, 2024
a7ce238
update
zhichen3 Oct 7, 2024
6842f31
update gnumake
zhichen3 Oct 7, 2024
457688c
update
zhichen3 Oct 7, 2024
4169303
chnage input file
zhichen3 Oct 8, 2024
4eb1821
Merge branch 'development' into 2d_spherical_test
zhichen3 Oct 8, 2024
d672904
update input file
zhichen3 Oct 9, 2024
7f21766
add a slice plot script
zhichen3 Oct 10, 2024
934042e
use pslope
zhichen3 Oct 11, 2024
7dca9c5
fix
zhichen3 Oct 11, 2024
0a1cfb0
update script
zhichen3 Oct 12, 2024
3577b58
Merge branch 'development' into 2d_spherical_test
zingale Oct 14, 2024
d68885a
update script
zhichen3 Oct 14, 2024
c99bde8
update
zhichen3 Oct 15, 2024
eecbdf5
fix spelling
zhichen3 Oct 15, 2024
3c63920
update colorbar limit
zhichen3 Oct 15, 2024
15ed991
add README
zhichen3 Oct 16, 2024
321fd68
update script
zhichen3 Oct 16, 2024
a34e135
Merge branch 'development' into 2d_spherical_test
zhichen3 Oct 23, 2024
4f48b03
Merge branch 'development' into 2d_spherical_test
zingale Oct 24, 2024
8eb00d6
update input
zhichen3 Oct 24, 2024
4337b0d
fix boundary condition in input
zhichen3 Oct 24, 2024
e155b99
add 1 r-profile plot at given theta
zhichen3 Oct 24, 2024
4ddef2c
update script
zhichen3 Oct 24, 2024
7d48637
Merge branch 'development' into 2d_spherical_test
zhichen3 Oct 27, 2024
1d5ff06
update script
zhichen3 Oct 29, 2024
5a13fc5
add comment about making sliceplots
zhichen3 Oct 29, 2024
4f53b47
update script
zhichen3 Oct 30, 2024
96a07fa
update makefile
zhichen3 Nov 13, 2024
c1723e1
Merge branch '2d_spherical_test' of github.com:zhichen3/Castro into 2…
zhichen3 Nov 13, 2024
818c166
Merge branch 'development' into 2d_spherical_test
zhichen3 Nov 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions Exec/science/xrb_spherical/GNUmakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
PRECISION = DOUBLE
PROFILE = FALSE

DEBUG = FALSE

DIM = 2

COMP = gnu

USE_MPI = TRUE

USE_GRAV = TRUE
USE_REACT = TRUE

USE_ROTATION = TRUE
USE_DIFFUSION = TRUE

# define the location of the CASTRO top directory
CASTRO_HOME ?= ../../..

USE_JACOBIAN_CACHING = TRUE
USE_MODEL_PARSER = TRUE
NUM_MODELS := 2

# This sets the EOS directory in $(MICROPHYSICS_HOME)/eos
EOS_DIR := helmholtz

# This sets the network directory in $(MICROPHYSICS_HOME)/networks
NETWORK_DIR := aprox13

INTEGRATOR_DIR := VODE

CONDUCTIVITY_DIR := stellar

PROBLEM_DIR ?= ./

Bpack := $(PROBLEM_DIR)/Make.package
Blocs := $(PROBLEM_DIR)

include $(CASTRO_HOME)/Exec/Make.Castro
2 changes: 2 additions & 0 deletions Exec/science/xrb_spherical/Make.package
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CEXE_headers += initial_model.H

68 changes: 68 additions & 0 deletions Exec/science/xrb_spherical/_prob_params
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@

dtemp real 3.81e8_rt y

theta_half_max real 1.745e-2_rt y

theta_half_width real 4.9e-3_rt y

# cutoff mass fraction of the first species for refinement
X_min real 1.e-4_rt y

# do we dynamically refine based on density? or based on height?
tag_by_density integer 1 y

# used for tagging if tag_by_density = 1
cutoff_density real 500.e0_rt y

# used if we are refining based on height rather than density
refine_height real 3600 y

T_hi real 5.e8_rt y

T_star real 1.e8_rt y

T_lo real 5.e7_rt y

dens_base real 2.e6_rt y

H_star real 500.e0_rt y

atm_delta real 25.e0_rt y

fuel1_name string "helium-4" y

fuel2_name string "" y

fuel3_name string "" y

fuel4_name string "" y

ash1_name string "iron-56" y

ash2_name string "" y

ash3_name string "" y

fuel1_frac real 1.0_rt y

fuel2_frac real 0.0_rt y

fuel3_frac real 0.0_rt y

fuel4_frac real 0.0_rt y

ash1_frac real 1.0_rt y

ash2_frac real 0.0_rt y

ash3_frac real 0.0_rt y

low_density_cutoff real 1.e-4_rt y

smallx real 1.e-10_rt y

r_refine_distance real 1.e30_rt y

max_hse_tagging_level integer 2 y

max_base_tagging_level integer 1 y
1 change: 1 addition & 0 deletions Exec/science/xrb_spherical/initial_model.H
151 changes: 151 additions & 0 deletions Exec/science/xrb_spherical/inputs.He.1000Hz
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# ------------------ INPUTS TO MAIN PROGRAM -------------------
max_step = 9900000
stop_time = 3.0

# PROBLEM SIZE & GEOMETRY
geometry.is_periodic = 0 0
geometry.coord_sys = 2 # 0 => cart, 1 => RZ 2=>spherical
geometry.prob_lo = 1.1e6 0
geometry.prob_hi = 1.13072e6 3.14159
amr.n_cell = 192 1152

# >>>>>>>>>>>>> BC FLAGS <<<<<<<<<<<<<<<<
# 0 = Interior 3 = Symmetry
# 1 = Inflow 4 = SlipWall
# 2 = Outflow 5 = NoSlipWall
# >>>>>>>>>>>>> BC FLAGS <<<<<<<<<<<<<<<<
castro.lo_bc = 1 3 # Inflow in lower R and Symmetry across Theta
castro.hi_bc = 2 2 # Outflow in upper boundaries

# Allow non-square zones
castro.allow_non_unit_aspect_zones = 1

# Hydrostatic condition along R-direction
castro.xl_ext_bc_type = 1
castro.hse_interp_temp = 0
castro.hse_fixed_temp = 1.e8 # this should match problem.T_star
castro.hse_reflect_vels = 1

# Fill ambient states with outflow velocity in R-direction
castro.fill_ambient_bc = 1
castro.ambient_fill_dir = 0
castro.ambient_outflow_vel = 1

# WHICH PHYSICS
castro.do_hydro = 1
castro.do_react = 1
castro.do_rotation = 1
castro.do_grav = 1
castro.do_sponge = 1

castro.small_temp = 1.e6
castro.small_dens = 1.e-5

castro.ppm_type = 1
castro.grav_source_type = 2

gravity.gravity_type = ConstantGrav

# 1.4 Solar Mass NS with radius ~11 km
gravity.const_grav = -1.5e14

# 1000Hz Spinning Frequency
# Might want to use a more realistic spinning frequency like 500Hz
castro.rotational_period = 0.001

# Centrifugal is not important since NS would simply deform to accomondate for it
castro.rotation_include_centrifugal = 0

castro.diffuse_temp = 1
castro.diffuse_cutoff_density_hi = 5.e4
castro.diffuse_cutoff_density = 2.e4

castro.diffuse_cond_scale_fac = 1.0

castro.react_rho_min = 1.e2
castro.react_rho_max = 1.5e7

castro.react_T_min = 6.e7

castro.sponge_upper_density = 1.e2
castro.sponge_lower_density = 1.e0
castro.sponge_timescale = 1.e-7

castro.abundance_failure_tolerance = 0.1
castro.abundance_failure_rho_cutoff = 1.0

# TIME STEP CONTROL
castro.cfl = 0.8 # cfl number for hyperbolic system
castro.init_shrink = 0.1 # scale back initial timestep
castro.change_max = 1.1 # max time step growth

castro.use_retry = 1
castro.max_subcycles = 16

castro.retry_small_density_cutoff = 1.0

# DIAGNOSTICS & VERBOSITY
castro.sum_interval = 0 # timesteps between computing mass
castro.v = 1 # verbosity in Castro.cpp
amr.v = 1 # verbosity in Amr.cpp

# REFINEMENT / REGRIDDING
amr.max_level = 2 # maximum level number allowed
amr.ref_ratio = 4 2 2 2 # refinement ratio
amr.regrid_int = 2 2 2 2 # how often to regrid
amr.blocking_factor = 16 # block factor in grid generation
amr.max_grid_size = 128
amr.n_error_buf = 2 2 2 2 # number of buffer cells in error est

# CHECKPOINT FILES
amr.check_file = flame_wave_1000Hz_chk # root name of checkpoint file
amr.check_int = 250 # number of timesteps between checkpoints

# PLOTFILES
amr.plot_file = flame_wave_1000Hz_plt # root name of plotfile
amr.plot_per = 5.e-3 # number of seconds between plotfiles
amr.derive_plot_vars = ALL

amr.small_plot_file = flame_wave_1000Hz_smallplt # root name of plotfile
amr.small_plot_per = 1.e-4 # number of seconds between plotfiles
amr.small_plot_vars = density Temp
amr.derive_small_plot_vars = abar x_velocity y_velocity z_velocity enuc

# problem initialization

problem.dtemp = 1.2e9
problem.theta_half_max = 1.745e-2
problem.theta_half_width = 4.9e-3

problem.dens_base = 3.43e6

problem.T_star = 1.e8
problem.T_hi = 2.e8
problem.T_lo = 8.e6

problem.H_star = 2000.e0
problem.atm_delta = 50.0

problem.fuel1_name = "helium-4"
problem.fuel1_frac = 1.0e0

problem.ash1_name = "nickel-56"
problem.ash1_frac = 1.0e0

problem.low_density_cutoff = 1.e-4

problem.cutoff_density = 2.5e4
problem.max_hse_tagging_level = 3
problem.max_base_tagging_level = 2

problem.X_min = 1.e-2

problem.r_refine_distance = 9.216e4


# Microphysics

integrator.rtol_spec = 1.e-6
integrator.atol_spec = 1.e-6

network.use_tables = 1
Loading
Loading