Define potentials in p_space.jl

This commit is contained in:
ysyapa 2024-01-23 18:58:03 +00:00
parent a569302ca2
commit d6b702581d
4 changed files with 6 additions and 9 deletions

View File

@ -7,10 +7,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"using Plots, LinearAlgebra\n", "using Plots, LinearAlgebra\n",
"include(\"p_space.jl\")\n", "include(\"p_space.jl\")"
"\n",
"g0(R, p, q) = (exp(-(1/4)*(p + q)^2*R^2)*(-1 + exp(p*q*R^2))*R)/(2*sqrt(π))\n",
"g1(R, p, q) = (exp(-(1/4)*(p + q)^2*R^2)*(2 + p*q*R^2 + exp(p*q*R^2)*(-2 + p*q*R^2)))/(2*p*sqrt(π)*q*R)"
] ]
}, },
{ {

View File

@ -1,5 +1,9 @@
using FastGaussQuadrature using FastGaussQuadrature
# Gaussian potentials in momentum space
g0(R, p, q) = (exp(-(1/4)*(p + q)^2*R^2)*(-1 + exp(p*q*R^2))*R)/(2*sqrt(π))
g1(R, p, q) = (exp(-(1/4)*(p + q)^2*R^2)*(2 + p*q*R^2 + exp(p*q*R^2)*(-2 + p*q*R^2)))/(2*p*sqrt(π)*q*R)
function gausslegendre_shifted(a, b, n) function gausslegendre_shifted(a, b, n)
scale = (b - a) / 2 scale = (b - a) / 2
shift = (a + b) / 2 shift = (a + b) / 2

View File

@ -30,7 +30,6 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"# ResonanceEC: Eq. (21)\n", "# ResonanceEC: Eq. (21)\n",
"g1(α, p, q) = sqrt(α/(4*π))*((1/α+2/(p*q))*exp(-(p+q)^2/(4*α))+(1/α-2/(p*q))*exp(-(p-q)^2/(4*α)))\n",
"V_pq(p, q) = -10 * g1(1, p, q)\n", "V_pq(p, q) = -10 * g1(1, p, q)\n",
"\n", "\n",
"H = get_H_matrix(V_pq, p, w)\n", "H = get_H_matrix(V_pq, p, w)\n",

View File

@ -7,10 +7,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"using Plots, LinearAlgebra\n", "using Plots, LinearAlgebra\n",
"include(\"p_space.jl\")\n", "include(\"p_space.jl\")"
"\n",
"g0(R, p, q) = (exp(-(1/4)*(p + q)^2*R^2)*(-1 + exp(p*q*R^2))*R)/(2*sqrt(π))\n",
"g1(R, p, q) = (exp(-(1/4)*(p + q)^2*R^2)*(2 + p*q*R^2 + exp(p*q*R^2)*(-2 + p*q*R^2)))/(2*p*sqrt(π)*q*R)"
] ]
}, },
{ {