ProjectTorreyPines / IMAS.jl

Physics, engineering, math and plotting on top of IMASDD.jl
https://projecttorreypines.github.io/IMAS.jl/dev
Apache License 2.0
3 stars 1 forks source link

peret scaling law for lambda_q #213

Open jguterl opened 2 weeks ago

jguterl commented 2 weeks ago

@TimSlendebroek Could you add the following option https://github.com/ProjectTorreyPines/BoundaryPlasmaModels.jl/blob/master/examples/fedorczak_peret_lambda_q.jl to compute lambda_q in IMAS.jl?

TimSlendebroek commented 2 weeks ago

The SOL functions are here: IMAS/src/physics/sol.jl

orso82 commented 2 weeks ago

@jguterl would you agree that what you have is equivalent to this:

mu_0 = 4e-7 * pi
mp = 1.67e-27
qe  = 1.6e-19

function compute_λq(B_omp, Tesep, R_omp, l_para; G=1, α=3, γ=5.3, A=2, Z=1)
    # Compute ρₛ
    ρₛ = sqrt(2 * Tesep * A * mp / qe) / (B_omp * Z)

    # Compute g
    g = (ρₛ / R_omp) * G

    # Compute σ_N and σ_ϕ
    σ_N = 2 * ρₛ / l_para
    σ_ϕ = 2 * ρₛ / l_para  # It's identical to σ_N, is that correct?

    # Compute λ₀
    λ₀ = 3.9 * g^(3/11) * σ_N^(-4/11) * σ_ϕ^(-2/11) * ρₛ * γ^(-4/11)

    # Compute λₚ
    λₚ = λ₀ / α

    # Compute final λq
    λq = (2 / 7) * λₚ * sqrt(γ) / (sqrt(γ) - 1)

    return λq
end
orso82 commented 2 weeks ago

If you could update the function with types and comments, we can then copy it over to https://github.com/ProjectTorreyPines/IMAS.jl/blob/master/src/physics/sol.jl

jguterl commented 2 weeks ago

Yes. That works. @ggdose, please take a look We need just need a interface for L_para

orso82 commented 2 weeks ago

is it correct that σ_N and σ_ϕ are identical ?

jguterl commented 2 weeks ago

""" Fedorczak_Peret_λq(B_omp, Tesep, R_omp, l_para; G=1, α=3, γ=5.3, A=2, Z=1)

Compute the heat flux width based on Federoczak-Peret model.

Arguments

"""

function Fedorczak_Peret_λq(B_omp, Tesep, R_omp, l_para; G=1, α=3, γ=5.3, A= 2, Z=1)

Compute ρₛ

ρₛ = sqrt(2 Tesep A mp / qe) / (B_omp Z)

Compute g

g = (ρₛ / R_omp) * G

Compute σ_N and σ_ϕ

σ_N = 2 ρₛ / l_para σ_ϕ = 2 ρₛ / l_para # It's identical to σ_N, is that correct?

Compute λ₀

λ₀ = 3.9 g^(3 / 11) σ_N^(-4 / 11) σ_ϕ^(-2 / 11) ρₛ * γ^(-4 / 11)

Compute λₚ

λₚ = λ₀ / α

Compute final λq

λq = (2 / 7) λₚ sqrt(γ) / (sqrt(γ) - 1)

return λq end

On Wed, Nov 6, 2024 at 2:11 PM Orso Meneghini @.***> wrote:

is it correct that σ_N and σ_ϕ are identical ?

— Reply to this email directly, view it on GitHub https://github.com/ProjectTorreyPines/IMAS.jl/issues/213#issuecomment-2460888295, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEESMZCQD4RTAAZYULCXB4LZ7KHZBAVCNFSM6AAAAABRJ2C3XOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRQHA4DQMRZGU . You are receiving this because you were mentioned.Message ID: @.***>

jguterl commented 2 weeks ago

is it correct that σ_N and σ_ϕ are identical ?

Yes in this simplified version

orso82 commented 2 weeks ago

@jguterl can you comment about the definition of l_para? I understand it's the connection length between the outer midplane and the outer target, but for a diverted plasma right outside of the separatrix, that nears infinity...

jguterl commented 2 weeks ago

you can take l_para along Psi(R_omp) with R_omp = R_omp,sep + delta_R with delta_R= 1.5mm

On Wed, Nov 6, 2024 at 11:34 PM Orso Meneghini @.***> wrote:

@jguterl https://github.com/jguterl can you comment about the definition of l_para? I understand it's the connection length between the outer midplane and the outer target, but for a diverted plasma right outside of the separatrix, that nears infinity...

— Reply to this email directly, view it on GitHub https://github.com/ProjectTorreyPines/IMAS.jl/issues/213#issuecomment-2461515524, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEESMZGYROBXIUQY4Y6HQ5TZ7MJZTAVCNFSM6AAAAABRJ2C3XOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRRGUYTKNJSGQ . You are receiving this because you were mentioned.Message ID: @.***>