-
Notifications
You must be signed in to change notification settings - Fork 990
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
Add an SDE solver using the "LogWright" function #1856
Labels
Milestone
Comments
@kandersolar Oh I fondly recall my brief interaction with Ken Roberts. I'm glad he and others have been able to develop his idea, and I didn't know it has apparently been extended to 2-diode models. It seems like the LogWright function could be a good addition to scipy's special functions, perhaps alongside https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.wrightomega.html#scipy.special.wrightomega |
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
The
lambertw
method has to take some pains to appropriately handle numerical overflow in an intermediate calculation.Describe the solution you'd like
An implementation of [1,2], which reformulates the SDE so that it uses a different form of the Lambert W function and does not require calculating such large intermediate values.
Additionally, according to [3] and also my own brief testing, it is also computationally faster than the
lambertw
method.Additional context
[1] "On Calculating the Current-Voltage Characteristic of Multi-Diode Models for Organic Solar Cells": https://arxiv.org/abs/1601.02679
[2] "A Robust Approximation to a Lambert-Type Function": https://arxiv.org/abs/1504.01964
[3] "Solar Cells, Lambert W and the LogWright Functions": https://arxiv.org/abs/2307.08099
(I notice also that @markcampanelli is mentioned in the acknowledgements of [2])
Here is a rough implementation of the method, which I observe to be 2x faster than$\pm$ 1e-10 of its output.
_lambertw_v_from_i
while staying withinThe text was updated successfully, but these errors were encountered: