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

Tests to Make For Stellar Models #8

Open
24 of 59 tasks
rboston628 opened this issue Mar 24, 2024 · 1 comment
Open
24 of 59 tasks

Tests to Make For Stellar Models #8

rboston628 opened this issue Mar 24, 2024 · 1 comment

Comments

@rboston628
Copy link
Owner

rboston628 commented Mar 24, 2024

Further code refactoring requires careful testing to make sure I don't make things worse. The following are some tests to run.

Note these tests are only tests of the stellar models, and do not test the modes.

Basic Tess

  • negative test: SSRs can be bad enough to fail tests
  • negative test: boundary expansions can be bad enough to fail tests
  • SSRs scale like $N^{-4}$, according to RK4

Simple Models

These models mostly only exist as verification for SimpleWD models.

  • isopycnic star equals known solution within machine precision
  • isopycnic boundary expansions of $A^*$, $V_g$, $U$, $c_1$ equal to these functions near boundaries
  • polytrope initialization suitably handles bad inputs
  • polytrope $n=0$ equal to known solution
  • polytrope $n=0$ boundary expansions are good approximations
  • polytrope $n=1$ equal to known solution
  • polytrope $n=1$ boundary expansions are good approximations
  • polytrope $n=5$ equal to known solution
  • polytrope $n=5$ central boundary expansions a good approximation
  • polytrope exact errors scale like $N^{-4}$
  • polytrope SSRs scale like $N^{-4}$
  • polytrope solution $\theta$ scales like $N^{-4}$
  • polytropes for a range of index can be constructed
  • polytropes for a range of index have acceptably small SSR (say $N^{-3}$)
  • polytropes for a range of index have good boundary expansions
  • polytropes for a range of index, mass, radius can be constructed
  • polytropes for a range of index, mass, radius have acceptable small SSR
  • polytropes for a range of index, mass, radius equal "abstract" polytropes scaled to 1
  • polytropes for a range of index, mass, radius have good boundary expansions
  • Chandrasekhar WD initialization suitably handles bad inputs
  • Chandrasekhar WDs match table of Chandrasekhar 1939
  • Chandrasekhar WDs have acceptable SSR
  • Chandrasekhar WDs central boundary expansion a good approximation
  • Chandrasekhar WDs surface boundary expansion a good approximation
  • Chandrasekhar WDs can be constructed with sigmoidal $\mu_e$
  • Chandrasekhar WDs with sigmoidal $\mu_e$ have acceptable SSR, boundary expansions

MESA wrapper

  • MESA initialization suitably handles bad inputs
  • MESA models have at least one added grid point in each interval
  • MESA models always divide intervals into binary fractions
  • MESA model matches base model at knots
  • MESA model has acceptable SSR
  • MESA model central boundary expansion is a good approximation
  • MESA model surface boundary expansion is a good approximation
  • MESA model can be constructed from real MESA file v101 (use mesa_co_wd_cold.dat)
  • MESA model constructed from mesa_co_wd_cold.dat has acceptable SSR
  • MESA model constructed from mesa_co_wd_cold.dat has acceptable central boundary expansion
  • MESA model constructed from mesa_co_wd_cold.dat has acceptable surface boundary expansion
  • MESA model matches to a golden data set representing a previous fit

SimpleWD

  • SimpleWD suitably handles invalid inputs
  • SimpleWD can be constructed under a variety of inputs
  • SimpleWD has acceptable SSR
  • SimpleWD SSR scales appropriately with $N$
  • SimpleWD has acceptable central boundary expansion
  • SimpleWD has acceptable surface boundary expansion
  • SimpleWD defines a half-grid-point
  • A series of SimpleWD models can be used to approximate mass-radius relation
  • SimpleWD prints out its Brunt-Vaisala frequency
  • SimpleWD prints out its chemical composition
  • SimpleWD prints out its opacity function

Artifacts

Have a run of the tests automatically generate the following useful graphs/tables for further diagnosing the code performance.

  • graph of errors against exact solutions for $n=0, 1, 5$ polytropes
  • graph of error scaling for $n=0, 1, 5$ polytropes
  • graph of residuals for various polytropes
  • graph of residual scaling for various polytropes
  • graph of scaling of $\theta$ from various polytropes
  • table of comparison against Chandrasekhar 1939 values
  • graphs comparing SimpleWD against MESA values
@rboston628 rboston628 changed the title Failures of Stellar Model Tests Create Stellar Model Tests May 4, 2024
@rboston628 rboston628 changed the title Create Stellar Model Tests Tests to Make For Stellar Models May 4, 2024
@rboston628
Copy link
Owner Author

Some of the tests of stellar models are failing, due to not converging quickly enough, or not converging enough.

They have been disabled for the moment, to allow PR #7 to be closed out, since it's been open for almost a year now.

(Comment originally made Mar 24)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant