-
Notifications
You must be signed in to change notification settings - Fork 36
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
explicit ODE solver #137
Comments
Dear Hayri, However, VoronoiFVM has built-in impedance calculation support, see examples 150 and 151. It uses frequency domain calculations based on linearization using automatic differentiation. This means for each frequency, we have to perform just one linear solution of a system in complex numbers. |
Thank you Dr. Fuhrmann. I have tried to use the impedance examples, however, in the impedance examples, the steady state solution is obtained by: steadystate = solve(sys). when i try this in my code, it gives an error: "trying to assemble NaN". But the same code works when I use ImplicitEuler() ODE solver. I tried to use the steady state solution obtained from ImplicitEuler(), however, then, in the measurement_derivative, it gives an error: MethodError: no method matching values(::Adjoint{Float64, Vector{Float64}}). measurement_derivative has three input arguments. the argument U0 which is supposed to be my steady state solution does not have the same type with the U0 from steadystate = solve(sys). The typeof(steadystate) is VoronoiFVM.SparseSolutionArray{Float64, Int32}, the type of steady state solution that I obtained from ImplicitEuler(), typeof(U0): Adjoint{Float64, Vector{Float64}}. so, the measurement_derivative gives an error because of the type.. There are different ways to calculate the impedance, however, I was excited to try the impedance calculations embedded in VoronoiFVM... and compare with the other methods. I usually use the method described by Bessler, here: Bessler, W.G., 2007. Rapid impedance modeling via potential step and current relaxation simulations. Journal of The Electrochemical Society, 154(11), p.B1186. |
Ah, basically you identified a bug, I think this can be easily fixed. I am really curious to see the comparison with the Bessler paper. |
For using the solution from the ODE solver you need to reshape it for the system before further use in VoronoiFVM: https://wias-pdelib.github.io/VoronoiFVM.jl/stable/system/#Base.reshape-Tuple%7BAbstractVector,%20VoronoiFVM.AbstractSystem%7D You can als use the built-in implicit Euler by passing e.g, |
Thank you Dr. Fuhrmann. I will implement the new modification. And hopefully be able to compare the Bessler impedance with Impedance embedded inside VoronoiFVM.jl. I will share the results with you. |
Please be aware that for this you will need to update to version 2.2. |
I am able to use different implicit ODE solvers and they works well most of the times with my Solid Oxide Fuel Cell (SOFC) model developed in VoronoiFVM. I would like to simulate the impedance of SOFC. I wanted to try some explicit solvers. I have found that trixi.jl is using RDPK3SpFSAL49() ODE solver. I have tried to use it for VoronoiFVM, however, it did not work.
is it possible to use any explicit ODE solvers in julia differential equations library for voronoifvm?
Thank you
The text was updated successfully, but these errors were encountered: