Skip to content

Commit

Permalink
Copy updated moments.electron.ppar into fvec_out - electron ppar evolves
Browse files Browse the repository at this point in the history
Previously the `electron_ppar` in the ion/neutral `scratch_pdf` struct
was never updated when using the implicit electron solve
(`implicit_electron_ppar = true`).
  • Loading branch information
johnomotani committed Oct 17, 2024
1 parent 8458091 commit a6bdda9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions moment_kinetics/src/time_advance.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3530,7 +3530,17 @@ end
nl_solver_params.electron_advance,
max_electron_pdf_iterations,
max_electron_sim_time; ion_dt=dt)

# Update `fvec_out.electron_ppar` with the new electron pressure
begin_r_z_region()
fvec_out_electron_ppar = fvec_out.electron_ppar
moments_electron_ppar = moments.electron.ppar
@loop_r_z ir iz begin
fvec_out_electron_ppar[iz,ir] = moments_electron_ppar[iz,ir]
end

success = (electron_success == "")

elseif advance.electron_conduction
success = implicit_braginskii_conduction!(fvec_out, fvec_in, moments, z, r, dt,
z_spectral, composition, collisions,
Expand Down

0 comments on commit a6bdda9

Please sign in to comment.