Wolfram Computation Meets Knowledge

Pipe Heating Example

Drag-in ComponentsDefine Fixed Heat Flow Parameters
Define Tank ParametersConnect and Simulate
Define Boundary ParametersAnalyze
Define Pipe Parameters

In this part, filling of a tank using a pipe that heats the fluid flowing through it is modeled.

1.gif

Model to determine the effect of heat addition on the fluid temperature.

Drag-in Components

Create a new model and drag the following components from the Modelica standard library:

Define Tank Parameters

Medium (This parameter cannot be left blank.) Select a fluid from the drop-down menu, e.g. Extension of the standard water package.

Height: Total height of the tank. By default, the initial level of fluid in the tank is set at 0.5 * height of the tank. You can keep the default or change it by going to the Initialization tab and changing the level_start parameter.

crossArea: Define cross-sectional area of the tank.

Ports: This refers to the outlet of the tank to which other components can be connected.

nPorts: In this example, as you want to connect only to the ambient, set the nPorts to 1.

use_portsData: Set use_portsData to true.

portsData: Provide the portsData as a list, which means they need to be specified using curly braces {}. It takes a function as an argument. The function is: Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(). You can open the function (type the name in the search field in the Class Browser) and check the inputs:

3.gif

You can define diameter, height and other parameters. For this example, set the port height to 0 m and diameter to 0.3 m. Use the defaults for zeta_out and zeta_in.. The input to the portsData should look like this: {Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.3, height = 0)}

4.gif

5.gif

Define Boundary Parameters

Medium: Select a fluid from the drop-down menu, e.g. Extension of the standard water package.

nPorts: As the ambient is only connected to the tank, set this value to 1.

m_flow: Provide a value for the mass flow rate.

6.gif

Define Pipe Parameters

Medium (This parameter cannot be left blank.) Select a fluid from the drop-down menu, e.g. Extension of the standard water package.

Length: Total length of the pipe

isCircular: You can choose between circular and non-circular. If isCircular is set to false, then crossArea and perimeter parameters have to be defined. Note that it is assumed that the cross-sectional area is constant throughout the length.

Diameter: Diameter of the circular pipe

Roughness: Roughness of the inner pipe surface. This is a pipe material property, so common materials and their roughness values are listed below:

Define Fixed Heat Flow Parameters

Q_flow: Set a fixed heat flow rate.

9.gif

Connect and Simulate

Connect the components:

10.gif

Provide a simulation time in the Experiment Setup and simulate:

11.gif

Analyze

Plot the temperature and level of the tank. Temperature can be obtained from the heat transfer data: tank.heatTransfer.Ts[1]. Level can be obtained by plotting the level: tank.level.

12.gif

The temperature of the fluid inside the tank increases from 20 °C to about 22 °C after 100 minutes.