# How to simulate an empty initial volume in Simulink - Thermal Liquid Library ?

5 views (last 30 days)
Edouard Sergent on 16 Feb 2016
Commented: Sebastian Castro on 19 Feb 2016
Hello everyone,
I am currently working on a project in which I need to simulate an empty volume at the beginning of the simulation. Here are the specifications:
- The source is a 10 bars pressure source
- I have a restriction which limits the flow rate to 280 mL/min.
I want to fill a volume of 25 mL which is at the atmospheric pressure at the beginning. This volume is closed so the pressure will increase over time. When the volume is completely filled (Flow=0mL/min and Pressure=10bars), I need to wait for a given time (some seconds) and then, a valve after this volume is open so the water will flow and the flow rate will tend to 280 mL/min.
I tried to use a pipe with a volume of 25 mL but I came to the conclusion that there was already water inside the pipe. Indeed, the pressure increases until 10 bars in only 0.04 seconds. In reality, it should take 5.4 seconds (25/280*60).
Do you know how I could solve this problem ? Thank you very much for your help !
Edouard

Sebastian Castro on 18 Feb 2016
Edited: Sebastian Castro on 18 Feb 2016
It's not easy to model an empty thermal liquid container with the built-in blocks, and would likely require some serious customization.
What I would recommend is using a Translational Mechanical Converter (TL) block, which is essentially an ideal piston-cylinder assembly. You can then hook up a Translational Hard Stop block on the mechanical side so that the travel is limited to a volume of 25 mL (or a displacement of 25 mL / cross-sectional area).
What you'd have to look out for here is:
• You will have to tune the hard stop spring/damper coefficients so you don't get any oscillations/penetration of the hard stop that you don't want.
• Because the hard stop is a force source, you will also need a Mass block on the Mechanical side to honor our friend Newton ( F = ma ).
- Sebastian

Edouard Sergent on 19 Feb 2016
Thank you very much, I will try this Week end and let you know !
I would like to ask you an other question about the model of an inductor heater. I am using a Pipe to model it but I am not able to make it works properly ...
I have a cylinder with these dimensions ( Length = 150 mm, Diameter = 8 mm, Volume = 8 mL). Inside this cylinder, there is a metal plate with these dimensions ( Length = 150 mm, Width = 8 mm, Thickness = 0.1 mm). Around the cylinder, there is an inductor which heats the plate. The power transmits by the inductor is between 0 and 3000 W.
At the inlet of the cylinder, there is water at the temperature of 20°C. After passing through this cylinder, the water is heated by the plate and the outlet temperature depends on the power.
After making some experiments, I know exactly the power which is transmitted to the water for a given voltage. But my problem is, for the pipe, I need to provide a Temperature for the port "W". What I would like to do is just to provide a power transmitted to the water ...
I looked at the source code to find a way to solve it but with no success. The flux transmitted created by the wall is defined by this equation :
h_W = k / Dh * Nu;
Phi_W == h_W * (4 * area / Dh) * length * (W.T - T);
What I just tried is to fix the value of Nu to 4.36 for example. Thus I can calculate the value of h_W. Then, as I know the power I want to transmit to the water (Phi_W), I juste solve the previous equation to know the temperature to apply at the port "W".
W.T = Phi_W / (h_W * (4 * area / Dh) * length) + T;
But in practice it doesn't work. If I change the value of Nu, the system does not behave the same whereas it should ... Do you know how I could model the system more properly ?
Thank you again for you help.
Sebastian Castro on 19 Feb 2016
You should be able to connect an Ideal Heat Flow Source block directly to the thermal port in the pipe.
The units for heat flow are J/s, also known as Watts, so this should work.
- Sebastian