Skip to content

Commit

Permalink
Merge branch 'main' of github.com:amrex-astro/initial_models
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Jun 10, 2024
2 parents e9d44b5 + 15618e9 commit db6b2d6
Show file tree
Hide file tree
Showing 31 changed files with 16,459 additions and 26,675 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ecsn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Compare to stored output
run: |
cd ECSN
diff ECSN-ONe6040-final.hse.24414.06cm ci-benchmarks/ECSN-ONe6040-final.hse.24414.06cm
diff ECSN-ONe6040-final.hse.dx24414.06cm ci-benchmarks/ECSN-ONe6040-final.hse.dx24414.06cm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
run: ./deploy_docs_action.sh

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lagrangian_planar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Compare to stored output
run: |
cd lagrangian_planar
diff glasner_T7.hse.10000.00cm ci-benchmarks/glasner_T7.hse.10000.00cm
diff glasner_T7.hse.dx10000.00cm ci-benchmarks/glasner_T7.hse.dx10000.00cm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/low_mass_convective_star.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Compare to stored output
run: |
cd low_mass_convective_star
diff convective.hse.683.59km ci-benchmarks/convective.hse.683.59km
diff convective.hse.dx683.59km ci-benchmarks/convective.hse.dx683.59km
- name: Run with irregular grid
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/massive_star.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ jobs:
- name: Run with regular grid
run: |
cd massive_star
ulimit -s 32768
./initialmodel1d.gnu.ex inputs problem.nx=16384
- name: Compare to stored output
run: |
cd massive_star
diff 15m_500_sec.aprox19.hse.20.00km ci-benchmarks/15m_500_sec.aprox19.hse.20.00km
diff 15m_500_sec.aprox19.hse.dx20.00km ci-benchmarks/15m_500_sec.aprox19.hse.dx20.00km
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spherical.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Compare to stored output
run: |
cd spherical
diff WD_rhoc_2.e9_M_1.1.hse.2.00km ci-benchmarks/WD_rhoc_2.e9_M_1.1.hse.2.00km
diff WD_rhoc_2.e9_M_1.1.hse.dx2.00km ci-benchmarks/WD_rhoc_2.e9_M_1.1.hse.dx2.00km
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sub_chandra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Compare to stored output
run: |
cd sub_chandra
diff sub_chandra.M_WD-1.10.M_He-0.050.delta50.00km.hse.CO.N14.10.00km ci-benchmarks/sub_chandra.M_WD-1.10.M_He-0.050.delta50.00km.hse.CO.N14.10.00km
diff sub_chandra.M_WD-1.10.M_He-0.050.delta50.00km.temp_base-1.75e+08.hse.CO.N14.dx10.00km ci-benchmarks/sub_chandra.M_WD-1.10.M_He-0.050.delta50.00km.hse.CO.N14.dx10.00km
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Compare to stored output
run: |
cd test2
diff model.hse.5.62km ci-benchmarks/model.hse.5.62km
diff model.hse.dx5.62km ci-benchmarks/model.hse.dx5.62km
Expand Down
2 changes: 0 additions & 2 deletions ECSN/_parameters
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@namespace: problem

model_file character "ECSN-ONe6040-final.raw"

xmin real 0.0

xmax real 2.5e8
10,256 changes: 0 additions & 10,256 deletions ECSN/ci-benchmarks/ECSN-ONe6040-final.raw.hse.0.244141km

This file was deleted.

3 changes: 3 additions & 0 deletions _parameters
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ use_irreg_grid int 0

# number of points to use in the model
nx int -1

# initial model to read in
model_file character ""
2 changes: 0 additions & 2 deletions kepler_hybrid/_parameters
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@namespace: problem

model_file character "kepler_new_6.25e8.raw"

nx integer 1280

smallx real 1.e-10
Expand Down
2 changes: 0 additions & 2 deletions lagrangian_planar/_parameters
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@namespace: problem

model_file character "model.in"

model_shift real 0.0

xmin real 0.0
Expand Down
2 changes: 0 additions & 2 deletions low_mass_convective_star/_parameters
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,3 @@ M_tot real 0.3

prefix character "convective"

# not used, but needed for the reader
model_file character ""
2 changes: 0 additions & 2 deletions massive_star/_parameters
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@namespace: problem

model_file character "15m_500_sec.aprox19.dat"

xmin real 0.0

xmax real 1.75e10

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion model_util.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <AMReX_REAL.H>

