Hauptinhalt

Partially Filled Pipe

R2026b

This example shows the Partially Filled Pipe (IL) block used to model the emptying and filling of a tank in multiple configurations. The block represents an arbitrarily full pipe in an isothermal liquid network. The block assumes that port A is higher than port B. The physical signal input AL indicates the relative liquid level of the block that is connected to port A. When the signal AL is less than or equal to 0, the block assumes there is no liquid is entering port A.

Basic Configuration

This model shows basic use of the partially filled pipe. The partially filled pipe block relies on a physical input AL to determine if port A is exposed or submerged. In this model the liquid level (port L) of the attached tank is attached directly to AL. Because the inlet of the tank is set to 0 m, port A of the partially filled pipe will only become exposed when the tank is completely empty. Alternate methods of connecting AL to the upstream blocks can be explored in the Y Configuration model.

open_system('PartiallyFilledPipe')

This scenario models a single pipe emptying. The partially filled pipe and the attached tank start full, and empty over the course of the simulation.

initial_pipe_liquid_level = 10;       % Initial liquid level of pipe (m)
initial_tank_liquid_level = 1;        % Initial liquid level of tank (m)
pReservoir = 0.10135;                 % Reservoir pressure (MPa)
open_system('PartiallyFilledPipe/Liquid levels (m)')

sim('PartiallyFilledPipe');

The results show that the tank completely empties before the pipe starts to empty.

This scenario shows a single pipe filling. The partially filled pipe and the attached tank are filled due to pressurization of the attached reservoir.

initial_pipe_liquid_level = 0;       % Initial liquid level of pipe (m)
initial_tank_liquid_level = 0;       % Initial liquid level of tank (m)
pReservoir = 0.2;                    % Reservoir pressure (MPa)
sim('PartiallyFilledPipe');

The results show that the pipe completely fills before the tank starts filling.

Y Configuration Model

This model demonstrates a more complex configuration which uses three Partially Filled Pipe (IL) blocks arranged in a Y configuration.

open_system('PartiallyFilledPipeY')

This scenario shows the tanks emptying simultaneously. The model demonstrates the use of a partially filled pipe with two incoming flows.

tank1_inlet_height = 0.1; % Tank 1 inlet height (m)
tank2_inlet_height = 0.1; % Tank 2 inlet height (m)
tank1_initial_liquid_level = 1; % Tank 1 initial height (m)
tank2_initial_liquid_level = 1; % Tank 2 initial height (m)
pReservoir = 0.101325; % Reservoir pressure (MPa)
open_system('PartiallyFilledPipeY/Scope')

sim('PartiallyFilledPipeY');

The results show that the tanks empty at the same time, then the two upper pipes empty. The lower pipe does not empty until the above tanks and pipes are empty.

This scenario shows the model with tank 1 at an initial liquid level higher than tank 2. Because tank 2 has a lower initial liquid level, the corresponding pipe 2 empties before tank 1 and pipe 1. The lower pipe 3 does not start to empty until all above pipes and tanks are completely empty. The PS Max block ensures that pipe 3 remains submerged until both pipes 1 and 2 are emptied.

tank1_inlet_height = 0.1;   % Tank 1 inlet height (m)
tank2_inlet_height = 0.1;   % Tank 2 inlet height (m)

tank1_initial_liquid_level = 1;   % Tank 1 initial height (m)
tank2_initial_liquid_level = 0.5; % Tank 2 initial height (m)
pReservoir = 0.101325; % Reservoir pressure (MPa)

sim('PartiallyFilledPipeY');

The results show that tank 2 and pipe 2 empty before tank 1 and pipe 1, respectively.

This scenario shows the model with tank 1 inlet lower than tank 2. This configuration has pipe 2 empty before pipe 1, which is caused by the tank 2 inlet being higher than the tank 1 inlet, rather than the tank 1 initial liquid level being lower. The PS Subtract block subtracts the inlet height from the liquid level of the tank to ensure that pipe starts emptying once the liquid level falls below the level of the inlet.

tank1_inlet_height = 0.1;   % Tank 1 inlet height (m)
tank2_inlet_height = 0.5;   % Tank 2 inlet height (m)

tank1_initial_liquid_level = 1;   % Tank 1 initial height (m)
tank2_initial_liquid_level = 1;   % Tank 2 initial height (m)

pReservoir = 0.101325; % Reservoir pressure (MPa)

sim('PartiallyFilledPipeY');

The results show that tank 2 levels off and stops draining at 0.5 meters because the liquid has fallen below the height of the inlet and there are no more inlets for the liquid to drain out.

See Also

Topics