|
I am using Simscape to solve for the steady state of a thermal system (Brayton cycle). This is being done as proof of concept so that I can do some detailed thermal analysis in the future. I have created a domain in which mass flow is a through variable and temperature and pressure are across variables. Performance curves for the compressor and turbine are available in the form of quadratic curve fit relationships. In simscape, I have the equation:
input power [kw] == 1020-.383*outlet_pressure[Pa] + .00513*(outlet pressure)[Pa])^2
for an input pressure and temperature of 101kPa and 25 C.
The steady state solution for the system is known (solved outside of Simscape) and the input power is 1530 kw, which yeilds outlet pressure solutions of -280kPa and 355kPa. The compressor performance curve is only valid for discharge pressures of 175 to 490kPa, but I haven't found a way to work this into the simscape component equation. as a result, the simulation runs and solves for the wrong root of the quadratic equation above, causing the simulation to fail to converge.
Do you know of any way that I can set an interval over which to search for solutions to a quadratic equation in a Simscape component file? Do you have any other suggestions for how to ensure that my simulation always picks the solution that I need when solving equations with multiple solutions?
|