std::string num_to_unitstring(const Real value) {
std::string num_to_unitstring(const amrex::Real value) {

std::string numstr{};
std::stringstream ss;
Expand Down
2 changes: 1 addition & 1 deletion read_model.H
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ write_model(std::string model_name,
dx_str = "irreg";
} else {
Real dx = (xzn_hse(1) - xzn_hse(0));
dx_str = num_to_unitstring(dx);
dx_str = "dx" + num_to_unitstring(dx);
}

outfile += "." + dx_str;
Expand Down
2 changes: 0 additions & 2 deletions spherical/_parameters
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,3 @@ cfrac real 0.7

prefix character "spherical"

# not used, but needed for the reader
model_file character ""
6 changes: 3 additions & 3 deletions sub_chandra/_parameters
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ low_density_cutoff real 1.e-4

temp_fluff real 1.e5

# not used, but needed for the reader
model_file character ""

isothermal_layer int 0

# tol_hse is the tolerance used when iterating over a zone to
# force it into HSE by adjusting the current density (and
# possibly temperature). TOL_HSE should be very small (~
# 1.e-10).
tol_hse real 1.e-10

# prefix for the output
prefix character "sub_chandra"
16 changes: 12 additions & 4 deletions sub_chandra/init_1d.H
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ AMREX_INLINE void init_1d() {

const Real TOL_HE_MASS = 1.e-3_rt;

const int MAX_ITER = 750;
const int MAX_ITER = 1000;


// convert the envelope and WD mass into CGS
Expand Down Expand Up @@ -462,7 +462,6 @@ AMREX_INLINE void init_1d() {

} // end loop over zones


mass_he = 0.0;
mass_wd = 0.0;

Expand Down Expand Up @@ -568,6 +567,11 @@ AMREX_INLINE void init_1d() {
amrex::Error("ERROR: mass did not converge");
}

std::cout << "converged" << std::endl;
std::cout << "central density of WD: " << rho_c << std::endl;
std::cout << "density at base of He layer: " << rho_he << std::endl;


std::cout << "final masses: " << std::endl;
std::cout << " mass WD: " << mass_wd / C::M_solar << std::endl;
std::cout << " mass He: " << mass_he / C::M_solar << std::endl;
Expand All @@ -576,7 +580,7 @@ AMREX_INLINE void init_1d() {
// store the model

Real dCoord = xzn_hse(1) - xzn_hse(0);
std::string dxstr = num_to_unitstring(dCoord);
std::string dxstr = "dx" + num_to_unitstring(dCoord);

std::string delta_str = num_to_unitstring(problem_rp::delta);

Expand All @@ -588,7 +592,11 @@ AMREX_INLINE void init_1d() {
ss2 << std::setprecision(3) << std::fixed << mass_he / C::M_solar;
std::string mass_he_str = ss2.str();

std::string outfile_base = "sub_chandra.M_WD-" + mass_wd_str + ".M_He-" + mass_he_str + ".delta" + delta_str;
std::stringstream ss3;
ss3 << problem_rp::temp_base;
std::string temp_base_str = ss3.str();

std::string outfile_base = problem_rp::prefix + ".M_WD-" + mass_wd_str + ".M_He-" + mass_he_str + ".delta" + delta_str + ".temp_base-" + temp_base_str;


std::string outfile = outfile_base + ".hse";
Expand Down
23 changes: 23 additions & 0 deletions sub_chandra/inputs.M_WD-1.1.M_He-0.05.CO.N14.thin
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
problem.nx = 8192

problem.xmin = 0.0
problem.xmax = 4.096e9

problem.M_tot = 1.1
problem.M_He = 0.05

problem.delta = 1.e6

problem.temp_core = 1.e7
problem.temp_base = 1.75e8

problem.mixed_co_wd = 1

problem.X_N14 = 0.01

problem.low_density_cutoff = 1.e-4
problem.temp_fluff = 7.5e7

problem.small_temp = 1.e6

problem.tol_hse = 2.e-10
23 changes: 23 additions & 0 deletions sub_chandra/inputs.M_WD-1.1.M_He-0.05.CO.N14.thinner
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
problem.nx = 8192

problem.xmin = 0.0
problem.xmax = 4.096e9

problem.M_tot = 1.1
problem.M_He = 0.05

problem.delta = 2.e5

problem.temp_core = 1.e7
problem.temp_base = 1.75e8

problem.mixed_co_wd = 1

problem.X_N14 = 0.01

problem.low_density_cutoff = 1.e-4
problem.temp_fluff = 7.5e7

problem.small_temp = 1.e6

problem.tol_hse = 2.e-10
2 changes: 0 additions & 2 deletions test2/_parameters
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,3 @@ low_density_cutoff real 1.e-4

temp_fluff real 1.e7

# not used, but needed for the reader
model_file character ""
File renamed without changes.
4 changes: 0 additions & 4 deletions toy_atm/_parameters
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,3 @@ do_invsq_grav integer 0
low_density_cutoff real 1.e-4

smallx real 1.e-10


# not used, but needed for the reader
model_file character ""

0 comments on commit db6b2d6

Please sign in to comment.