Main Content

How to Upgrade Hydraulic Models

To convert your model to the isothermal liquid domain, use the hydraulicToIsothermalLiquid conversion tool. The tool replaces the hydraulic blocks in the model with the equivalent isothermal liquid blocks and tries to preserve the parameter values and connections between the blocks. For detailed information on block replacement, see:

After conversion, the tool saves the converted model under a new name and generates an HTML report that lists any issues encountered during the conversion process. Review the HTML report and manually fix the remaining issues. For more information on conversion messages and suggested action, see Conversion Messages After Converting Hydraulic to Isothermal Liquid Models.

For detailed conversion examples, see hydraulicToIsothermalLiquid. For conversion examples involving Simscape™ Fluids™ blocks, see Upgrading Hydraulics (Isothermal) Models in Simscape Fluids (Simscape Fluids).

The simulation results for the original and the converted model might be slightly different. This difference can be more pronounced at higher pressures. You can use the Simulation Data Inspector to compare the results.

You can convert more than one model at once with the hydraulicToIsothermalLiquid tool. You can also use the tool to convert other types of a block diagram system, such as subsystems or libraries. The conversion tool appends the suffix _converted to the original file names. Use the hydraulicToIsothermalLiquidPostProcess function to restore the original file names and preserve the links between the files in the new domain. For more information, see Upgrading Systems with Enabled Library Links, Model References, and Subsystem References.

Broken Connections and Unconverted Blocks

The tool converts the blocks from the Foundation > Hydraulic library and from the Fluids > Hydraulics (Isothermal) library, which is available with Simscape Fluids. However, the tool does not convert custom blocks with hydraulic ports. The tool also does not convert commented out blocks and referenced subsystems.

The Broken Connections section of the HTML report lists the unconverted blocks in your model. Broken connections result if the tool fails to convert a hydraulic block and then tries to connect it to the successfully converted Isothermal Liquid blocks. In this case, the conversion tool highlights the broken connections in the block diagram. The Broken Connections section of the HTML report contains hyperlinks to the Isothermal Liquid blocks with broken connections and a hyperlink to the Interface (H-IL) block. You can use this block to restore the broken connections.

For information on how to rewrite the underlying source code of custom blocks with hydraulic ports to adapt them to using the isothermal liquid domain, see Upgrading Custom Hydraulic Blocks to Use the Isothermal Liquid Domain.

Improving Numerical Performance

After using the conversion tool, you can further improve the numerical performance by adjusting the model manually:

  • Removing blocks with internal volumes that are only used for numeric robustness. In the hydraulic domain, adding blocks with internal volumes can avoid dry nodes and improve model convergence. Isothermal liquid pipe and actuator blocks account for fluid compressibility by default, which reduces the likelihood of dry nodes and makes the simulation more robust. Removing the additional blocks with internal volumes reduces the number of differential variables in the model and can speed up simulation.

  • Adjusting the Smoothing factor parameter in isothermal liquid valve blocks to a nonzero value. Hydraulic valve blocks do not have a smoothing parameter. After conversion, the conversion tool sets the Smoothing factor parameter to 0, which can introduce zero-crossings and slow down the solver.

  • Setting the Hard stop model parameter to Based on coefficient of restitution in isothermal liquid blocks. This option is not available in the hydraulic domain, and can improve simulation performance. The static contact mode does not require the block to continuously compute the hard stop force when the block is in contact mode.

See Also

| | |

Related Topics