Full Simulation of Gas Gun Systems

A place for general potato gun questions and discussions.
User avatar
DYI
First Sergeant 5
First Sergeant 5
Antigua & Barbuda
Posts: 2862
Joined: Sat Jul 07, 2007 8:18 pm
Location: Here and there

Wed Mar 04, 2015 3:48 pm

Image

Ooh, pretty pictures.


I think I speak for just about everyone here when I say that I'd like the design of launcher systems to be less of a crapshoot. We have a few narrowly applicable tools like GGDT, HGDT, and GasEq that most people who've been here for a while are probably familiar with (and GALE, which is somewhat more general, but still very limited), but the moment we want to do something more complicated (say, looking at how ignition placement and fuel mix affect performance and barrel pressure in a CLGG) these tools become largely useless. As far as I'm aware, no one here has been doing more in-depth simulation, myself included.

Recently, I've been making an effort to finally learn how to do launcher-related analyses in CFX (although, based on what I've learned, I'll be switching to FLUENT soon). While steady-state flow cases with fixed geometry are nearly trivially easy to do in just about any CFD package, actual modelling of something like a piston valve hybrid or a two stage LGG can be very tricky. I'm not there yet, but I have figured out how to do full 3D simulation for a pneumatic launcher with no air in front of the projectile.

Detailed below are the results of that first analysis. And yes, I know, the geometry shown below does not require a 3D model. 2D axisymmetric would be fine in most cases - and CFX doesn't support it. I also know that the ignition assembly shown in the picture at the top obviously can't be handled in GGDT. This is a qualitative comparison.

The system being simulated was a launcher with the same geometry as Stage1, but a much shorter barrel (40.8cm long), pressurized with hydrogen at 15MPa and room temperature. A real gas (Redlich-Kwong) equation of state was used, and the heat capacity approximated by hydrogen's NASA polynomial. The walls were considered to be smooth and to have a fixed temperature of 293K. The projectile was modeled as a rigid body with a mass of 3g. The model was run (to the extent possible) in GGDT, GALE, and CFX to compare the three methods for this case. As expected, results were similar, as the final speed reached, in the neighbourhood of 800m/s, is much slower than the speed of sound in hydrogen.

GGDT
GGDT does not explicitly consider the chamber geometry due to its 0D nature (it solves a small system of 20 or so ODEs, rather than a PDE system like a 1D or higher solver). As such, the chamber volume was set to be the same as that in the other two models, and with the correct inner diameter. The flow coefficient of the "valve" was varied from 45% to 100%, generating muzzle speeds from 716m/s to 770m/s. The final "barrel pressure" was around 5.8MPa, and the final "chamber pressure" was ~6.5MPa (for the 100% case). It should also be noted that the evacuated barrel was achieved by setting the "altitude" option to 150 000ft.

GALE
GALE does handle actual geometry, although as a q-1D code it cannot directly model wall effects or turbulence. It predicted a muzzle speed of 791m/s, notable for being slightly higher than the GGDT prediction. Although this may seem odd, it all hinges on the internal workings of GGDT, which Dave Hall apparently wants to become a mystery for the ages. The plots below show the final distribution of P(x) and v(x), respectively, when the projectile reaches the muzzle.

Image

Image

The waviness is a numerical artifact which has been found to have negligible effect on the result. If you squint just right it'll look fine :lol:

In the plots above, the barrel starts right at the end of the location where the flow speed is rapidly increasing (and the pressure rapidly decreasing). The x coordinate origin is at the back of the chamber. This will be different in the CFX geometry, due to the presence of the ignition assembly.

What is immediately apparent, apart from the fact that GALE is still in beta, is that GGDT predicts higher pressures in both the chamber and the barrel by nearly 10%. Despite that, the GALE run still predicts a higher velocity. Like I said, mystery for the ages :dontknow:

