[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Complex Coil Gun Simulation, Lua Scripts, and Mesh Sizes



Ok, this is kind of complicated so let me try to explain.

My friend and I are currently enrolled at the University of Maine at Orono working on our Electrical Engineering Senior Project. As you have probablyguessed we are building a coil gun.

Here are what the attached files do, in the order that they are used.

MakeHash.m is a matlab script that goes through different barrel lengths, and different AWG wires and calls CoilOpt, and outputs the results to a textfile.

CoilOpt calculates the current density, barrel parameters, ... etc. It does this for both optimized and non-optimized coil windings. It bases the coil parameters on limits. CoilOpt.m requires an operating voltage for the coil, and a current limit. It determines the what the fewest number of wraps are needed of a certain gauge wire to get the current within the limit.

After MakeHash has been run, OptForce.lua is run with FEMM. This script "builds" the simulation based on the data from the matlab scripts. Once the simulation has been run, OptForce.lua calls coilgun-post.lua.

coilgun-post.lua, as you have guessed calculates the force on the projectile and the inductance of the coil. It outputs the results to a text file.

GraphResults.m takes the data from the lua scripts and makes a pretty matlab pcolor graph showing how the force varies based on barrel length and wirediameter. 

This all works quite beautifully.... but I am not sure on the accuracy ofthe mesh size... I don't know how to determine the optimally sized mesh for each problem. The coils range from 1 inch long with a coil that is 0.36meters, to coils that are 1 foot long with a winding thickness that is 0.1601 millimeters thick. That is quite a range of coil sizes. Any help you can give me on this would be much appreciated. Take a look at the scripts,who knows maybe you will find something interesting :)


------=_NextPart_001_000A_01C1BB33.B8D55740
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2713.1100" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Ok, this is kind of complicated so let me try to 
explain.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>My friend and I are currently enrolled at the 
University of Maine at Orono working on our Electrical Engineering Senior 
Project.&nbsp; As you have probably guessed we are building a coil 
gun.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Here are what the attached files do, in the order 
that they are used.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>MakeHash.m is a matlab script that goes through 
different barrel lengths, and different AWG wires and calls CoilOpt, and outputs 
the results to a text file.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>CoilOpt calculates the current density, barrel 
parameters, ... etc.&nbsp; It&nbsp;does this for both optimized and 
non-optimized coil windings.&nbsp; It bases the coil parameters on limits.&nbsp; 
CoilOpt.m requires an operating voltage for the coil, and a current limit.&nbsp; 
It determines the what the fewest number of wraps are needed of a certain gauge 
wire to get the current within the limit.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>After MakeHash has been run, OptForce.lua is run 
with&nbsp;FEMM.&nbsp; This script "builds" the simulation based on the&nbsp;data 
from the matlab scripts.&nbsp; Once the simulation has been run, OptForce.lua 
calls coilgun-post.lua.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>coilgun-post.lua, as you have guessed calculates 
the force on the projectile and the inductance of the coil.&nbsp; It outputs the 
results to a text file.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>GraphResults.m takes the data from the&nbsp;lua 
scripts and makes a pretty matlab pcolor graph showing how the force varies 
based on barrel length and wire diameter.</FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>This all works quite beautifully....&nbsp;&nbsp; 
but I am not sure on the accuracy of the mesh size...&nbsp; I don't know how to 
determine the optimally sized mesh for each problem.&nbsp; The coils range from 
1 inch long with a coil that is 0.36 meters, to coils that are 1 foot long with 
a winding thickness that is 0.1601 millimeters thick.&nbsp; That is quite a 
range of coil sizes.&nbsp; Any help you can give me on this would be much 
appreciated.&nbsp; Take a look at the scripts, who knows maybe you will find 
something interesting :)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_001_000A_01C1BB33.B8D55740--

Attachment: bin00044.bin
Description: Binary data

Attachment: bin00045.bin
Description: Binary data

Attachment: bin00046.bin
Description: Binary data

Attachment: bin00047.bin
Description: Binary data

Attachment: bin00048.bin
Description: Binary data