0
$\begingroup$

I want to simulate a CoilGun system in python.

Assume The system circuit as a simple RLC circuit

It is the method that I used :

I used FEMM software to get force & inductance data at different slug distances from coil center.

Then I write the program this way :

let t= 0, z = 0, v=0, current = 0, timestep=0.000001

 Loop:
  1- increase t a timestep
  2- get coil force & inductance data based on z
  3- current += current change calculation from RLC circuit in timestep
  3- a = F(z,current) / m
  4- v = v + a * timestep
  5- z = z + v * timestep

But I get an efficiency over 50% with some setups with this simulation ! So I think there is a problem in it .

I also tried this method : calculate new slug kinetic energy and decrease it from coil stored energy in every step(by reducing current) , but I get over 50% efficiency again

Can anyone tell me what is wrong with this way of simulation, or suggest me a better method?

$\endgroup$
3
  • $\begingroup$ The answer to this question would depend sensitively on the details of the finite element method you're using. For example, it likely just sets the current in the coil and simulates the resulting fields without bothering to simulate thermal line losses due to heating at very high currents. It's also doubtful that it would accurately simulate far-fields to account for radiative losses. $\endgroup$ Commented Nov 12, 2020 at 6:53
  • $\begingroup$ Right but how much are they influencing ? I want to know is my method right without care about heats ? $\endgroup$ Commented Nov 12, 2020 at 7:04
  • $\begingroup$ The only way to know is to do the calculation, or at the very least some kind of error analysis. Your question is asking whether or not an approximation is good. There is no way to do this without all information about the simulation, the system you're modeling, and most importantly what your error tolerances are. The last point, which is arguably most important, is something no one can tell you because it depends on what you want. $\endgroup$ Commented Nov 12, 2020 at 7:22

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.