Simscape Pipe (TL) component questions

I have some questions regarding the built-in Pipe(TL) component:
1. In the source code, what is the purpose of having convection_A and convection_B at the end? Are any calculations performed here?
2. If ports A and B are at different temperatures, and internal energy is a function of temperature, why do ports A and B use the same specific internal energy value (u_I)?
3. Can inlet conditions, such as temperature, be held constant? Ex. The source temperature is 25 degC, can the inlet temperature be held to 25 degC?

 Accepted Answer

(1) The convection_A and convection_B are internal components that contain equations that deal with the upwind scheme for temperature convection at the ports. The equations are packaged in an internal component for convenience as those equations are repeated in most blocks.
The gist of the upwind scheme is that the temperature measured at a node should be equal to the temperature in the upstream direction. Therefore, if the flow enters a block at port A, then the temperature at port A is the temperature of the upstream component connected to port A. If the flow exits a block at port A, then the temperature at port A is the temperature of the fluid in this block. This page has a high level overview of this concept and the equations:
https://www.mathworks.com/help/physmod/hydro/ug/simscape-fluids-numerical-scheme.html
You can also take a look at the equations in the code of the internal component, foundation.thermal_liquid.port_convection
(2) The internal energy at ports A and B are not necessarily equal to u_I. As described in (1), it is only true if the flow leaves the component. If the flow enters the component, the value will be equal to the flow coming out of the upstream block.
(3) You can connect a Reservoir (TL) upstream of the Piep (TL) and specify a temperature of 25 degC. Then fluid leaving the Reservoir (TL) and entering the Pipe (TL) will be at 25 degC

More Answers (0)

Products

Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!