Skip to content

Commit

Permalink
Merge branch 'development' into optimal_subcycling_prep
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpkatz committed Jul 4, 2023
2 parents 0bc0e26 + 939f998 commit 62f11dc
Show file tree
Hide file tree
Showing 15 changed files with 105 additions and 99 deletions.
3 changes: 1 addition & 2 deletions Docs/source/FlowChart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ The time-integration method used is controlled by
order integration implemented. At the moment, this does not support
multilevel domains. Note: because of differences in the interfaces with the
default Strang method, you must compile with ``USE_TRUE_SDC = TRUE`` for this
method to work (in particular, this defines ``EXTRA_THERMO`` which enables some
additional EOS derivatives).
method to work.

* ``time_integration_method = 3``: this is the simplified SDC method
described above that uses the CTU hydro advection and an ODE
Expand Down
12 changes: 0 additions & 12 deletions Exec/Make.Castro
Original file line number Diff line number Diff line change
Expand Up @@ -186,18 +186,6 @@ endif
ifeq ($(USE_REACT), TRUE)
Bdirs += Source/reactions
DEFINES += -DREACTIONS

ifeq ($(USE_TRUE_SDC), TRUE)
# we need the compositional derivatives for SDC
DEFINES += -DEXTRA_THERMO
endif

ifeq ($(USE_SIMPLIFIED_SDC), TRUE)
# we need the compositional derivatives for SDC
DEFINES += -DEXTRA_THERMO
# we only implement this for C++ reactions
endif

endif

ifeq ($(USE_REACT_SPARSE_JACOBIAN), TRUE)
Expand Down
38 changes: 28 additions & 10 deletions Exec/science/flame_wave/analysis/vis_3d/vol-xrb-abar.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
#!/usr/bin/env python

import matplotlib
matplotlib.use('agg')

import sys

import matplotlib
import numpy as np

import yt
from yt.frontends.boxlib.api import CastroDataset
import numpy as np
#from yt.visualization.volume_rendering.render_source import VolumeSource
from yt.visualization.volume_rendering.api import create_volume_source, Scene
from yt.units import cm
#from yt.visualization.volume_rendering.render_source import VolumeSource
from yt.visualization.volume_rendering.api import Scene, create_volume_source

matplotlib.use('agg')

resolution = (1920, 1080)

# this is for the wdconvect problem

Expand Down Expand Up @@ -56,7 +59,7 @@ def doit(plotfile):
sc.get_source(0).transfer_function = tf

cam = sc.add_camera(ds, lens_type="perspective")
cam.resolution = (1920, 1280)
cam.resolution = resolution

# view 1

Expand All @@ -77,14 +80,24 @@ def doit(plotfile):
cam.zoom(3.0)
sc.camera = cam

sc.save_annotated("{}_abar_annotated_side.png".format(plotfile),
sigma_clip=3.0,
sc.save(f"{plotfile}_abar_noaxes_side.png", sigma_clip=3.0)

sc.annotate_axes(alpha=0.005, thickness=6)

sc.save(f"{plotfile}_abar_side.png", sigma_clip=3.0)

sc.save_annotated(f"{plotfile}_abar_annotated_side.png",
sigma_clip=3.0, label_fmt="%.2f",
text_annotate=[[(0.05, 0.05),
f"t = {ds.current_time.d:7.5f} s",
dict(horizontalalignment="left")]])

# view 2

# remove the annotation source for now
print(list(sc.sources.keys()))
sc.sources.pop("source_01")

dx = ds.domain_right_edge[0] - ds.domain_left_edge[0]
cam.position = [0.5*(ds.domain_left_edge[0] + ds.domain_right_edge[0]) + 0.0001 * dx,
0.5*(ds.domain_left_edge[1] + ds.domain_right_edge[1]),
Expand All @@ -103,8 +116,13 @@ def doit(plotfile):
cam.zoom(0.6)
sc.camera = cam

sc.save(f"{plotfile}_abar_noaxes_top.png", sigma_clip=3.0)

sc.annotate_axes(alpha=0.005, thickness=6)

sc.save(f"{plotfile}_abar_top.png", sigma_clip=3.0)
sc.save_annotated("{}_abar_annotated_top.png".format(plotfile),
sigma_clip=3.0,
sigma_clip=3.0, label_fmt="%.2f",
text_annotate=[[(0.05, 0.05),
f"t = {ds.current_time.d:7.5f} s",
dict(horizontalalignment="left")]])
Expand Down
2 changes: 1 addition & 1 deletion Exec/science/subchandra/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ USE_SIMPLIFIED_SDC=TRUE
EOS_DIR := helmholtz

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

INTEGRATOR_DIR := VODE

Expand Down
6 changes: 3 additions & 3 deletions Exec/science/subchandra/inputs_2d.N14.coarse
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ castro.sponge_timescale = 1.e-3
castro.cfl = 0.2 # cfl number for hyperbolic system
castro.init_shrink = 0.05 # scale back initial timestep by this factor
castro.change_max = 1.025 # factor by which dt is allowed to change each timestep
castro.sum_interval = 0 # timesteps between computing and printing volume averages
castro.sum_interval = 5 # timesteps between computing and printing volume averages
castro.update_sources_after_reflux = 0
castro.time_integration_method = 3

Expand Down Expand Up @@ -147,12 +147,12 @@ integrator.rtol_spec = 1.e-5
integrator.atol_spec = 1.e-5
integrator.rtol_enuc = 1.e-5
integrator.atol_enuc = 1.e-5
integrator.jacobian = 2
integrator.jacobian = 1

integrator.X_reject_buffer = 4.0

# disable jacobian caching in VODE
integrator.use_jacobian_caching = 0

integrator.ode_max_steps = 500000
integrator.ode_max_steps = 1000000

Loading

0 comments on commit 62f11dc

Please sign in to comment.