Skip to content

Tests to Make For Stellar Models #8

Description

@rboston628

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions