Skip to content

Commit

Permalink
Move psi functions of Solov'ev equilibria to Solov'ev module.
Browse files Browse the repository at this point in the history
  • Loading branch information
michakraus committed Oct 7, 2020
1 parent 5139ad2 commit e431a57
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 55 deletions.
55 changes: 54 additions & 1 deletion src/analytic/solovev.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,60 @@ module Solovev

export SolovevEquilibrium, SolovevXpointEquilibrium

include("solovev_psi.jl")

function ψ₀(x::AbstractVector{T}, a) where {T <: Number}
x[1]^4 / 8 + a * (x[1]^2 * log(x[1]) / 2 - x[1]^4 / 8 )
end

function ψ₁(x::AbstractVector{T}) where {T <: Number}
one(T)
end

function ψ₂(x::AbstractVector{T}) where {T <: Number}
x[1]^2
end

function ψ₃(x::AbstractVector{T}) where {T <: Number}
x[2]^2 - x[1]^2 * log(x[1])
end

function ψ₄(x::AbstractVector{T}) where {T <: Number}
x[1]^4 - 4 * x[1]^2 * x[2]^2
end

function ψ₅(x::AbstractVector{T}) where {T <: Number}
2 * x[2]^4 - 9 * x[2]^2 * x[1]^2 + 3 * x[1]^4 * log(x[1]) - 12 * x[1]^2 * x[2]^2 * log(x[1])
end

function ψ₆(x::AbstractVector{T}) where {T <: Number}
x[1]^6 - 12 * x[1]^4 * x[2]^2 + 8 * x[1]^2 * x[2]^4
end

function ψ₇(x::AbstractVector{T}) where {T <: Number}
8 * x[2]^6 - 140 * x[2]^4 * x[1]^2 + 75 * x[2]^2 * x[1]^4 - 15 * x[1]^6 * log(x[1]) +
180 * x[1]^4 * x[2]^2 * log(x[1]) - 120 * x[1]^2 * x[2]^4 * log(x[1])
end

function ψ₈(x::AbstractVector{T}) where {T <: Number}
x[2]
end

function ψ₉(x::AbstractVector{T}) where {T <: Number}
x[2] * x[1]^2
end

function ψ₁₀(x::AbstractVector{T}) where {T <: Number}
x[2]^3 - 3 * x[2] * x[1]^2 * log(x[1])
end

function ψ₁₁(x::AbstractVector{T}) where {T <: Number}
3 * x[2] * x[1]^4 - 4 * x[2]^3 * x[1]^2
end

function ψ₁₂(x::AbstractVector{T}) where {T <: Number}
8 * x[2]^5 - 45 * x[2] * x[1]^4 - 80 * x[2]^3 * x[1]^2 * log(x[1]) + 60 * x[2] * x[1]^4 * log(x[1])
end


@doc raw"""
Axisymmetric Solov'ev equilibra in (R/R₀,Z/R₀,ϕ) coordinates.
Expand Down
54 changes: 0 additions & 54 deletions src/analytic/solovev_psi.jl

This file was deleted.

0 comments on commit e431a57

Please sign in to comment.