Skip to content

Commit

Permalink
added parfiles to tutorial sub-directory. and there is a jupyter nb f…
Browse files Browse the repository at this point in the history
…or the tutorial now
  • Loading branch information
vedantdhruv96 committed Oct 20, 2024
1 parent 072c39d commit cf2f03f
Show file tree
Hide file tree
Showing 6 changed files with 447 additions and 2 deletions.
4 changes: 2 additions & 2 deletions machines/rusty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ then
echo "GPU build"
# Load required modules
module --force purge
module load modules/2.3-20240529 slurm cmake gcc/11.4.0 cuda gsl openmpi/cuda-4.0.7 hdf5 openblas
module load modules/2.3-20240529 slurm cmake gcc/11.4.0 cuda gsl openmpi hdf5 openblas
module list
# 8-way compile for H100s
if [[ $ARGS == *"h100"* ]]; then
Expand Down Expand Up @@ -74,4 +74,4 @@ then
C_NATIVE=gcc
CXX_NATIVE=g++
fi
fi
fi
71 changes: 71 additions & 0 deletions scripts/tutorial/parfiles/anisotropic_conduction.par
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Anisotropic Conduction problem
# Heat conduction along field lines in the EMHD theory
# of Chandra+2015

<parthenon/job>
problem_id = anisotropic_conduction

<parthenon/mesh>
nx1 = 256
x1min = 0.0
x1max = 1.0

nx2 = 256
x2min = 0.0
x2max = 1.0

nx3 = 1
x3min = 0.0
x3max = 1.0

<parthenon/meshblock>
nx1 = 256
nx2 = 256
nx3 = 1

<coordinates>
# Setting Cartesian coords defaults to periodic boundaries
base = cartesian_minkowski
transform = null

<parthenon/time>
tlim = 10.0
dt_min = 1e-6

<GRMHD>
cfl = 0.7
gamma = 1.333333
reconstruction = weno5

<floors>
bsq_over_rho_max = 100
u_over_rho_max = 100

<debug>
verbose = 1
flag_verbose = 0
extra_checks = 1

# This block must be present and values filled
# in all EGRMHD simulations
<emhd>
on = true
closure_type = constant
higher_order_terms = true
tau = 0.1
conduction_alpha = 0.1
viscosity_alpha = 0.0

# Implicit driver is auto-selected for emhd
<implicit>
max_nonlinear_iter = 3

<parthenon/output0>
file_type = hdf5
dt = 0.1
single_precision_output = true
variables = prims

<parthenon/output1>
file_type = hst
dt = 0.1
72 changes: 72 additions & 0 deletions scripts/tutorial/parfiles/anisotropic_conduction_ideal.par
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Anisotropic Conduction problem
# Heat conduction along field lines in the EMHD theory
# of Chandra+2015

<parthenon/job>
problem_id = anisotropic_conduction

<parthenon/mesh>
nx1 = 512
x1min = 0.0
x1max = 1.0

nx2 = 512
x2min = 0.0
x2max = 1.0

nx3 = 1
x3min = 0.0
x3max = 1.0

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

<coordinates>
# Setting Cartesian coords defaults to periodic boundaries
base = cartesian_minkowski
transform = null

<parthenon/time>
tlim = 10.0
dt_min = 1e-6

<GRMHD>
cfl = 0.7
gamma = 1.333333
reconstruction = weno5

<floors>
bsq_over_rho_max = 100
u_over_rho_max = 100

<debug>
verbose = 1
flag_verbose = 0
extra_checks = 1

# This block must be present and values filled
# in all EGRMHD simulations
<emhd>
on = false
closure_type = constant
higher_order_terms = true
tau = 0.1
conduction_alpha = 0.01
viscosity_alpha = 0.0

# Implicit driver is auto-selected for emhd
<implicit>
on = false
max_nonlinear_iter = 3

<parthenon/output0>
file_type = hdf5
dt = 0.1
single_precision_output = true
variables = prims

<parthenon/output1>
file_type = hst
dt = 0.1
64 changes: 64 additions & 0 deletions scripts/tutorial/parfiles/orszag_tang.par
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Orszag-Tang Vortex problem:
# Generate current sheets on short timescales

<parthenon/job>
problem_id = orszag_tang

<parthenon/mesh>
nx1 = 512
x1min = -3.141592653589793
x1max = 3.141592653589793

nx2 = 512
x2min = -3.141592653589793
x2max = 3.141592653589793

nx3 = 1
x3min = -0.01
x3max = 0.01

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

<coordinates>
base = cartesian_minkowski
transform = null

<parthenon/time>
tlim = 140.0
integrator = rk2

<GRMHD>
cfl = 0.9
gamma = 1.666667

<flux>
type = hlle
reconstruction = weno5

<b_field>
solver = face_ct
ct_scheme = gs05_c

<debug>
verbose = 1
flag_verbose = 2
extra_checks = 1

<parthenon/output0>
file_type = hdf5
dt = 1.0
single_precision_output = true
variables = prims, jcon

<parthenon/output1>
file_type = hst
dt = 0.1

# This problem is generally much too short to need
# checkpointing. However, we have a test which uses it.
#<parthenon/output2>
#file_type = rst
#dt = 10.0
97 changes: 97 additions & 0 deletions scripts/tutorial/parfiles/sane2d.par
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# SANE model in 2D
# Overall simulation size 50M, to allow
# running at small scale on e.g. a laptop
# Uses MKS coordinates, not Funky variant

<parthenon/job>
problem_id = torus

<parthenon/mesh>
nx1 = 256
nx2 = 256
nx3 = 1

<parthenon/meshblock>
nx1 = 256
nx2 = 256
nx3 = 1

<coordinates>
base = spherical_ks
transform = fmks
r_out = 50
a = 0.9375
hslope = 0.3
mks_smooth = 0.5
poly_xt = 0.82
poly_alpha = 14.0

<parthenon/time>
tlim = 3000.0
nlim = -1
integrator = vl2

<debug>
verbose = 1
extra_checks = 1
flag_verbose = 0

<GRMHD>
cfl = 0.9
gamma = 1.666667
reconstruction = weno5

<b_field>
solver = flux_ct

<driver>
type = kharma

<torus>
rin = 6.0
rmax = 12.0

<perturbation>
u_jitter = 0.04

<b_field>
type = sane
beta_min = 100.

<floors>
rho_min_geom = 1e-5
u_min_geom = 1e-7
u_over_rho_max = 100
bsq_over_rho_max = 100

<parthenon/output0>
file_type = hdf5
dt = 10.0
single_precision_output = true
# Fields beginning with a specifier here will be included (e.g., all prims.XXX)
# Fields specified but not present are silently skipped
# If you need a line break, use '&' at line end
variables = prims, jcon, pflag, fflag

<parthenon/output1>
file_type = rst
dt = 100.0

<parthenon/output2>
file_type = hst
dt = 0.1
variables = all_reductions

# This outputs a geometry file, similar to iharm3d's old 'grid.h5'
# Not needed for pyharm analysis in Kerr metrics, but useful in
# a bunch of other contexts.
<parthenon/output3>
file_type = hdf5
analysis_output = true
dt = 1e20
single_precision_output = false
# If you want the convenience and hate disk space, you can add these
# variables to "normal" dump files like output0 too.
variables = coords.Xnative, coords.Xsph, &
coords.gcon, coords.gcov, coords.gdet, coords.lapse, coords.conn, &
coords.gcon_embed, coords.gcov_embed, coords.gdet_embed
Loading

0 comments on commit cf2f03f

Please sign in to comment.