I reviewed the model you shared and was able to replicate the error you encountered. The error indicates that Simscape could not find a set of initial conditions that meet the constraints you have set. This occurs often due to conflicting blocks being placed in the same Simscape circuit.
Upon further investigation, I noticed that you have placed a “Pressure Source (TL)” and a “Flow Rate Source (TL)” in series. According to the documentation for these blocks (https://www.mathworks.com/help/simscape/ref/pressuresourcetl.html and https://www.mathworks.com/help/simscape/ref/flowratesourcetl.html), the following points are highlighted:
- The “Flow Rate Source (TL)” block imposes a specified flow rate, regardless of the pressure difference across it.
- The “Pressure Source (TL)” block imposes a specified pressure difference, regardless of the flow rate through it.
These statements are contradictory, creating conflicts when trying to establish initial conditions, as each source attempts to impose its own condition on the system. In a physical system, you would typically not place a flow rate source and a pressure source directly in series without some form of resistance or compliance, such as a pipe or valve, to balance the system.
To model your system in Simscape, ensure there is a component between the two sources that can accommodate the imposed conditions. This could be a pipe, valve, or another element that allows for interaction between the specified flow rate and pressure. Alternatively, you could opt to use only one of the two sources - either pressure or flow rate and adjust the values of the other components in the Simscape circuit to achieve the desired flow rate or pressure.
I hope this helps answer your question.