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

WIP: implement relativistic standing accretion shock test problem #173

Open
wants to merge 57 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
3a0d48a
start pin based off of bondi
May 15, 2023
f7b9b66
update input parameters
May 17, 2023
e493218
template pgen from bondi
May 17, 2023
19fa522
convert to code units, update defaults
May 17, 2023
2b951fc
propagate PROBLEM
May 17, 2023
436d66c
edit
May 17, 2023
d1da9c5
formatting ig!!
May 17, 2023
b3a68ff
more edits
May 22, 2023
721ba2d
update pin defaults
May 24, 2023
dcf9cd7
add function to get T from rho target mach
May 24, 2023
8c2055a
pass Ye correctly
May 25, 2023
efe17cc
change order of call function
May 25, 2023
12e3244
compute initial radial velocity assuming it has some r dependence tha…
May 25, 2023
4c25e5f
try with the function in the actual pgen file
May 25, 2023
a8bef38
extra bracket, make r dependence for lapse too
May 25, 2023
c1bb862
format
May 25, 2023
a3a4aef
forgot prototypes
May 25, 2023
c5d44d2
acutally pull in the eos lol, and pi = M_PI, TIL
May 25, 2023
53c11c9
pull in root find
May 25, 2023
70df9c4
correctly convert pin params
May 25, 2023
db4c808
remove const, use original conversions
May 25, 2023
d2e3aa3
something still wrong with the call to singularity-eos idk
May 25, 2023
5352f0a
try explicit res function instead, idk how to get lambda to work
May 30, 2023
4ef1654
try EOS generated Tmin,Tmax for bracket
May 30, 2023
34e9c76
psi not being computed correctly. try this
May 31, 2023
55ccd69
correct pre/postshock assumptions, remove extra vars
Jun 2, 2023
6d1bcf9
device not host
Jun 2, 2023
1e1b3be
dont need transformation (i think), try to properly fill vel arrays
Jun 2, 2023
ba01a02
move mach stuff into sasw pgen, add missing decorator, keep prints fo…
Jun 8, 2023
b60b96d
cleanup, remove prints, this runs and completes setup then fails to b…
Jun 8, 2023
626de31
testing
Jun 14, 2023
e47dd17
fix rs conversion, try solving T for a target mach to close postshock…
Jun 14, 2023
b9a0d26
actually try this
Jun 14, 2023
a5956e2
try this, low temp cell somewhere causes failure in root find
Jun 16, 2023
c04b29c
debugging
Jun 20, 2023
8b1d6c2
assumes ideal gas for vel
Jun 21, 2023
9f021a3
doesnt work
Jun 22, 2023
30dfc1a
ideal gas, not working
Jun 27, 2023
f7997a1
fix postshock density
Jun 27, 2023
1289346
actually fix it
Jun 27, 2023
5161343
switch to FMKS, BL doesnt work?
Jun 27, 2023
2adc425
set min eps and T
Jun 28, 2023
8ec33b5
i,i,i
Jun 28, 2023
d2172ae
formattttttttttttttttttt
Jun 29, 2023
3906a33
debugging
Jul 5, 2023
6412ce1
reads in ics for sasw
Jul 18, 2023
0553e9a
fix line count, format, cleanup
Jul 19, 2023
4a41d06
format, fix velocity
Jul 20, 2023
c79cc18
Merge branch 'main' into standing_accretion_shock
Jul 20, 2023
b26325c
cartesian coordinate transformation added in cooling_function for lig…
mari2895 Oct 6, 2023
35a9ca1
Merge branch 'main' into standing_accretion_shock
Oct 20, 2023
a25c0ea
Merge branch 'main' into mg/homologouscollapse
mari2895 Oct 30, 2023
879b405
Merge remote-tracking branch 'origin/main' into standing_accretion_shock
Nov 7, 2023
e08387b
try to turn on lightbulb for SASW using radice ICs
Nov 7, 2023
c6bf9b1
Merge branch 'main' into mg/homologouscollapse
mari2895 Nov 8, 2023
0c229cb
Merge branch 'mg/homologouscollapse' into standing_accretion_shock
mari2895 Nov 8, 2023
2d825c7
formatting applied
mari2895 Nov 8, 2023
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
145 changes: 145 additions & 0 deletions inputs/standing_accretion_shock.pin
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# © 2021. Triad National Security, LLC. All rights reserved. This
# program was produced under U.S. Government contract 89233218CNA000001
# for Los Alamos National Laboratory (LANL), which is operated by Triad
# National Security, LLC for the U.S. Department of Energy/National
# Nuclear Security Administration. All rights in the program are
# reserved by Triad National Security, LLC, and the U.S. Department of
# Energy/National Nuclear Security Administration. The Government is
# granted for itself and others acting on its behalf a nonexclusive,
# paid-up, irrevocable worldwide license in this material to reproduce,
# prepare derivative works, distribute copies to the public, perform
# publicly and display publicly, and to permit others to do so.

