Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

c .exe of a differential Equation 'HARD ONE'

Status
Not open for further replies.

saintone1

Technical User
Feb 19, 2002
10
IE
Hi,
I have the following problem. I need to make a .exe in c, for the following differential equation.

dh(t) = -c/2gh(t) + 1
----- --------- ------u(t)
dt A(h(t)) A(h(t))

on the first line the / in -c/2gh(t) represents a square root over 2gh(t).

This differential equation represents a surge tank, and the problem is, that i need to have a .exe, to link in to a visual basic program, that will then show results if the flow into the tank changes etc.

The following information is necessary:
where u(t) is the input flow (control input). h(t) is the liquid level (output of plant). A(h(t)) is the cross-sectioanl area of the tank. g = 9.8m/sec squared. c = 1, known cross-sectional area of the output pipe. let r(t) be the desired level of the liquid in the tank ( the reference input)

I know this is a difficult problem, that is why i am hoping some one can help me. My email address is code@josephquinn.com, and i will be postiing the full problem on my website soon.

Thanks,
Joseph Quinn
 
Sounds as if you need a differential flow transmitter
instead of an ".exe" Hardware not Software.
 
I recommend that you use a runge-kutta 4th order. It is very standard and can be found in a numerical methods book. It can be implemented in less than ten lines of code.

Brudnakm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top