Registered users: Bing [Bot], Google [Bot], Google Adsense [Bot]
 
User Information


Site Menu


Sponsored


Who is online
In total there are 73 users online :: 3 registered, 0 hidden and 70 guests Most users ever online was 218 on Wed Dec 07, 2016 6:58 pm Registered users: Bing [Bot], Google [Bot], Google Adsense [Bot] based on users active over the past 5 minutes 

The Team
Administrators
Global Moderators


Sponsored


High speed pneumatic gun simulationThis is a continuation of the discussion DYI and I were having about high speed simulation.
So, GGDT is known to be inadequate at high speeds. We must make new tools to predict performance in the high speed range. At the moment I'm writing a relatively simple 1D Lagrangian code to predict the performance of high speed pneumatics. The 1D Lagrangian method is described in this book (available there as a PDF) on page 41. I will be doing a number of other things different than GGDT. For example, the valve model will be simpler in a few ways (the actual dynamics of the piston will be ignored for this first code), but better in other respects (the critical pressure ratio for a valve is generally far lower than it is for an orifice, so the typical equation for the critical pressure ratio is very wrong). I actually have slowly been planning out and researching for a more accurate simulation, but I haven't had the free time until spring break.
All spud gun related projects are currently on hold.
Hmm... I wrote a Lagrangian code to simulate a piston compressing some gas. My code works, but it's unstable, even though I'm following the example in the book! As I said, this is not a trivial thing to figure out. I'm taking a class in numerical PDEs at the moment, so I'll ask the professor about it after my spring break is over.
All spud gun related projects are currently on hold.
Good luck to you! Don't want you to think none of us are following this, because I certainly am. I'm very interested in this, after getting a wildly optimistic supersonic prediction out of GGDT myself.
Good luck on getting this done. I'll definitely be interested. I too am looking into some good modeling of high flow valves at high pressure.
I too would be interested. I love to play with GGDT for hours
I don't have the mathematical background to help with the equations, but I sure know how to design an interface and integrate some program code. So if I can help in that matter just let me know. Cheers.
I don't have the programing background to help with interfacing and coding, but I sure know how to make things out of wood!
Need a box to keep your notes in? Seriously good luck with this though.
so many muchness
Thanks for the encouragement. I'd also be happy to take suggestions, but at this stage anything substantial is more likely to be put on the backburner until I figure out the basics.
Also, the page I linked to describes the method I'm using rather well, so if someone does have programming experience and understands calculus, they probably could start implementing their own code. Someone with more free time than I have could make more progress. LeMaudit, I know absolutely nothing about programming interfaces, so if you can help with that, I'd be very appreciative.
All spud gun related projects are currently on hold.
Even better
I'll be glad to.
If you figure some code or pseudocode out of the equations, I can try put then in a little Windows program, GGDT flavoured Gaderelguitarist... I have lots and lots of code... would you like to exchange a few 100ths of code lines for a nice wooden box ?
Last edited by LeMaudit on Fri Mar 25, 2011 1:11 pm, edited 1 time in total.
Btrettel, I looked at the approach you linked me to, and noted some subtle flaws.
What they're doing is essentially a derivation of the conservation equations for an infinitesimal volume moving with the flow, with somewhat less rigour than I'm used to. The derivation seems okay, but upon closer inspection is not tremendously useful. To understand why, consider the physical effect of the time steps. Disturbances will propagate at some speed based upon the size of the disturbance and the local temperature/gas composition (we'll assume the flow to not be chemically reacting for now...). In the numerical implementation, disturbances will propagate at a speed equal to the distance between the two points being considered, divided by the time step. Now think what's happening in a simple 1D launcher: the points nearer to the projectile will spread out significantly, while those near the chamber base will remain (relatively) closely packed. Also to be noted is that the sound speed in those closely packed sections is higher, as they've expanded less and are thus hotter (the pressure has an effect as well, but we'll discount nonideal gas effects for now). The result? With a fixed time step, sound will tend to travel faster in the cooler sections, and slower in the hotter ones, a physically backward scenario. The solution to this problem is, as I mentioned earlier, the generation of an adaptive grid. I've yet to wrap my mind completely around the implementation of it, but it essentially allows, in the constructed computational space, for the finite difference equations to be solved in a uniform grid, with uniform timesteps in such a way that, when it's translated back to the physical space, gives realistic representation of the actual disturbance propagation rates. Unfortunately, my workload here at school is rather high at the moment, and it might be May before I can get this method worked out and implemented... On another note, it is interesting to ponder what a hypothetical analytical solution would look like. Would a speed of sound and accurate propagation rate simply "fall out" of the result due to the inclusion (in the derivation) of sufficient parameters to calculate it? What about the particle speeds in the gas? Would we need to include more information in the derivation before that would happen? Compressible flow is indeed a fascinating puzzle.
Spudfiles' resident expert on all things that sail through the air at improbable speeds, trailing an incandescent wake of ionized air, dissociated polymers and metal oxides.
DYI, the problem you mention is valid for explicit methods, and you are very smart to have picked that out. It's called the CFL condition. It was mentioned in the book on page 50, though not in much detail, and in a manner different from how you thought about it.
There are a number of ways around this problem. One relatively simple one is to adaptively change the grid/cells as you've mentioned. This can be done with the Lagrangian method too, and I don't think it's that hard; I basically already have to do this to implement the mass flow from the valve. This, unfortunately, presents other problems (interpolation errors, loss of resolution, added computation, etc.), so I don't intend to implement it. One approach that avoids this problem completely is the numerical method of characteristics. There is no CFL condition for the MOC. The MOC, unfortunately, is kinda confusing with multiple equations, but if you are interested, I would suggest this book. This sounds like the closest thing to what you want to implement. This method has been used fairly often for interior ballistic simulations (see this book for specifics), but in my opinion, it's a pain when real gas and nonisentropic effects are added (as I want to do). The Lagrangian approach, in contrast, allows for these effects to be added quite easily. See this paper for some details about that. There also is an approach to this problem that I'm looking in to (though not directly; I want stability, and the CFL condition is only one part of that). An implicit method completely avoids this problem because the numerical domain of dependence would be all values. Of course, this comes at a cost; implicit methods are generally much more difficult to implement and require more computation per time step. This is why higherorder accuracy implicit methods are used along with larger time steps. The result is stability and improved accuracy. I do want to implement an implicit method now due to the instability that I'm seeing. The Lagrangian approach seems to be somewhat uncommon compared against the numerical MOC, but the approach has successfully been used for hypersonic gun simulations before. See, for example, this 50 year old technical report from the Naval Ordnance Lab. As for analytical solutions... I've looked for them, but they don't exist unless we define new functions. The MOC and dimensional analysis might offer some insights into how one might define the new functions, but I'm not going to bother looking into that.
All spud gun related projects are currently on hold.
So essentially...it's a very large computer that....makes equations. I can figure math as long as it's about geometry, or some sub genre. I never really decided to try my hand at calculus or other theoretical, seemingly useless methods of mixing numbers to make different ones. One of the beautiful things about being an artist is that Math is not a necessity .
I'm not sure what I would do with coding. Quite frankly, I'm not sure what you would do with a wooden box. Right now I'm working on making a food/alcohol safe wooden tankard. That has many more uses. Thats as far of a tangent (heh...math) as I will go upon. No more distractions.
so many muchness
I am aware of implicit methods and the MoC. The main attraction of the explicit finite difference approach for me is how intuitive the method is, and the good physical intuition for the situation that comes with it.
I may not have quite as much background here as you do, but I'm well acquainted with the CFL condition. Interesting how a result derived for linear PDEs has such applicability and physical meaning for the nonlinear flow equations. What I stated was just a general physical truth about the flows. I also neglected to mention the effect that relative flow velocities have on the propagation, but considering the small differences in this quantity between two adjacent points on a moving grid, this can probably be ignored (or at worst, easily accounted for). I believe I've figured out how to solve the problem with a high degree of accuracy using an explicit finite differencing approach. It's not the most elegant of solutions, but it should work well. I'll report back with my results if I get it working. I'll try to get it running at first on a straight, valveless tube with instant, uniform pressure generation in the chamber and a vacuum in front of the projectile. Much like most of the launchers I build nowadays...
Spudfiles' resident expert on all things that sail through the air at improbable speeds, trailing an incandescent wake of ionized air, dissociated polymers and metal oxides.
 
Who is onlineRegistered users: Bing [Bot], Google [Bot], Google Adsense [Bot] 
