66 lines
2.7 KiB
Julia
66 lines
2.7 KiB
Julia
using DifferentialEquations
|
||
|
||
const ħc = 197.327 # MeVfm
|
||
|
||
# Values defined in C. J. Horowitz and J. Piekarewicz, Phys. Rev. Lett. 86, 5647 (2001)
|
||
# Values taken from Hartree.f (FSUGarnet) and
|
||
const m_ρ = 763.0 # MeV/c2
|
||
const m_ω = 782.5 # MeV/c2
|
||
const m_s = 496.939473213388 # MeV/c2
|
||
const m_γ = 0.000001000 # MeV/c2 # not defined in paper
|
||
const g2_s = 110.349189097820 # units?
|
||
const g2_v = 187.694676506801 # units?
|
||
const g2_ρ = 192.927428365698 # units?
|
||
const g2_γ = 0.091701236 # dimensionless # equal to 4πα
|
||
const κ = 3.260178893447 # units?
|
||
const λ = -0.003551486718 # units? # LambdaSS
|
||
const ζ = 0.023499504053 # units? # LambdaVV
|
||
const Λv = 0.043376933644 # units? # LambdaVR
|
||
|
||
const r_reg = 1E-9 # fm # regulator for Green's functions
|
||
|
||
"Green's function for Klein-Gordon equation in natural units"
|
||
greensFunctionKG(m, r, rp) = -(1 / m) * rp / (r + r_reg) * sinh(m * min(r, rp)) * exp(-m * max(r, rp))
|
||
|
||
"Green's function for Poisson's equation in natural units"
|
||
greensFunctionP(r, rp) = -rp^2 / (max(r, rp) + r_reg)
|
||
|
||
"Solve the Klein-Gordon equation (or Poisson's equation when m=0) for a given a source function (as an array) where
|
||
m is the mass of the meson in MeV/c2,
|
||
r_max is the r-cutoff in fm."
|
||
function solveKG(m, source, r_max)
|
||
greensFunction = m == 0 ? greensFunctionP : (r, rp) -> greensFunctionKG(m / ħc, r, rp)
|
||
mesh = range(0, r_max; length=length(source))
|
||
greenMat = greensFunction.(mesh, transpose(mesh))
|
||
return greenMat * source
|
||
end
|
||
|
||
"Iteratively solve meson equations and return the wave functions u(r)=[Φ0(r), W0(r), B0(r), A0(r)] where
|
||
divs is the number of mesh divisions so the arrays are of length (1+divs),
|
||
ρ_sp, ρ_vp are the scalar and vector proton densities as arrays,
|
||
ρ_sn, ρ_vn are the scalar and vector neutron densities as arrays,
|
||
Φ0, W0, B0, A0 are the mean-field potentials (couplings included) in MeV as as arrays,
|
||
r is the radius in fm.
|
||
Reference: P. Giuliani, K. Godbey, E. Bonilla, F. Viens, and J. Piekarewicz, Frontiers in Physics 10, (2023)"
|
||
function solveMesonWfs(ρ_sp, ρ_vp, ρ_sn, ρ_vn, r_max, divs, iterations=3)
|
||
# A0 doesn't need iterations
|
||
src_A0 = -sqrt(g2_γ) .* ρ_vp
|
||
A0 = solveKG(0, src_A0, r_max)
|
||
|
||
(Φ0, W0, B0) = (zeros(1 + divs) for _ in 1:3)
|
||
(src_Φ0, src_W0, src_B0) = (zeros(1 + divs) for _ in 1:3)
|
||
|
||
for _ in 1:iterations
|
||
@. src_Φ0 = g2_s * ((κ/2) * Φ0^2 + (λ/6) * Φ0^3 - (ρ_sp + ρ_sn))
|
||
Φ0 .= solveKG(m_s, src_Φ0, r_max)
|
||
|
||
@. src_W0 = g2_v * ((ζ/6) * W0^3 + 2 * Λv * B0^2 * W0 - (ρ_vp + ρ_vn))
|
||
W0 .= solveKG(m_ω, src_W0, r_max)
|
||
|
||
@. src_B0 = g2_ρ * (2 * Λv * W0^2 * B0 - (ρ_vp - ρ_vn) / 2)
|
||
B0 .= solveKG(m_ρ, src_B0, r_max)
|
||
end
|
||
|
||
return (Φ0, W0, B0, A0)
|
||
end
|