-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fokker Planck optional features #225
Conversation
…ollision operator only (or any diffusion operator that has no flux at vperp = 0 -- so not the numerical vperp diffusion at present -- where zero boundary conditions are imposed at vperp = L but no condition is imposed at vperp = 0. Initial short tests suggests that Maxwellian relaxation problems might run successfully without the regularity conditions -TBC.
… of existing functionality.
…serving_corrections" in the Fokker Planck input namelist.
dfdvperp_and_conserving_experiment_plots.zip
The results are (note that Sdot is not positive definite)
Overall this justifies the use of ad-hoc conservation terms for long-term stability, and raises the question of whether we need to use |
…ng dF/dvperp = 0. Simulation shows reasonable behaviour with density preserved and thermal speed hitting a steady-state value near 0.15, which is held for multiple collision times. Ti/Talpha = 1/40 was chosen to reduce strain on resolution.
…for other parameters and no underscore being used in the examples files, so remove it in the source for consistency.
Further tests with the cross-collision operator looking at the effect of imposing
These results suggest that
|
…ng without self collisions is much faster.
Two new test cases demonstrating the success of the
|
…pport laplacian_derivative!() for chebyshev points with direct differentiation calculation.
…especially associated with the Chebyshev pseudospectral method, which does not show good convergence even at large ngrid. The finite-element GaussLegendre method shows much better behaviour.
Tests showing that using
Tests of the |
…tests can be executed.
…rms in vpa and vperp, for testing of the compatibility of the pseudospectral and the finite-element methods for advection and collisons, respectively. The option is chosen by selecting the [geometry] option = "0D-Spitzer-test", and picking fixed constant values of Ez, dBdr, Er, and dBdr. The vperp_advection!() routine must update the z_advect and r_advect structs if nr == 1 and nz == 1 and the "0D-Spitzer-test" option is being used, leading to some duplication of code. This could be avoided if the speed updates happened outside the function where the advection terms are computed.
…ker-Planck time evolution. In this mode of operation, boundary conditions on the fluxes are imposed through the assembly of the finite-element method, and no additional zero-ing of the distribution function is carried out. Initial tests suggest that this mode of operation is at least as good as other tested options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whether or not to refactor
vperp_bc = "zero"
functionality to NOT imposedFdvperp = 0
.
I think this sounds like a good idea - switch so that the default vperp_bc = "zero"
does not impose dFdverp = 0
and the option that does impose it has a different name ("zero-impose-regularity"
maybe? I'd leave it up to @mrhardman to pick a good name).
makie_post_processing/makie_post_processing/src/shared_utils.jl
Outdated
Show resolved
Hide resolved
makie_post_processing/makie_post_processing/src/shared_utils.jl
Outdated
Show resolved
Hide resolved
…. Expect tests to fail associated with GaussLegendre grids, reason unknown.
Co-authored-by: John Omotani <[email protected]>
Co-authored-by: John Omotani <[email protected]>
Co-authored-by: John Omotani <[email protected]>
Co-authored-by: John Omotani <[email protected]>
Co-authored-by: John Omotani <[email protected]>
Co-authored-by: John Omotani <[email protected]>
@johnomotani I think that the Assumed problem commit: 3cff3eb EDIT: by making the dirichlet_bc option leave the lower endpoint of vperp alone, I can make my tests pass. However, I still would like some clarification on how these matrices are being used, as the boundary conditions should only be applied if K and L are being inverted. I don't expect this is the default. In my opinion, new matrices for inverting would be a better option. |
…pose bc on lower endpoint of a cylindrical coordinate.
…m/mabarnes/moment_kinetics into fokker-planck-vperp-bc-experiment
…ro" now implies that zeros are imposed at the ends of the domain, "zero-impose-regularity" imposes dFdvperp = 0 at vperp = 0.
Tests using commit 8bff6a5:
|
@mrhardman I think I must've added that 'feature' to make matrices including the boundary condition that I could invert for preconditioning some implicit solves. I think I'll end up adding together several of these matrices, and modifying the result to impose Dirichlet bc anway, so I think the 'Dirichlet-bc-in-the-matrix' can be removed. If it's useful I think you're right and having separate matrices would be the right thing to do. |
How would you like to proceed? Should I revert the commits that made this feature, or do you want to deal with this in a new PR where you look at the implicit solves? EDIT: Or I could just make a new commit changing the default, and let you add new matrices at a later date. |
Yeah, that sounds good! |
… solve with K and L matrices is suppressed (but can be revived in a custom script with the dirichlet_bc=true optional argument in setup_gausslegendre_pseudospectral()).
@johnomotani Happy for the merge to go ahead now providing the last commit passes the tests. |
…ymbolics package.
Pull request permitting simulations with additional collision model (numerical method) options. Based on #224, consider merging #224 first.
dFdvperp = 0
regularity condition. Setvperp_bc = "zero-no-regularity"
to access this feature.use_conserving_corrections = false
to access this feature.By default we set
vperp_bc = "zero"
anduse_conserving_corrections = true
.A check-in test is provided for
vperp_bc = "zero-no-regularity"
. Additional experience is required to determine if this option is reliable for general simulations.Decisions/Actions required:
vperp_bc = "zero"
functionality to NOT imposedFdvperp = 0
. @johnomotani @mabarnes @LucasMontoya4 opinions?dFdvperp = 0
.dFdvperp = 0
.