I'm using the simscape block "fuel cell stack", I get an error in 'Fuel_Cell/Fuel Cell Stack/Mode​l/Continuo​us//Detail​ed/Subsyst​em1/MATLAB Function4' (line 7)

21 views (last 30 days)
  2 Comments
Manish
Manish on 28 Nov 2024
Hi,
I tested the model you provided, and it appears that the error occurs when the input current for 'calculateUtilization' is negative.
In all other cases, it seems to be functioning correctly.

Sign in to comment.

Answers (1)

Divyam
Divyam on 9 Dec 2024
It appears that the inputs to the "calculateUtilization" function are failing certain assertions when running your model. Although there is no mention of these assertions in the documentation, it can be assumed that the following conditions need to be met to ensure that fuel utilization is appropriately calculated for the fuel cell:
Check the inputs to the "calculateUtilization" function and ensure that any inputs that violate the above assertions are adjusted to satisfy these conditions. I have personally observed that when the volumetric flow rate of fuel is too low, the fuel utilization increases beyond the maximum value of 1 and breaks other checks placed in the model.
If the issue you are facing persists even after ensuring that all the assertions are satisfied, I highly recommend exploring the use of the fuel cell block in Simscape -> Electrical -> Sources for your modeling needs rather than the Specialized Power System blockset, as there is more documentation and support available for these libraries.
To check out the Simscape Electrical resources for modeling, refer to this documentation: https://www.mathworks.com/help/sps/index.html

Categories

Find more on Electrical Sensors in Help Center and File Exchange

Products


Release

R2024b

Community Treasure Hunt

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

Start Hunting!