Skip to content
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

Invalid Parametrization #22

Open
gj2002 opened this issue Jul 3, 2022 · 6 comments
Open

Invalid Parametrization #22

gj2002 opened this issue Jul 3, 2022 · 6 comments

Comments

@gj2002
Copy link

gj2002 commented Jul 3, 2022

When Sundials calculates for the consistent initial conditions (CICs), sometimes, it happens so that the parametrization turns out to be invalid and IDA returns an error. What exactly are the parameter constraints to ensure that this error does not appear ie. is it possible to hand-calculate and estimate the parametric conditions to be satisfied?

@lionsimbatoolbox
Copy link
Owner

Hello,

unfortunately for complex systems of DAEs like LIONSIMBA, the computation of CICs is derived numerically as it is extremely complex to identify all of them by hand / analytically.

@gj2002
Copy link
Author

gj2002 commented Jul 4, 2022

Yes, the CICs can be obtained only by numerical methods. I do not wish to calculate the CICs, but derive certain parametric constraints FOR which the CICs would be successfully calculated.

Also, unlike the
Error using idm (IDACalc), yo failed to satisfy constraints

Another set of errors that appear are

Error using idm
Error using ==> IDACalcIC
Newton/Linesearch algorithm failed to converge.

Error using idm
Error using ==> IDACalcIC
The residual routine or the linear setup or solve routine had a recoverable error, but IDACalcIC was unable to recover.

What could be the reasons for the mentioned errors? Are all of these linked to invalid parametrization alone?

What is even more puzzling is that for certain test cases, the code ends up giving an error for one or two and works fine for the others, of the first 4 C Rates (1C,2C,3C,4C).

@lionsimbatoolbox
Copy link
Owner

Yes, that's a parameterization error. The model can't work with generic set of parameters, as some configurations may "break" the equations, by making them either very difficult to be solved, or not solvable at all by the numerical solver.

@Syncro666
Copy link

Syncro666 commented Nov 27, 2022

When I tested the "mainCore function" in the startSimulation.m,I met a problem with function
"status = IDAInit(fct,t0,yy0,yp0,options)". The function "status = idm(mode, fct, t0, yy0, yp0, options) in "IDAInit" can't be identified. Indeed, I can't find an ".m" function named "idm" in the file path "sundials-2.6.2\sundialsTB\idas\idm". There only exists an "idm.c" file in file folder "sundials-2.6.2\sundialsTB\idas\idm". Whether a joint simulation between matlab and c is required? Can you help me to solve this problem? Tks for your help!

@Syncro666
Copy link

what variables are included in the initialState as the input of startSimulation1(t0,tf,initialState,input_density,startParameters)?
Can you give me an example of initialState? Tks very much!

@lionsimbatoolbox
Copy link
Owner

When I tested the "mainCore function" in the startSimulation.m,I met a problem with function
"status = IDAInit(fct,t0,yy0,yp0,options)". The function "status = idm(mode, fct, t0, yy0, yp0, options) in "IDAInit" can't be identified. Indeed, I can't find an ".m" function named "idm" in the file path "sundials-2.6.2\sundialsTB\idas\idm". There only exists an "idm.c" file in file folder "sundials-2.6.2\sundialsTB\idas\idm". Whether a joint simulation between matlab and c is required? Can you help me to solve this problem? Tks for your help!

Based on the description of the error you are getting, it appears to be something related to the setup of the numerical solver (i.e., IDAS). I would suggest to uninstall and re-install Sundials based on the guides proposed on the Wiki.

what variables are included in the initialState as the input of startSimulation1(t0,tf,initialState,input_density,startParameters)?
Can you give me an example of initialState? Tks very much!

You can check in the batteryModel.m file to get more insight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants