Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhichen3 committed Oct 15, 2024
1 parent d68885a commit c99bde8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Exec/science/xrb_spherical/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COMP = gnu
USE_MPI = TRUE

USE_GRAV = TRUE
USE_REACT = FALSE
USE_REACT = TRUE

USE_ROTATION = FALSE
USE_DIFFUSION = FALSE
Expand All @@ -26,7 +26,7 @@ NUM_MODELS := 2
EOS_DIR := helmholtz

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

INTEGRATOR_DIR := VODE

Expand Down
19 changes: 12 additions & 7 deletions Exec/science/xrb_spherical/analysis/slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
middle, and bottom of the domain (shell).
"""

def slice(fname:str, field:str, loc:str="top") -> None:
def slice(fname:str, field:str,
loc: str = "top", width_factor: float = 3.0) -> None:
"""
A slice plot of the dataset for Spherical2D geometry.
Expand All @@ -39,7 +40,8 @@ def slice(fname:str, field:str, loc:str="top") -> None:
theta_center = 0.5 * (thetar + thetal)

# Domain width of the slice plot
width = (3.0*dr, 3.0*dr)
width = width_factor * dr
box_widths = (width, width)

loc = loc.lower()
loc_options = ["top", "mid", "bot"]
Expand All @@ -48,11 +50,11 @@ def slice(fname:str, field:str, loc:str="top") -> None:
raise Exception("loc parameter must be top, mid or bot")

# Centers for the Top, Mid and Bot panels
centers = {"top":(r_center*np.sin(thetal)+1.48*dr, r_center*np.cos(thetal)),
centers = {"top":(r_center*np.sin(thetal)+0.5*width, r_center*np.cos(thetal)),
"mid":(r_center*np.sin(theta_center), r_center*np.cos(theta_center)),
"bot":(r_center*np.sin(thetar)+1.48*dr, r_center*np.cos(thetar))}
"bot":(r_center*np.sin(thetar)+0.5*width, r_center*np.cos(thetar))}

sp = yt.SlicePlot(ds, 'phi', field, width=width)
sp = yt.SlicePlot(ds, 'phi', field, width=box_widths)

sp.set_center(centers[loc])

Expand All @@ -71,8 +73,11 @@ def slice(fname:str, field:str, loc:str="top") -> None:
fname = sys.argv[1]
field = sys.argv[2]
loc = "top"
width_factor = 3.0

if len(sys.argv) > 3:
if len(sys.argv) == 4:
loc = sys.argv[3]
elif len(sys.argv) > 4:
width_factor = float(sys.argv[4])

slice(fname, field, loc=loc)
slice(fname, field, loc=loc, width_factor=width_factor)
2 changes: 1 addition & 1 deletion Exec/science/xrb_spherical/inputs.He.1000Hz
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ amr.derive_small_plot_vars = abar x_velocity y_velocity z_velocity enuc

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

problem.dens_base = 3.43e6

Expand Down

0 comments on commit c99bde8

Please sign in to comment.