Skip to content

Instantly share code, notes, and snippets.

@Moelf Moelf/SEMF.jl
Created Oct 7, 2019

Embed
What would you like to do?
Plot nuclear binding energy per nucleon in MeV in Julia
using Plots
N = 1:200
Z = 1:200
function Eb(N,Z)
A = Z+N
aᵥ = 15.8
aₛ = 18.3
ac = 0.714
aₐ = 23.2
δ = 12/sqrt(A)
if iseven(A) && iseven(Z)
δ = -δ
elseif (iseven(A) && isodd(Z)) || (isodd(A) && iseven(Z))
δ = 0
end
Eb = aᵥ*A - aₛ * A^(2/3) - ac * Z^2/A^(1/3) - aₐ * (A-2*Z)^2/A - δ
Eb < 0 && return 0
Eb/A
end
contour(N, Z, Eb, fill=true, xlabel="N", ylabel="Z")
title!("Binding energy per nucleon in MeV")
@Moelf

This comment has been minimized.

Copy link
Owner Author

Moelf commented Oct 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.