For general Simscape™ troubleshooting techniques, see Troubleshooting Simulation Errors.
If your model returns an error message that identifies specific model blocks, inspect these blocks for wrong connections or unintended use. For individual blocks, check:
Block Use — Check the block documentation for model adherence to any assumptions and limitations listed. For example, an Ideal Pressure Source block can simulate a pump only when the pressure is constant.
Absolute Variables — Pressure and temperature are absolute values and should always be positive. There are no restrictions on the sign of the change in pressure or the change in temperature of a component. Note that some blocks in the Hydraulic (Isothermal Liquid) library return pressure as gauge values.
Block Parameters — For blocks with a Leakage Area parameter, ensure the parameter has a nonzero value. Isolation of certain parts of the system can occur if a small amount of fluid is not present in all components of the network throughout the simulation.
Dynamic Compressibility — Fluid dynamic compressibility may be relevant for
components with internal volumes if the time constant associated with the component is
much smaller than the time constant associated with system transient events. In the
Isothermal Liquid library, the dynamic compressibility default is
On for blocks that support it.
Scope Measurement — Note that sensors and scopes take measurements at nodes. Nodes do not have internal volumes, and will record variable changes instantaneously. This may be discontinuous with the expected response of a component with an internal volume. Consider inspecting results in the Results Explorer.
Scope Units — Be aware of Scope units when converting between Simulink and Simscape signals. Scopes record the mass flow rate changes in variables without user adjustment, but you may need to apply an affine conversion to variables with absolute values, such as temperature. The default Simscape unit of temperature is Kelvin. For more information on applying affine conversions, see How to Apply Affine Conversion.
Block Connections — Verify that the model makes sense as a system. For example, look for:
Accumulators connected to a pump outlet without check valves.
Actuators connected against each other, causing motion in opposite directions.
Directional valves with a large bypass.
Note that connections between blocks do not represent physical volumes and values are passed along these connections instantaneously.
In the network, check:
Variables — Use the Variable Viewer to inspect variable values, units, and initialization status.
Solver Choice — Verify that you are using the best solver for your model. For thermal systems, conduction in pipes can create a stiff system of differential equations. Adjust the Max step size parameter in the Configuration Parameters dialog box so that each solver iteration can capture the dynamics of your system.
Network Domain — See Select the Working Fluid to verify that your network fluid is appropriate for your application.
Model Fidelity — Maintain the same level of refinement over multiple networks. Avoid mixing ideal and real networks in the same system.
Dry Nodes — If too many quasi-steady components are clustered in your network (such as valves, where calculations only occur at block ports), your model may be at higher risk for dry nodes during simulation. Dry nodes may slow or stop your simulation. You can improve simulation convergence in these scenarios by adding blocks with internal volumes, which add dynamic components that can respond to dynamic shifts in the network. You can check for dry nodes with the Model Advisor by running Check for dry hydraulic nodes in By Product > Simscape. This check will apply only to blocks in the Hydraulic (Isothermal Liquid) domain.
Heat Transfer — In thermal fluid systems, heat can drive flow. Block port sizes can also significantly impact upwind conduction in the network. Check your system for unexpected heat transfer.
Loop Continuity — In the absence of a network ground (see Grounding Rules), closed-loop systems in thermal or two-phase domains may experience baseline drift. This is caused by an imbalance in the mass and energy conservation equations over the network. For example, if only some blocks in your network account for the effect of gravity, your model may experience a gradual temperature rise. If the effect of gravity in this scenario is not relevant to network dynamics, you can set the gravitational acceleration parameter to 0.
It is good practice to build and test models incrementally. Start with simulating an idealized, simplified system and verify that it works as expected. Once verified, change default settings and add complexity incrementally. Use subsystems to capture the model hierarchy and test these subsystems separately before testing the entire model.