Effacer les filtres
Effacer les filtres

Does anyone know why I get an error when I run the fuel cell model for about 18000s?

5 vues (au cours des 30 derniers jours)
I dont know how I can fix this error, I changed the max and min step size but error remained the same, also I changed the solver tolerance but nothing happened.

Réponses (3)

Steve Miller
Steve Miller le 21 Déc 2023
The error message you encountered is because the test conditions for the fuel cell are not suitable for 18000 seconds. The drive cycle is only defined for 2500 seconds, so increasing the stop time can lead to unexpected system inputs as extrapolation is used beyond 2500 seconds. Simply switching to the other input options (ramp, step) which are well-defined after 2500 seconds will eventually lead to the fuel cell exceeding other physical limits (too much heat, etc.).
If you follow these steps, the simulation will run for 18000 seconds:
  1. Switch to Step input.
  2. Multiply the Final Value by 0.1 (lower current demand)
  3. Set Stop Time to 18000 seconds

Andreas Goser
Andreas Goser le 11 Déc 2023
It seems you are leveraging a MathWorks example. Please let us know which release you are using an which operating system, that might be helpful. Other than that, I suppose the example itself runs and then you make modifications and then it terminates? The it would be helpgful to describe the change.

Hamidreza le 11 Déc 2023
Thank you Andreas,
I am using R2023b in Windows.
If I got your comment correctly, I should say, this example works for 2500s correctly, but for longer periods it fails to converge, based on my calculation I need 18000s to produce the desired amount of electricity but I get an error. please note that I only change the stop time from 2500 to 18000s.
  2 commentaires
Andreas Goser
Andreas Goser le 11 Déc 2023
I could reproduce the behaviour by running the example in Simukink Online and just increasing the stop time.
Moving forward, I wonder what your overall goal is. Surely, we could identify the author(s) of the example and ask about the reason for the error or why the example is not supposed to work beyond 2500s, but maybe this is not a good use of everyone's time. Can you elaborate a bit on your overall goal? Are you currently learning to use some of MathWorks products without a specifc project? Or is this example supposed to be the starting point of a thesis?
Hamidreza le 12 Déc 2023
Based on my mathematical calculation and according to the fuel cell catalogue that we have on which my thesis is based on, I need to run the model for 5hr (18000s) to produce the desired amount of electricity that I need.
As far as I understood the problem might be related to a technical issue (choking occurred in the restriction area of the pressure-reducing valve) occuring beyond 2500s, however, I am not sure about it and still working to modify it, the problem is that the model is complicated and some sections are confisuing, so I will be grateful if someone helps me to eliminate this issue and explains me those parts.(especillay the guy who created this model)

Connectez-vous pour commenter.




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by