Skip to content

Commit

Permalink
Turn off boundary flux correction by default
Browse files Browse the repository at this point in the history
  • Loading branch information
eldond committed Jul 31, 2024
1 parent 963d2fa commit 7fe0b20
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/SD4SOLPS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function geqdsk_to_imas!(
dd::IMAS.dd;
set_time::Union{Nothing, Float64}=nothing,
time_index::Int=1,
allow_boundary_flux_correction::Bool=true,
allow_boundary_flux_correction::Bool=false,
)
# https://github.com/JuliaFusion/EFIT.jl/blob/master/src/io.jl
g = EFIT.readg(eqdsk_file; set_time=set_time)
Expand Down Expand Up @@ -273,6 +273,7 @@ end
output_format::String="json",
eqdsk_set_time::Union{Nothing, Float64}=nothing,
eq_time_index::Int=1,
allow_boundary_flux_correction::Bool=false,
)::IMAS.dd
Gathers SOLPS and EFIT files and loads them into IMAS structure. Extrapolates
Expand All @@ -286,6 +287,7 @@ function preparation(
output_format::String="json",
eqdsk_set_time::Union{Nothing, Float64}=nothing,
eq_time_index::Int=1,
allow_boundary_flux_correction::Bool=false,
)::IMAS.dd
b2fgmtry, b2time, b2mn, eqdsk =
find_files_in_allowed_folders(dirs...; eqdsk_file=eqdsk_file)
Expand All @@ -296,7 +298,13 @@ function preparation(
println(" eqdsk = ", eqdsk)

dd = IMAS.dd()
geqdsk_to_imas!(eqdsk, dd; set_time=eqdsk_set_time, time_index=eq_time_index)
geqdsk_to_imas!(
eqdsk,
dd;
set_time=eqdsk_set_time,
time_index=eq_time_index,
allow_boundary_flux_correction=allow_boundary_flux_correction,
)
# Repairs
add_rho_to_equilibrium!(dd) # Doesn't do anything if rho is valid
dd.global_time = dd.equilibrium.time_slice[1].time
Expand Down

0 comments on commit 7fe0b20

Please sign in to comment.