Adding An Option for CRANE to Perform Linear Interpolation for EEDF Rates #86
Replies: 4 comments
-
seems like a good addition to me!
…On Thu, May 20, 2021 at 11:13 AM csdechant ***@***.***> wrote:
Just as the title suggested, would it be worth adding an option to CRANE
to perform linear interpolation when using "ZapdosEEDFRate"? I know that
CRANE used to uses linear interpolation and switch to spline (which is
mostly likely best in most situations), but it seems that spline gives poor
results when extrapolating out for large amount of data points. For some of
the validation work, the comparison work had the reaction rates for a
limited range of energies, and spline couldn't handle the extrapolation (it
rates would eventually plummet to zero to high energy, Te ~ 14 eV) . I
modified my CRANE branch to use linear interpolation (
https://github.com/csdechant/crane/tree/LinearInterpolation ), but I only
added the material object and haven't added the option to the CRANE/Zapdos
action.
@keniley1 <https://github.com/keniley1> - Do you think this would be
worth adding the CRANE? I also could just linear extrapolate the data in
Python and feed that to CRANE using spline, but thought the option to
switch between the search types could be helpful later on.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#86>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACOGA4DWTWIG3EV73DKDSDDTOVGLRANCNFSM45HSJKYA>
.
|
Beta Was this translation helpful? Give feedback.
-
Yeah, I also think this would be a good addition. I've actually added a linear interpolation option already for scalar simulations (e.g. using Crane in 0D). I have noticed that splines tend to go crazy sometimes, especially at low energy (I think it's because splines are not guaranteed to preserve monotonicity?) but it never became a major issue so I haven't gotten around to working it in to the Materials system for Zapdos. I think this will be a relatively quick thing to add. I can just add an input parameter to the action:
If that works for you, I'll get on this asap. I can get the update pushed by this weekend. My only concern is the discontinuous derivatives you get with linear interpolations; @lindsayad do you think the AD system struggle with that or not? EDIT: Created an issue for this: |
Beta Was this translation helpful? Give feedback.
-
Only if you try to evaluate the function at a kink!
…On Thu, May 20, 2021 at 2:05 PM Shane Keniley ***@***.***> wrote:
Yeah, I also think this would be a good addition. I've actually added a
linear interpolation option already for scalar simulations (e.g. using
Crane in 0D). I have noticed that splines tend to go crazy sometimes,
especially at low energy (I think it's because splines are not guaranteed
to preserve monotonicity?) but it never became a major issue so I haven't
gotten around to working it in to the Materials system for Zapdos.
I think this will be a relatively quick thing to add. I can just add an
input parameter to the action:
interpolation_type = 'linear'
If that works for you, I'll get on this asap. I can get the update pushed
by this weekend.
My only concern is the discontinuous derivatives you get with linear
interpolations; @lindsayad <https://github.com/lindsayad> do you think
the AD system struggle with that or not?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#86 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACOGA4FYUAQ43KB2HW5HOG3TOV2S3ANCNFSM45HSJKYA>
.
|
Beta Was this translation helpful? Give feedback.
-
As usual, this took approximately 5 times longer than I suggested. @csdechant I submitted a PR to Crane to address your request. lcpp-org/crane#71 Please try it out to make sure it works for you! I only included AD versions so you'll need to use the Once that is merged I'll also submit a PR to update the version of Crane in Zapdos along with a couple tests for the new input parameter. |
Beta Was this translation helpful? Give feedback.
-
Just as the title suggested, would it be worth adding an option to CRANE to perform linear interpolation when using "ZapdosEEDFRate"? I know that CRANE used to uses linear interpolation and switch to spline (which is mostly likely best in most situations), but it seems that spline gives poor results when extrapolating out for large amount of data points. For some of the validation work, the comparison work had the reaction rates for a limited range of energies, and spline couldn't handle the extrapolation (it rates would eventually plummet to zero to high energy, Te ~ 14 eV) . I modified my CRANE branch to use linear interpolation ( https://github.com/csdechant/crane/tree/LinearInterpolation ), but I only added the material object and haven't added the option to the CRANE/Zapdos action.
@keniley1 - Do you think this would be worth adding the CRANE? I also could just linear extrapolate the data in Python and feed that to CRANE using spline, but thought the option to switch between the search types could be helpful later on.
Beta Was this translation helpful? Give feedback.
All reactions