LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hOW CAN I MODEL A TANK IN LABVIEW

Solved!
Go to solution

Your question is a bit beyond of what this forum is supposed to answer. Actually, this can be considered a lecture in school for signal and systems, since it would require a bit of differential equations concept and physics background.

 

However, just to provide you with a bit of context and initial ideas on this process, the first concept you have to know to model a tank is the Conservation of Mass, Energy and Momentum. Since in a tank, you do not have any heating elements or it is not really moving around, then for a simple tank, this means that whatever quantity of mass goes inside a inside a "defined region", it will leave the region or it will accumulate inside the region. In mathematical terms:

 

variation of change in mass inside the tank = inlet mass flow - outlet mass flow

 

or using differential equation notation:

 

dm/dt = mqi - mqo

 

and then, for a generic tank, the variation of mass is defined by the internal volume of the tank and the density of fluid: 

m = Rho.V

or for a "prismatic" tank, the volume is the Area (A) multiplied by height (h):

m = Rho.A.h

and, finally, the variation of mass over time since density and area would not change over time should be:

dm/dt = Rho.A dh/dt

And for the inflow and outflow of mass, it is also the density multiplied by the inlet and outlet flows:

mqi = Rho. Qi 

mqo = Rho. Qo 

and putting all together:

Rho.A.dh/dt = Rho.Qi - Rho.Qo

and supposing that density doesn't change in the system, then you can write:

A.dh/dt = Qi - Qo

dh/dt = 1/A (Qi - Qo)

 

And if use a free-flow Orifice as "output" of the tank, then the 

Qo = Cv. sqrt (h)

 

And if you want to implement that using LabVIEW Control and Simulation Module, you can easily "solve" the differential equation by "integrating" the dh/dt and, just to make the system "realistic", you need to limit the height between a small value and the maximum height (tank overflows and was not modelled):

 

tank.PNG

 

There is tons of information on the web. Here are some:

 

http://my.chemeng.queensu.ca/courses/CHEE319/documents/CHEE319_notes_2012_lecture2.pdf

http://www.iiis.org/cds2008/cd2008sci/ccct2008/paperspdf/t631fj.pdf

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 11 of 12
(1,176 Views)

You might find this useful

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 12 of 12
(1,164 Views)