CFX
Finally, we have the CFX model. While the GGDT run took well under a second and the GALE run took a few minutes, this ran for 9 hours. A 2m long barrel would probably take over 30 hours. Hence the appeal of moving to 2D axisymmetric models in FLUENT, for cases where these are applicable. The video below shows the velocity in the barrel throughout the simulation (don't worry, it gets bigger when you click on it...).

Image

The wall effects are visible here, and the result was very surprising: CFX predicts a speed of 806m/s, higher than either GGDT or GALE!

Image

Velocity as a function of position along the barrel centerline. Obviously the chamber appears truncated due to the ignition assembly on the centerline. The velocity profile through the taper matches VERY well with the GALE result, although there's clearly something different going on at the base of the projectile.

Image

Pressure along the centerline. This does not match as well with the GALE result - the chamber pressure is lower, although that might be due to the ignition assembly. The pressure drop through the transition is also lower, although the pressure at the projectile base is quite similar. The discrepancy is due to the way GALE treats diameter transitions, and may be part of the reason why CFX predicts a higher speed.

It may also be that the lower velocity of the gas near the wall reduces the energy stored as bulk kinetic energy of the gas as compared to GALE's inviscid treatment.

Image

Velocity profile along the barrel cross section 30cm ahead of the projectile start position at the end of the simulation, showing more clearly the decrease in velocity near the wall 11cm behind the projectile. This is much less rapid than I had expected.


This is, of course, just the beginning, but school is catching up with me again, and I doubt I'll get much more done until school is over in April. Next on the list is doing the same thing, but 2D axisymmetric, in FLUENT. Then I'll learn combustion modeling, and do full simulations of Stage1 to attempt to wring some (potentially pretty dramatic) performance improvements from the combustion behaviour (in the same manner as used by firearms - maintaining a moderate base pressure for longer by having the combustion occur on the same timescale as the launch dynamics). The potential here seems tremendous, now that I've had this success.

I'll continue to post in here regarding the progress of my CFD work. If anyone else is interested in trying this out, I'll answer all questions to the best of my ability. If you've done your own CFD work on launcher-related systems, post it here. Anything on the topic is appreciated, as I'd like this thread to become a jumping-off point for members interested in better understanding their creations, and thus becoming better designers.
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.
btrettel
Specialist 3
Specialist 3
United States of America
Posts: 380
Joined: Sun Feb 03, 2008 4:40 pm
Contact:

Sat Mar 07, 2015 6:50 pm

Nice work. What is GALE? I'm assuming it's a code you wrote, but I could be mistaken.

How do the various codes compare against any measurements you've made? This sort of validation is really important if we want to understand how to make better launchers. I think if this comparison was done, you might find that the benefits from full CFD compared against a 1D code are fairly negligible, though I'm not sure.
All spud gun related projects are currently on hold.
User avatar
jrrdw
Moderator
Moderator
United States of America
Posts: 6569
Joined: Wed Nov 16, 2005 5:11 pm
Location: Maryland
Has thanked: 39 times
Been thanked: 22 times
Contact:

Donating Members

Sat Mar 07, 2015 8:46 pm

btrettel wrote:Nice work. What is GALE?
http://geodynamics.org/cig/software/gale/
User avatar
DYI
First Sergeant 5
First Sergeant 5
Antigua & Barbuda
Posts: 2862
Joined: Sat Jul 07, 2007 8:18 pm
Location: Here and there

Sun Mar 08, 2015 12:43 am

Nice work. What is GALE?
GALE is actually a quasi-1D Lagrangian CFD code I wrote last summer. I've never heard of that thing jrrdw posted before. It was designed with the ability to quickly predict the performance of gas guns in mind, including multi-stage guns. It currently does not support chemical kinetics.
How do the various codes compare against any measurements you've made? This sort of validation is really important if we want to understand how to make better launchers. I think if this comparison was done, you might find that the benefits from full CFD compared against a 1D code are fairly negligible, though I'm not sure.
Based on the measurements I've taken, GALE produces results accurate to less than 5% on the velocity for a wide range of launchers, including those where GGDT is dramatically incorrect. Attempting to model hybrids with GALE, using real gas equations of state derived from equilibrium chemistry (an acknowledged kluge) produces results off by as much as 12% on the velocity, which is getting into the range of "unacceptable" for multi-stage systems.

For a pneumatic system whose behaviour is essentially 1D, a 1D code is extremely accurate, and nothing more is necessary. For systems where combustion is involved, or other 2D behaviour is important, a 2D axisymmetric model would be preferred. 3D modelling is obviously silly for these systems. The only class of systems where I could see a 3D model being required are things like piston valve hybrids.

The recent work I've been doing was undertaken with the goal of accurately modelling chemical kinetics in a hybrid launcher whose behaviour can be well captured with a 2D model, but not the 1D GALE code.
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.
jimmy101
Sergeant Major
Sergeant Major
United States of America
Posts: 3197
Joined: Wed Mar 28, 2007 9:48 am
Location: Greenwood, Indiana
Has thanked: 5 times
Been thanked: 15 times
Contact:

Sun Mar 08, 2015 2:56 pm

Do you include heat loss? Seems to me like that would be the hardest part. High velocity flow of 2500C gas through a 30C barrel would, I would SWAG, have pretty significant heat loss. Or, is the heat loss low enough in the time frame of a firing gun that it can be neglected? In a typical closed chamber one second is enough time to for the combustion gases to completely cool back off to ambient temperature, but perhaps in an operating gun one second is so long that heat loss isn't all that significant?
Image
User avatar
DYI
First Sergeant 5
First Sergeant 5
Antigua & Barbuda
Posts: 2862
Joined: Sat Jul 07, 2007 8:18 pm
Location: Here and there

Sun Mar 08, 2015 8:22 pm

Do you include heat loss? Seems to me like that would be the hardest part. High velocity flow of 2500C gas through a 30C barrel would, I would SWAG, have pretty significant heat loss. Or, is the heat loss low enough in the time frame of a firing gun that it can be neglected? In a typical closed chamber one second is enough time to for the combustion gases to completely cool back off to ambient temperature, but perhaps in an operating gun one second is so long that heat loss isn't all that significant?
Heat loss through the wall is included in the GALE code and the CFX simulation, and is actually one of the easiest parts. Heat loss is VERY significant as a loss mechanism in most gun systems below several kilometres per second, generally dissipating between 10% and 30% of the initial chamber potential energy relative to ambient conditions during the launch process. In many cases, the energy lost to heat transfer exceeds the energy transferred to the projectile!

GALE models heat loss using the Gnielinksi correlation, a quite accurate empirical correlation for the heat transfer coefficient of turbulent flow in a pipe. It currently assumes that the wall temperature remains constant at room temperature throughout the process, which is reasonable in Stage1, but not so much in a larger, higher pressure cannon. It produces slightly conservative estimates of the performance.

In CFX, heat transfer in the boundary layer can be modeled exactly using a conjugate heat transfer model which considers both a solid domain experiencing heat transfer only, and the fluid domain inside the launcher, which are coupled at the wall. Alternatively, in cases where heating of the wall is expected to not be important enough to justify the added computational overhead of coupling the CFD problem to a heat transfer problem, a constant wall temperature can be set just like it is in GALE.
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.
Post Reply