brunt in rotation
- Dominant language
- Fortran
- Stars
- 249
- Forks
- 82
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 3
Description
In $MESA_DIR/star/private/rotation_mixing_info.f90, lines 595-596, the total Brunt and Brunt composition term are calculated again. I was wondering if it would be equivalent to simply replace those lines with s% brunt_N2 and s% brunt_N2_composition_term ?
The attached image shows a MESA profile comparing these, where I let a WD accrete at constant Mdot, turn Tayler-Spruit on only, and run with small timesteps (0.002 yr) until the model settles into a quasi-steady state.
I extracted the necessary lines from rotation_mixing_info and put them as extra_profile_columns_data in my run_star_extras. In the middle panel, the N2_mu calculated (orange solid) is much noisier than the usual s% brunt_N2_composition_term (green solid).
For this WD I averaged the inner 0.85 Msun abundances, so there should be no N2_mu in the inner 0.85 Msun.
This may have an impact on the Tayler-Spruit viscosity because it is calculated as the harmonic sum between the structure term and composition term. In the final panel, I take the shear profile from MESA (q in top panel), and then calculate the Tayler-Spruit viscosity, one using lines 595-596 (orange line) and one using brunt_N2_composition term from profile_columns.list (green). The former is agrees with the viscosity that the MESA profile gives (blue line), but the latter is what the viscosity should be as the inner 0.85 Msun has no composition gradient .

Contributor guide
Research direction
Start in $MESA_DIR/star/private/rotation_mixing_info.f90 at lines 595-596 and compare the recalculated total Brunt and composition terms with s% brunt_N2 and s% brunt_N2_composition_term. Reproduce the profile comparison described for a steadily accreting white dwarf with Tayler-Spruit enabled, then check the resulting viscosity against the profile output. Done means the equivalence or discrepancy is established and the affected calculation is clearly identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fortran
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100