Skin thickness calculation

This commit is contained in:
Nuwan Yapa 2025-08-04 16:57:34 -04:00
parent 5fc391ee74
commit 20fa595fa2
1 changed files with 6 additions and 0 deletions

View File

@ -45,3 +45,9 @@ function solve_system!(s::system; reinitialize_densities=true, monitor_print=tru
previous_E_per_A = E_per_A previous_E_per_A = E_per_A
end end
end end
"Calculate RMS radius from density"
rms_radius(p::Bool, s::system) = 4pi * Δr(s) * sum((rs(s) .^ 4) .* (p ? s.ρ_vp : s.ρ_vn)) / (p ? s.Z : s.N) |> sqrt
"Calculate neutron skin thickness"
R_skin(s::system) = rms_radius(false, s) - rms_radius(true, s)