Numerical improvements - #232
Draft
daanboer wants to merge 51 commits into
Draft
Conversation
daanboer
force-pushed
the
better-integrals
branch
from
August 28, 2025 09:39
14cc2ac to
99aff01
Compare
Closed
daanboer
force-pushed
the
better-integrals
branch
3 times, most recently
from
December 5, 2025 12:53
9adb19d to
f54e8a1
Compare
janvdijk
reviewed
Feb 7, 2026
janvdijk
reviewed
Feb 7, 2026
janvdijk
reviewed
Feb 7, 2026
daanboer
force-pushed
the
better-integrals
branch
5 times, most recently
from
February 16, 2026 08:25
3728dcc to
a72102a
Compare
daanboer
force-pushed
the
better-integrals
branch
from
March 18, 2026 07:48
14e67df to
20d4839
Compare
The function computes an analytic solution to the u*sig*f collision integrals, assuming sig to be locally linearly dependent on u, and f to the locally exponentially dependent on u.
Adds functions `collision_integral_sink` and `collision_integral_source` that do the piecewise integration of the inelastic source terms.
This function uses the new method of computing the inelastic collision integrals. The solution now requires iteration, hence the new function. The nonconservative terms have been temporarily disabled in `invertLinearMatrix`, to allow for comparison between the two functions.
These functions directly interpolate the given cross section from the raw data (skipping an interpolation onto the grid faces). These functions are a bit more involved, as the cross section grid needs to be taken into account when splitting up the energy domain for integration.
Done to compare the original solution to the solution proposed on this branch. This currently includes growth schemes, ionization, attachment and e-e collisions.
Currently it only computes the mobility in two different ways.
The idea is that using this machinery we can easily build expressions that fold the EEDF with other quantities, while also easily being able to switch between the different interpolating expressions for the EEDF.
These functions use the new iterator/integrator machinery.
The grid iterator sometimes got stuck when integrating the superelastic source on (very) large grids. This is fixed by adding a small epsilon in the lhs of the predicate.
The procedures now use a linear integrator.
The new `InterpolatingIterator` machinery only work for cross sections that start their energy domain at zero energy for now.
Resolves comments by @janvdijk.
daanboer
force-pushed
the
better-integrals
branch
3 times, most recently
from
March 18, 2026 08:25
2b64312 to
d11b667
Compare
Scale new collisional operators by cell widths This is required as the convection diffussion terms are also divided by the cell width.
daanboer
force-pushed
the
better-integrals
branch
from
March 18, 2026 19:00
d11b667 to
922e68c
Compare
Substitution of variables leads to a division by a factor two (not multiplication).
Fixed by adding a larger epsilon in comparison.
daanboer
force-pushed
the
better-integrals
branch
from
March 18, 2026 19:49
44ea5fc to
cb28926
Compare
daanboer
force-pushed
the
better-integrals
branch
from
March 19, 2026 10:50
264ca89 to
393d074
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch aims to implement a multitude of numerical improvements. I have opened this draft PR to track the progress, I might split the PR into multiple smaller PRs later down the line.
Resolves #197
Relates to #205