Don't know if this helps or not, but there's CFD available in FreeCAD, as well as FEA (called the FEM workbench) and there's a CFDoF workbench. I've used the FEM workbench, and have been able to get CFDoF to run some examples, including supersonic airflow. The latter (CFDoF) is a lot harder to me to understand and to get running. I've yet to get one of my CFDoF models to simulate.I used to program in Python (and NumPy & SciPy) extensively, to design and run radar simulations, from physics models through signal processing. Can't say I was a Python expert, but I used the tools to get the job done, for designing automotive radars. It's great to see some active Python programming!
When the energy that comes out is less than what went in, it needs to be accounted for as inefficiency - at some point anyway.
You will note in the three graphs that the spring energy oscillates over time. It goes from more than 300 Joules to zero and back up. Never stopping. Shouldn't it decrease gradually and stop at zero? A similar thing happens in the graphs for velocity and acceleration, they all oscillate back and forth.Although this is not exactly what happens inside of a springer, it is correct for a spring whose right side is not confined or limited to a certain travel distance, and which does not experience friction nor an opposing force (like compressed air pushing back). In essence there is nothing in this simple simulation to slow and dissipate the energy of the spring, so it boings (oscillates) back and forth forever (see Newtons laws for an explanation). We will fix this in the near future, but the first basic step is done. We've setup a simple spring, which will provide the power for our simulated airgun. See you at the next post!-Marty
Pellet Energy = (Spring Energy) + (Gas Energy) - (Recoil Energy) – (Dissipated Heat Energy) – (Friction Energy)
Your model is currently an undamped https://en.wikipedia.org/wiki/Damping oscillating system with reasonable "ballpark" values. A good start. As stated you need to add some losses due to friction and drag.FYI that spreadsheet sim looks pretty close to the numbers I get. Piston velocity going negative IS a small bounce off the compressed air. I think this happens frequently but is NOT a big problem to solve.
I don't understand the +(Gas Energy) term? Can you explain where it comes from?
I'd personally like to see VERY HIGH SPEED x-ray video of a springer shot cycle including barrel harmonics. I think that would clear up a lot of the myths about how springers actually work. Something in the 10000-100000 frames-per-second range. Anything slower is pretty much useless.
mpbby, a few years back I heard of a device that attaches to a rifle and measures the vibration and positional changes of the gun itself. The device recorded this data and was meant to help people improve their shooting form. Unfortunately, I think these types of solutions have a small market vs. the price it costs to create theme. Doing the laser setup that you suggested is beyond my technical abilities, but it sounds doable and would be a cool thing to have.-Marty
I think that piston seal friction is very complex, because the higher the air pressure during compression, the more the synthetic seal lip is actuated outwards to minimize blowby. So, just pushing the piston forwards at low speed without increasing air pressure probably is not representative.
I think that pellet friction is less significant, because while it might start high, it probably drops significantly after an inch or two of travel down the barrel; if not sooner. The friction and holding force of the pellet in the breech cone (due to cone to cone interference) may be high, but acts over a very short travel; and energy is force x distance. The short distance aspect suggests not very much (negative) energy transfer in the breech cone.