<phoebus>
problem = standing_accretion_shock
ix1_bc = reflect
ox1_bc = outflow
ix2_bc = reflect
ox2_bc = reflect

<parthenon/job>
problem_id = standing_accretion_shock # problem ID: basename of output filenames

<parthenon/output1>
variables = p.density, &
c.density, &
p.velocity, &
c.momentum, &
p.energy, &
c.energy, &
pressure, &
cs, &
temperature,&
p.ye, &
g.c.coord, &
g.n.coord, &
flux_divergence, &
src_terms


file_type = hdf5 # Tabular data dump
dt = 100 # time increment between outputs

<parthenon/time>
nlim = -1 # cycle limit
tlim = 10000 # time limit
integrator = rk2 # time integration algorithm
ncycle_out = 100 # interval for stdout summary info
dt_init_fact = 1.e-8

<parthenon/mesh>
nghost = 4
#refinement = adaptive
#numlevel = 3

nx1 = 512 # Number of zones in X1-direction
x1min = 30 # minimum value of X1 | rPNS | x1min = ln R (code units), R = 60 (km) => R = 31.2492 (code units) => x1min = 3.44199
x1max = 230 # maximum value of X1 | rmax | x1max => 472.5 (km)
ix1_bc = user # Inner-X1 boundary condition flag
ox1_bc = user # Outer-X1 boundary condition flag

nx2 = 1 # Number of zones in X2-direction
x2min = 0 # minimum value of X2
x2max = 3.14159265359 #3.14159265359 #1 # maximum value of X2. Pi for BL
ix2_bc = user # Inner-X2 boundary condition flag
ox2_bc = user # Outer-X2 boundary condition flag

nx3 = 1 # Number of zones in X3-direction
x3min = 0 # minimum value of X3
x3max = 6.28318530718 # maximum value of X3. 2*pi
ix3_bc = periodic # Inner-X3 boundary condition flag
ox3_bc = periodic # Outer-X3 boundary condition flfgag

num_threads = 1 # maximum number of OMP threads

#<parthenon/meshblock>
#nx1 = 512
#nx2 = 1
#nx3 = 1

<parthenon/refinement0>
field = c.c.bulk.rho
method = derivative_order_1
max_level = 1

#<eos>
#type = IdealGas
#Gamma = 1.33
#Cv = 3.0

<eos>
type = StellarCollapse
filename = /usr/projects/w22_stars/EoS/Hempel_SFHoEOS_rho222_temp180_ye60_version_1.1_20120817.h5
use_sp5 = false

<fixup>
enable_floors = false
enable_mhd_floors = false
enable_ceilings = false
enable_flux_fixup = false
enable_c2p_fixup = true
floor_type = ConstantRhoSie
rho0_floor = 1.e-12
sie0_floor = 1.e-6
ceiling_type = ConstantGamSie
gam0_ceiling = 100.0
sie_ceiling = 1e-2

<physics>
hydro = true
he = false
3t = false
rad = true

<fluid>
xorder = 2
cfl = 0.6
riemann = llf
recon = weno5
c2p_method = robust
c2p_max_iter = 1000
c2p_tol = 1.e-8
Ye = true
mhd = false

<geometry>
a = 0

<units>
scale_free = false
geom_mass_msun = 1.3 # canonical M=1.3Msun NS sets our length scale of L = G M / c^2 = 1.93 km
fluid_density_cgs = 3.599e17 # 1.e9 # gives mass = 7.07e24 g

<standing_accretion_shock>
Mdot = 0.2 # Msun / sec
rShock = 200 # km
target_mach = -100 # target Mach number for upstream flow in preshock region
model_filename = 1d_initial_conditions_radice_10k.txt

<radiation>
method=cooling_function
do_liebendorfer=false
do_lightbulb=true
lum=2.5
do_gain_reducer=false
always_gain=false
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ add_executable(phoebus
pgen/shock_tube.cpp
pgen/thin_cooling.cpp
pgen/sedov.cpp
pgen/standing_accretion_shock.cpp
pgen/torus.cpp
pgen/tov.cpp

Expand Down
3 changes: 2 additions & 1 deletion src/pgen/pgen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ using namespace parthenon::package::prelude;
PROBLEM(torus) \
PROBLEM(p2c2p) \
PROBLEM(tov) \
PROBLEM(homologous)
PROBLEM(homologous) \
PROBLEM(standing_accretion_shock)

// if you need problem-specific modifications to inputs, add the name here
#define FOREACH_MODIFIER \
Expand Down
1 change: 0 additions & 1 deletion src/pgen/progenitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ void ProblemGenerator(MeshBlock *pmb, ParameterInput *pin) {
v(iye, k, j, i) = Ye_dev.interpToReal(r);
lambda[0] = v(iye, k, j, i);
}

const Real u = phoebus::energy_from_rho_P(eos, mass_density_dev.interpToReal(r),
pressure_dev.interpToReal(r), emin,
emax, lambda[0]);
Expand Down
Loading
Loading