Kedas Posted April 18, 2006 Share Posted April 18, 2006 I have this diff. equation: [math]\frac{dP}{dt}=\frac{Patm}{Volume}\sqrt{\frac{(Pin^2-P^2)}{Kv})}[/math] with Patm, Volume, Kv = constant; P = Tank Outlet Pressure; Pin = Tank Inlet Pressure I would like to have a laplace function of this so I can use it easily in simulink, this way I can put many air tanks behind each other. Isn't there a way to go to a laplace form, skipping the diff. equation problem. Matlab solved the diff. equation in a way I don't like: simplify(dsolve('DP = Patm/Volume*sqrt((Pin^2-P^2)/Kv)','P(0) = Pstart','t')) like this: F=[sin((Patm*t-atan(1/(Pstart^2-Pin^2)*(-Pstart^2+Pin^2)^(1/2)*Pstart)*Kv^(1/2)*Volum................. Matlab gives up when it has to make a laplace of this. any help is appriciated, thanks Link to comment Share on other sites More sharing options...
Kedas Posted April 28, 2006 Author Share Posted April 28, 2006 differential solution: (P(0)=Pstart=0) [math]P=Pin . Sin(\frac{Patm . t}{Volume.\sqrt{Kv}})[/math] Link to comment Share on other sites More sharing options...
woelen Posted April 28, 2006 Share Posted April 28, 2006 As stated in the other thread, are you sure that this equation describes what you want? Besides that, it is not a linear equation, so you cannot derive a Laplace transform. With linear equations you can do so. For finite-order systems, simply replace d/dt by a factor s and you can derive Laplace transforms. When distribution in space needs to be taken into account as well, then the only proper description is a partial differential equation. If this is linear, then you still can find Laplace transforms, but these are not polynomial in s anymore. They contain transcendental functions of s and can be regarded as infinite order lumped systems. A nice example of such a thing is a long coaxial cable with a certain resistance per meter and a certain capacity per meter. One can see this as an infinite chain of RC-combo's switched after each other, with infinitesimal R and C values. This leads to an infinite dimensional linear system, with a trancendental Laplace transfer function. Before proceeding with your problem, first try to find a better model for your tank. If the model is non-linear, but you only use that model around a certain pressure and do not deviate too much from it, then you can derive an approximating linear model, which is valid for a small area around that certain pressure. From that linear model you can derive a Laplace transform. Link to comment Share on other sites More sharing options...
Kedas Posted April 28, 2006 Author Share Posted April 28, 2006 A nice example of such a thing is a long coaxial cable with a certain resistance per meter and a certain capacity per meter. One can see this as an infinite chain of RC-combo's switched after each other' date=' with infinitesimal R and C values. This leads to an infinite dimensional linear system, with a trancendental Laplace transfer function. [/quote'] Thanks This is actually what I'm trying to get to. It's not really a tank but an air pipe where I want to know the pressure when a step is entered at the inlet. This RC-combo analogy is why I try to solve it this way. I'm not gone change the model this is the best fit without making it a very complex formula. Ones I get something I will see how bad or good it matches with reality. Link to comment Share on other sites More sharing options...
woelen Posted April 28, 2006 Share Posted April 28, 2006 Ah, I see the problem. How long is your pipe? If the pipe is very long, then I'm afraid that you cannot do anymore with an ordinary differential equation and that you really have to resort to partial differential equations. Then you need to determine P(l, t), where l is the length along the pipe and t is the time. This differential equation then will contain operators ∂/∂l and d/dt. Have a look at this link. It may help you. http://www.le.ac.uk/eg/ar45/eg7029/eg7029w/node10.html However, be prepared that analytical solutions may become very hard to obtain and you may have to resort to numerical processing. If the pipe is thin, compared to its length, then you can simplify the equations by only using 1 dimension instead of 3 dimensions. Your current model, however, is 0-dimensional, it regards the pipe as a single lumped object without any physical dimensions. That kind of models is very nice for electronics (almost all electronic devices can very well be described by means of lumped physical models) but for mechanical and fluid/gas computations that approach may be too limited. Another approach may be to model the system as a lumped system, together with a time delay. If the lumped system can be described as a linear system, then you can determine a polynomial Laplace transform. The time delay (time needed to flow from one end to the other end) can also be Laplace transformed. It is an exponential of s in the Laplace-domain (i.e. transcendental). Link to comment Share on other sites More sharing options...
Kedas Posted April 29, 2006 Author Share Posted April 29, 2006 This formula for pressure drop seems to be for a stationary situation. Then you need to determine P(l' date=' t), where l is the length along the pipe and t is the time. This differential equation then will contain operators ∂/∂l and d/dt. Have a look at this link. It may help you. http://www.le.ac.uk/eg/ar45/eg7029/eg7029w/node10.html[/quote'] Yes, I know I'm taking a guess with the stationary formula. inertia is already one thing that is not in the formula while it will have some effect. Making it 1 dimentional was the plan and not difficult because you can just add Kv values if you put two elements after each other. making it Kv/L*dl And yes I would better use my time to come up with a solution based on the Navier-Stokes Equations there is a lot more info about it on the internet. I have a trial version of a simulaton package (comsol) that is able to use the Navier-Stokes Equations but I just plan to use that as a reference and work something out for my specific problem in matlab. (I'm trying to figure out how to input such problem in comsol) The real problem is the syncronisation of different pressure switches present on an air pipe while there is an on/off pressure at the inlet. Link to comment Share on other sites More sharing options...
Kedas Posted May 17, 2006 Author Share Posted May 17, 2006 For people interested in the problem some info here: http://www.math.jmu.edu/~jim/compressible.html Link to comment Share on other sites More sharing options...
Tom Mattson Posted May 17, 2006 Share Posted May 17, 2006 The motivation for applying Laplace transforms to differential equations is to turn them into algebraic equations, because the latter are easier to solve. But if you try to take the Laplace transform of the two sides of this differential equation you are going to create more work for yourself, not less. That's because the equation is nonlinear. Fortunately it is separable, so you can straightforwardly solve it by integration. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now