Documentation

Model a Thermal Liquid Pipeline

Model Overview

This tutorial shows how to model a pump-driven thermal liquid pipeline. The pipeline system comprises a pump, a pipe, and two thermal liquid reservoirs. The pump provides power generation and the pipe fluid transport between the reservoirs. The reservoirs provide the pressure and temperature boundary conditions for the pipeline system.

Thermal Liquid Pipeline Schematic

The reservoir conditions are fixed at room temperature and atmospheric pressure. The outer pipe surface temperature is fixed at a temperature of 275 K. The pipe fluid volume is initially at room temperature but, through the combined effects of viscous heating and conductive cooling, gradually shifts toward a new steady-state value determined by system dynamics.

The thermal resistance of the pipe is the result of convective and conductive individual resistances. A Pipe (TL) block models the convective thermal resistance at the inner pipe surface and the viscous heating in the thermal liquid. A Conductive Heat Transfer block models the conductive thermal resistance between the inner and outer pipe surfaces.

Pipe Thermal Resistances

Start a New Model

  1. At the MATLAB® command prompt, enter ssc_new. MATLAB opens the Simscape™ model template. This template provides a starting point for your Simscape Fluids™ model. Save the model often as you add new blocks.

  2. From the Simscape Foundation > Thermal Liquid > Utilities library, drag a Thermal Liquid Settings (TL) block to the model canvas. This block defines the physical properties of the thermal liquid, including its viscosity, thermal conductivity, and bulk modulus.

  3. Connect the Solver Configuration and Thermal Liquid Settings (TL) blocks as shown in the figure. The Solver Configuration block provides Simscape solver settings for your model. Each topologically distinct physical network requires one such block.

Model the Pipeline

  1. From the Simscape Foundation > Thermal Liquid > Elements library, drag two Reservoir (TL) blocks. The reservoir blocks set the pressure and temperature boundary conditions for the pipeline model.

  2. From the Simscape Fluids > Thermal Liquid library drag these blocks.

    Block Library
    Pipe (TL)Pipes & Fittings
    Fixed-Displacement Pump (TL)Pumps & Motors

    The pipe block provides a conduit for thermal liquid transport between the reservoirs. The pump block provides a power source to generate a positive mass flow rate through the pipe.

  3. Connect the blocks as shown in the figure. The left reservoir serves as a thermal liquid source. The right reservoir serves as a thermal liquid sink.

    The component colors indicate the physical domains they represent—yellow for Thermal Liquid, orange for Thermal, and green for Mechanical Rotational. The pump and pipe blocks are multidomain blocks that you can use to interface different physical domains.

  4. In the Pipe (TL) block, set the Pipe length parameter to 1000 m. This length makes more evident the thermal liquid heating due to viscous friction losses.

Model the Thermal Conduction

  1. From the Simscape Foundation library, drag these blocks.

    BlockLibrary
    Conductive Heat TransferThermal > Thermal Elements
    Thermal ReferenceThermal > Thermal Elements
    Temperature SourceThermal > Thermal Sources

    The heat transfer block models the conductive heat losses through the pipe wall to the surrounding environment. The ideal temperature source sets the environment temperature through a physical signal input. The thermal reference block provides a reference against which to specify the temperature physical signal input.

  2. From the Simscape > Foundation library, drag a PS Constant block. This block enables you to specify the numerical value of the environment temperature.

  3. Connect the blocks as shown in the figure. The new blocks representing the conductive heat losses belong to the Simscape thermal domain and connect only to thermal conserving ports.

  4. In the PS Constant block dialog box, set the Constant parameter to 275. This value is the environment temperature in the default temperature units of Kelvin.

  5. In the Conductive Heat Transfer block, set the Area parameter to pi*0.1128*1000. This expression gives the pipe surface area in terms of the pipe hydraulic diameter (0.1128 m) and length (1000 m). The default Thermal conductivity value is that of copper, a highly conductive metal.

Model the Pump Torque

  1. From the Simscape Foundation library, drag these blocks.

    BlockLibrary
    Ideal Torque SourceMechanical > Rotational Sources
    Mechanical Rotational ReferenceMechanical > Rotational Elements

    The ideal torque source block sets the pump driving torque through a physical signal input. The Mechanical Rotational reference block provides a reference against which to specify the torque physical signal input.

  2. From the Simscape > Utilities library, drag a PS Constant block. This block specifies the numerical value of the pump torque.

  3. Connect the blocks as shown in the figure. The new blocks representing the pump power source belong to the Mechanical Rotational domain and connect only to Mechanical Rotational conserving ports.

    Port R of the pump block represents the rotating shaft and connects to the ideal torque source block. Port C represents the pump casing and connects to the mechanical rotational reference.

  4. In the PS Constant block dialog box, set the Constant parameter to 50. This value specifies the pump torque in the default torque units of N*m.

Add Thermal Liquid Sensors

  1. Drag these blocks to the model.

    BlockLibrary
    Mass & Energy Flow Rate Sensor (TL)Simscape Foundation > Thermal Liquid > Sensors
    PS-Simulink ConverterSimscape > Utilities
    ScopeSimulink > Sinks

    The sensor block measures the Through variables of the Thermal Liquid domain and outputs them as physical signals. The converter block transforms the physical signal into a Simulink® signal for plotting in a Scope block.

  2. Connect the blocks as shown in the figure. Arrange the sensor block so that both of its conserving ports connect to the Thermal Liquid branch being probed. The sensor output is the measured flow rate in the direction of port A to port B.

  3. Drag these blocks to the model.

    BlockLibrary
    Pressure & Temperature Sensor (TL)Simscape Foundation > Thermal Liquid > Sensors
    Absolute Reference (TL)Simscape Foundation > Thermal Liquid > Elements
    PS-Simulink ConverterSimscape > Utilities
    ScopeSimulink > Sinks

    The sensor block measures the Across variables of the Thermal Liquid domain and outputs them as physical signals. The converter block transforms the physical signal into a Simulink signal for plotting in a Scope block.

  4. Connect the blocks as shown in the figure. Arrange the sensor block so that one conserving port connects to the Thermal Liquid branch being probed and the other to a known pressure and temperature reference, such as that provided by an Absolute Reference (TL) block. The sensor output is the difference between the measured and reference quantities, taken from port A to port B.

Simulate the Pipeline Model

The Simscape model template specifies suitable solver settings for this model. Run the simulation, for example, by clicking the button in the Simulink toolstrip. Open the mass flow rate Scope block. The plot shows a gradual change in flow rate as the thermal liquid transitions from a state of rest to a new steady-state velocity.

The time scale for temperature changes is substantially greater than the 10-second simulation time. To see the new steady-state temperature, change the simulation stop time to 200 s. Then, simulate the model and open the temperature Scope block. The plot shows the gradual cooling at the pipe outlet as the thermal liquid transitions to a new steady-state temperature.

Experiment with the block settings and input signals. Try setting the Pipe (TL) block Fluid inertia parameter to On. The figure shows the combined effects of fluid dynamic compressibility and fluid inertia on the mass flow rate plot. The simulation stop time is 10 seconds for this plot.

Was this topic helpful?