Gas Simulation
-
- Posts: 22
- Joined: Thu Mar 14, 2013 9:38 pm
Gas Simulation
It seems to me that gas simulators capable of modeling basic parts of hot air engines are not available to the hobbiest. I have some ideas for putting together a gas simulator in which we could observe how gas behaves. I am interested in observing a running model that would put out graphs of heat and pressure waves moving through a Stirling or thermal lag / Lamina engine.
I also don't want to bite off more than I can chew (again). The simpler I start with the more chance I have of meeting an initial milestone. I am certainly starting with a 2D model. Also I am particularly weak on how much heat is picked up from a surface, especially as convection varies, and how fast that heat travels through the gas. Without a good understanding of how to model heat transfer I probably won't start. My degree is in electrical engineering, I'm not afraid of a little math, but my research just isn't getting me usable surface-to-gas heat flow information.
I have considered different ways of modeling gas and interacting with the model. I believe a graphic with gas pressures and temperatures indicated by specific color variations might be interesting for both input and output from the system (animated output of course). Of course additional information would need to go with the graphic to describe exact conditions such as pressure ranges, starting temperatures, thermal conductivity of the gas, speed of sound in the gas, adiabatic index, heat transfer rates from surrounding materials, etc etc.
I like the idea that each region of gas represented by a pixel of the image will always remain fixed in space. Rather than try to plot particles interacting wildly I think it might be advantageous to model a solid grid of known values and how they interact with each other. A pressure wave will represent by an increase in pressure in a series of grids and a vector upon which the pressure wave is traveling. Pushing on a piston will evacuate gas from the piston end and force that volume at the speed of sound down the cylinder.
The most surprising aspect of the research to date was that the speed of sound is almost completely unaffected by pressure, but almost entirely by temperature. This got me thinking about the physics around a piston traveling at the speed of sound. I was confused until I realized the gas at the piston head was also getting super heated, and as the temperature goes up so does the speed of sound, clearly allowing gas to not infinity pressurize in an infinity thin area right at the face of the piston. The point may well be moot as modeling supersonic components will be added by the person that needs it, probably not by me in version 1.0 beta.
Piston mass and momentum would certainly be the easier part to model, particularly if I start with free piston (no flywheel).
No model is perfect, and I guarantee there will be flaws if I attempt this, but it could be a usable tool.
Ideas? Suggestions?
Dave
I also don't want to bite off more than I can chew (again). The simpler I start with the more chance I have of meeting an initial milestone. I am certainly starting with a 2D model. Also I am particularly weak on how much heat is picked up from a surface, especially as convection varies, and how fast that heat travels through the gas. Without a good understanding of how to model heat transfer I probably won't start. My degree is in electrical engineering, I'm not afraid of a little math, but my research just isn't getting me usable surface-to-gas heat flow information.
I have considered different ways of modeling gas and interacting with the model. I believe a graphic with gas pressures and temperatures indicated by specific color variations might be interesting for both input and output from the system (animated output of course). Of course additional information would need to go with the graphic to describe exact conditions such as pressure ranges, starting temperatures, thermal conductivity of the gas, speed of sound in the gas, adiabatic index, heat transfer rates from surrounding materials, etc etc.
I like the idea that each region of gas represented by a pixel of the image will always remain fixed in space. Rather than try to plot particles interacting wildly I think it might be advantageous to model a solid grid of known values and how they interact with each other. A pressure wave will represent by an increase in pressure in a series of grids and a vector upon which the pressure wave is traveling. Pushing on a piston will evacuate gas from the piston end and force that volume at the speed of sound down the cylinder.
The most surprising aspect of the research to date was that the speed of sound is almost completely unaffected by pressure, but almost entirely by temperature. This got me thinking about the physics around a piston traveling at the speed of sound. I was confused until I realized the gas at the piston head was also getting super heated, and as the temperature goes up so does the speed of sound, clearly allowing gas to not infinity pressurize in an infinity thin area right at the face of the piston. The point may well be moot as modeling supersonic components will be added by the person that needs it, probably not by me in version 1.0 beta.
Piston mass and momentum would certainly be the easier part to model, particularly if I start with free piston (no flywheel).
No model is perfect, and I guarantee there will be flaws if I attempt this, but it could be a usable tool.
Ideas? Suggestions?
Dave
Re: Gas Simulation
Dave
I have emailed this link to Allan for his suggestions as he has travelled this path, probably more comprehensively than any other academic to date.
It is likely he will decline to offer advice as it is essentially impossible to measure many of the inputs you need and therefore it will be based on estimations which do not suite the academic world.
Knowing that it is very difficult/impossible to take accurate measurements with the available technology, I have confined myself to observing the effects of changes to actual engines and deducing the behaviour of the working gas, by inference.
Without wishing to discourage you, may I suggest you base your endeavours on actual engine data, rather than hypothesis alone.
If you think my observation are of any value to your project, please just ask.
GeoffV
I have emailed this link to Allan for his suggestions as he has travelled this path, probably more comprehensively than any other academic to date.
It is likely he will decline to offer advice as it is essentially impossible to measure many of the inputs you need and therefore it will be based on estimations which do not suite the academic world.
Knowing that it is very difficult/impossible to take accurate measurements with the available technology, I have confined myself to observing the effects of changes to actual engines and deducing the behaviour of the working gas, by inference.
Without wishing to discourage you, may I suggest you base your endeavours on actual engine data, rather than hypothesis alone.
If you think my observation are of any value to your project, please just ask.
GeoffV
-
- Posts: 22
- Joined: Thu Mar 14, 2013 9:38 pm
Re: Gas Simulation
Absolutely, the only chance to make something that even remotely reflects reality is to use the many real world data points available here. I thought theory would be tuned to match reality, but don't we need some theory for a starting point? Somethingto start with concerning heat flow through various types and thicknesses of metal? The metal-to-gas and gas-to-gas are going to be purely empirical measurements cause I've got nuttin there.
I'm hoping to put out something quite simple at first and build from there. That's our best chance for success.
Dave
I'm hoping to put out something quite simple at first and build from there. That's our best chance for success.
Dave
Re: Gas Simulation
Dave
This is the problem, most academic analysis has referred to publications such as Kays and London for heat exchanger performance. Unfortunately, and as has now been realised/accepted, all the heat transfer data is for steady fluid flow and consequently appears to be very wide of the mark when applied to reciprocating flows, as is the case within hot air engines.
The best I can offer, for example, is the SS foil regenerator matrix I employ, changes from purple at the hottest point through light straw mid way (260C?) to bright SS at the cooler end. As to the peak mean gas temperature in the expansion exchanger and the lowest mean temperature in the compression exchanger, well, it's just guess work, but from the disappointing performance results we all see, they're a lot less than one strives/hopes for!!!!!
Perhaps you should cobble together a simple analysis and let contributors to this Forum guide the direction of development.
GeoffV
This is the problem, most academic analysis has referred to publications such as Kays and London for heat exchanger performance. Unfortunately, and as has now been realised/accepted, all the heat transfer data is for steady fluid flow and consequently appears to be very wide of the mark when applied to reciprocating flows, as is the case within hot air engines.
The best I can offer, for example, is the SS foil regenerator matrix I employ, changes from purple at the hottest point through light straw mid way (260C?) to bright SS at the cooler end. As to the peak mean gas temperature in the expansion exchanger and the lowest mean temperature in the compression exchanger, well, it's just guess work, but from the disappointing performance results we all see, they're a lot less than one strives/hopes for!!!!!
Perhaps you should cobble together a simple analysis and let contributors to this Forum guide the direction of development.
GeoffV
-
- Posts: 22
- Joined: Thu Mar 14, 2013 9:38 pm
Re: Gas Simulation
Nothing yet but the initial empty Groovy project with Maven compiler and GIT version control. You can git clone it from here:
https://github.com/DavesPlanet/jupiter.git
Yea, I named a gas simulator after a gas giant. I'm a geek.
https://github.com/DavesPlanet/jupiter.git
Yea, I named a gas simulator after a gas giant. I'm a geek.
-
- Posts: 22
- Joined: Thu Mar 14, 2013 9:38 pm
Re: Gas Simulation
Just roughing out how I what the display to look as compression waves pass through. It's an 8 meg graphic, so I'm not hot linking it, click here if you want to see it. It will take a minute to fully load. You see an oscillating inner ring that presses on gas like a piston or a speaker might. As the compression ring reaches full extension the compressed wave continues on without it. The vertical empty space in the center is just a mathematical difficulty with shallow sine angles.
Or maybe you prefer the GRID version?
Or maybe you prefer the GRID version?
-
- Posts: 22
- Joined: Thu Mar 14, 2013 9:38 pm
Re: Gas Simulation
So I'm going to take the building blocks I have for gasses and combine them with the Java 2D physics library JBox2D
some really cool interactive physics demos available at http://gwtbox2d.appspot.com/
Dave
some really cool interactive physics demos available at http://gwtbox2d.appspot.com/
Dave
Re: Gas Simulation
Great library - would it be possible to use it to solve navier stokes equations and transient cases in fluid dynamics?
-
- Posts: 22
- Joined: Thu Mar 14, 2013 9:38 pm
Re: Gas Simulation
Actually I am taking what I started with and re-working it into a component that can be used with JBOX2D java 2D physics engine. What I am going to build is quite simple, I am going to make particles with similar qualities to the "liquid" demo in the current download. My version will include the gas laws such that temperature, pressure, and work are all represented with a degree of realism. Additional modules after the first release will include a simulation of a heat exchanger, an the concept of the speed of sound which will hopefully bring the sim to the point where we can get an animation of what happens in an acoustic engine. I will have to see if the model can be tweeked for better realism by explicitly accounting for the navier stokes equations.
Take a look at this video I found in which someone simulated a full 4 stroke engine using BOX2D (the C++ equivalent to JBOX2D)
www.youtube.com/watch?v=8kZRpouZ3OQ
the demo is crude in that it needs orders of magnitude more particles for more realistic physics, but otherwise similar to what would be possible once I have a realistic fluid component to model the heating and cooling and moving of air.
Dave
Take a look at this video I found in which someone simulated a full 4 stroke engine using BOX2D (the C++ equivalent to JBOX2D)
www.youtube.com/watch?v=8kZRpouZ3OQ
the demo is crude in that it needs orders of magnitude more particles for more realistic physics, but otherwise similar to what would be possible once I have a realistic fluid component to model the heating and cooling and moving of air.
Dave
Re: Gas Simulation
Dave,
I won't pretend to know anything about creating simulations, but have found some of these links good for visualisation and also entertaining to watch.
I'm not sure that they have included regenerators in their modelling (at least to my eyes)
and cant quite figure out what the last one of the 4 is up to, unless its simulating gas velocity instead of temperature..(i'm no expert)
http://www.youtube.com/watch?v=WMZRvln0s3I
http://www.youtube.com/watch?v=h2z5xqzGeo8
http://www.youtube.com/watch?v=c1TIVLWANnQ
http://www.youtube.com/watch?v=NowcabDaOeQ
Other type simulations-
http://www.youtube.com/watch?v=T8ktJXqpiQc
http://www.youtube.com/watch?v=kZKAXGiL834
some related NASA pages-
http://www.grc.nasa.gov/WWW/RT/2005/RP/RPT-dyson.html
http://www.grc.nasa.gov/WWW/TECB/rps_asc_cfd.htm
http://www.grc.nasa.gov/WWW/TECB/index.htm
vamoose
I won't pretend to know anything about creating simulations, but have found some of these links good for visualisation and also entertaining to watch.
I'm not sure that they have included regenerators in their modelling (at least to my eyes)
and cant quite figure out what the last one of the 4 is up to, unless its simulating gas velocity instead of temperature..(i'm no expert)
http://www.youtube.com/watch?v=WMZRvln0s3I
http://www.youtube.com/watch?v=h2z5xqzGeo8
http://www.youtube.com/watch?v=c1TIVLWANnQ
http://www.youtube.com/watch?v=NowcabDaOeQ
Other type simulations-
http://www.youtube.com/watch?v=T8ktJXqpiQc
http://www.youtube.com/watch?v=kZKAXGiL834
some related NASA pages-
http://www.grc.nasa.gov/WWW/RT/2005/RP/RPT-dyson.html
http://www.grc.nasa.gov/WWW/TECB/rps_asc_cfd.htm
http://www.grc.nasa.gov/WWW/TECB/index.htm
vamoose
-
- Posts: 22
- Joined: Thu Mar 14, 2013 9:38 pm
Re: Gas Simulation
Vamoose, thanks for the awesome videos. Several were based on a free opensource project I had never heard of called OpenFoam. I am now digging into that to see what it has to offer.
harry045 my thoughts exactly on the metal-to-air transfers. The flow of heat through the metal and the gas laws would all be based on theory.
Dave
harry045 my thoughts exactly on the metal-to-air transfers. The flow of heat through the metal and the gas laws would all be based on theory.
Dave
Re: Gas Simulation
I'm wondering if something like smoke inside a real running engine might be observed as a basis for comparison for the model?
I wonder if there is a material that would be superfine and able to float inside the engine that would change color based on temperature might be helpful.
R
I wonder if there is a material that would be superfine and able to float inside the engine that would change color based on temperature might be helpful.
R
Re: Gas Simulation
theropod2,
There are substances that are Thermochromic and change colour relative to temperature, but am not aware of any such gas. It may be possible in theory I guess, to make an ultra-fine powder from these materials so that the gas turbulence keeps the particulates suspended. In the thread 'BALLISTIC CONDUCTION, Nanostructures and Stirling Engines', I proposed introducing particulates into the working gas, for different reasons though. I think one of the many obstacles for such things is the potential for the particles to eventually aggregate/clump together and eventually start to contaminate seal movements and interfere with gas flow.
Also I wonder how thermally sensitive they might be, and if their thermochromic properties start to break down at the elevated temperatures that they might experience in an engine..
Still it would be nice to see the fluctuating thermal state of the gas in a real life demonstration (with a high speed camera handy), for in such a scenario there would be fewer arguments regarding the 'accuracy of reality', as opposed to a simulation.
One would need a see through engine, e.g one made from a 'coleman glass lantern shield'..
(why not stick a hypercolor t shirt in a blender and throw the resulting powder in an engine.. Jokes 'BAD IDEA')
vamoose
There are substances that are Thermochromic and change colour relative to temperature, but am not aware of any such gas. It may be possible in theory I guess, to make an ultra-fine powder from these materials so that the gas turbulence keeps the particulates suspended. In the thread 'BALLISTIC CONDUCTION, Nanostructures and Stirling Engines', I proposed introducing particulates into the working gas, for different reasons though. I think one of the many obstacles for such things is the potential for the particles to eventually aggregate/clump together and eventually start to contaminate seal movements and interfere with gas flow.
Also I wonder how thermally sensitive they might be, and if their thermochromic properties start to break down at the elevated temperatures that they might experience in an engine..
Still it would be nice to see the fluctuating thermal state of the gas in a real life demonstration (with a high speed camera handy), for in such a scenario there would be fewer arguments regarding the 'accuracy of reality', as opposed to a simulation.
One would need a see through engine, e.g one made from a 'coleman glass lantern shield'..
(why not stick a hypercolor t shirt in a blender and throw the resulting powder in an engine.. Jokes 'BAD IDEA')
vamoose
Re: Gas Simulation
An easy way 'potentially' would seem to be to use a high quality Thermographic camera on a partially transparent engine to observe the gas.
But looking at the videos that I was able to track down on youtube, it shows that the technology would not be capable of such a task, at least not currently (although who knows what gizmos institutions like NASA and others have in their tool kit).
The thermal emissions from the glass itself would stop observation of the gas.. (and glass is only transparent to certain wavelengths, but not others depending on its absorption spectrum).
Still I think these videos are worth a watch:
http://www.youtube.com/watch?v=dioZjZ4gv78
http://www.youtube.com/watch?v=PflY-AFp15c
http://www.youtube.com/watch?v=Oz0wQXi8cGE
Anyway, It would appear I'm getting a bit off the thread topic, my bad..
vamoose
But looking at the videos that I was able to track down on youtube, it shows that the technology would not be capable of such a task, at least not currently (although who knows what gizmos institutions like NASA and others have in their tool kit).
The thermal emissions from the glass itself would stop observation of the gas.. (and glass is only transparent to certain wavelengths, but not others depending on its absorption spectrum).
Still I think these videos are worth a watch:
http://www.youtube.com/watch?v=dioZjZ4gv78
http://www.youtube.com/watch?v=PflY-AFp15c
http://www.youtube.com/watch?v=Oz0wQXi8cGE
Anyway, It would appear I'm getting a bit off the thread topic, my bad..
vamoose
Re: Gas Simulation
Cameras can be built to live inside the engine itself. Depending on the temperature envelope of the engine. I bet a tiny little blue tooth camera, or two, could be fit inside a displacer. Maybe at the ends.
I still think thermo reactive near-nano particles suspended in the working gas would give the best observation of actual flow dynamics. 3-D digital capturing of these particles could inform us of a great deal about what's really going on in a Stirling, instead of what we think is going on.
Does the engine have to use a gas? How 'bout a liquid engine with "snow globe" flecks of temp change dust? Would it matter if the reaction was slow as long as it represented the thermodynamics and was repeating?
I just think that if there's anything to be learned about modeling reality is getting diverse repeating observations of said reality. It might be worth publication under peer review if someone would undertake such a project with proper documentation. Once the model was in agreement with the observations then modifications for power/torque in various parts of the engine could be explored in the digital realm. Those models could then be output via 3-D printing for real world testing.
While my coding days are well over I still encourage the effort, as long as it conforms to observational reality.
Oh, and I got a video up of my mostly glass gamma, (shameless plug) if visualization of the mechanical operation might help.
R
I still think thermo reactive near-nano particles suspended in the working gas would give the best observation of actual flow dynamics. 3-D digital capturing of these particles could inform us of a great deal about what's really going on in a Stirling, instead of what we think is going on.
Does the engine have to use a gas? How 'bout a liquid engine with "snow globe" flecks of temp change dust? Would it matter if the reaction was slow as long as it represented the thermodynamics and was repeating?
I just think that if there's anything to be learned about modeling reality is getting diverse repeating observations of said reality. It might be worth publication under peer review if someone would undertake such a project with proper documentation. Once the model was in agreement with the observations then modifications for power/torque in various parts of the engine could be explored in the digital realm. Those models could then be output via 3-D printing for real world testing.
While my coding days are well over I still encourage the effort, as long as it conforms to observational reality.
Oh, and I got a video up of my mostly glass gamma, (shameless plug) if visualization of the mechanical operation might help.
R