diff --git a/src/langmuir_probes.jl b/src/langmuir_probes.jl index 26af3ca..0ebdde5 100644 --- a/src/langmuir_probes.jl +++ b/src/langmuir_probes.jl @@ -28,16 +28,16 @@ function compute_langmuir_probes( ids::IMASDD.dd; ne_noise::Union{Noise, Nothing}=nothing, te_noise::Union{Noise, Nothing}=nothing, + n_e_gsi::Int=5, ) epggd = ids.edge_profiles.ggd nt = length(epggd) fix_ep_grid_ggd_idx = length(ids.edge_profiles.grid_ggd) == 1 ep_grid_ggd = ids.edge_profiles.grid_ggd[1] - # Using -5 for now to use the SOLPS edge profile grid only - TPS_mats_all_cells = get_TPS_mats(ep_grid_ggd, -5) + TPS_mats_all_cells = get_TPS_mats(ep_grid_ggd, n_e_gsi) # Get the edge profile interpolation functions - ep_n_e = interp(epggd[1].electrons.density, TPS_mats_all_cells, 5) - ep_t_e = interp(epggd[1].electrons.temperature, TPS_mats_all_cells, 5) + ep_n_e = interp(epggd[1].electrons.density, TPS_mats_all_cells, n_e_gsi) + ep_t_e = interp(epggd[1].electrons.temperature, TPS_mats_all_cells, n_e_gsi) # Initialize langmuir probe data init_data!.(ids.langmuir_probes.embedded, nt) @@ -46,10 +46,11 @@ function compute_langmuir_probes( if !fix_ep_grid_ggd_idx && ii > 1 # If grid_ggd is evolving with time, update boundaries ep_grid_ggd = ids.edge_profiles.grid_ggd[ii] - TPS_mats_all_cells = get_TPS_mats(ep_grid_ggd, -5) + TPS_mats_all_cells = get_TPS_mats(ep_grid_ggd, n_e_gsi) # Update the edge profile interpolation functions - ep_n_e = interp(epggd[ii].electrons.density, TPS_mats_all_cells, 5) - ep_t_e = interp(epggd[ii].electrons.temperature, TPS_mats_all_cells, 5) + ep_n_e = interp(epggd[ii].electrons.density, TPS_mats_all_cells, n_e_gsi) + ep_t_e = + interp(epggd[ii].electrons.temperature, TPS_mats_all_cells, n_e_gsi) end for emb_lp ∈ ids.langmuir_probes.embedded diff --git a/test/runtests.jl b/test/runtests.jl index 0fe2c76..458681c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -119,7 +119,8 @@ if args["langmuir_probes"] add_langmuir_probes!( "$(@__DIR__)/../src/default_langmuir_probes.json", ids; - ne_noise, + ne_noise=ne_noise, + n_e_gsi=-5, ) # Just checking if the function runs through for now for lp ∈ ids.langmuir_probes.embedded