This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

The script below tests simple shapes and plots them
'''

from numpy import pi, array
import myShapes

myShape = myShapes.Wire()

# Toroidal solenoid
myShape.plotme()

# Solenoid
N = 100
l = 1
R = 0.1
step = 0.1
myShape.Create_Solenoid(R, N, l, step)
myShape.plotme()

# loop
R = 2
C = [1, 1]
Пример #2
0
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

The script below tests simple shapes and plots them
'''

from numpy import pi, array
import myShapes

myShape = myShapes.Wire()

#Toroidal solenoid
myShape.plotme()

#Solenoid
N = 100
l = 1
R = 0.1
step = 0.1
myShape.Create_Solenoid(R, N, l, step)
myShape.plotme()

#loop
R = 2
C = [1, 1]
Пример #3
0
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

The script below tests a toroidal solenoid percurred by a current
'''

from numpy import r_, zeros, pi, ones, array, linspace
import myShapes
import Biot_Savart
from math import sqrt

myShape = myShapes.Wire()

#Toroidal coil along the z axis
R1 = 10
R2 = 1
N = 100
step = 0.001

myShape.Create_Toroidal_Coil(R1, R2, N, step)
myShape.Set_Current(1, 0)

#Points in the middle of the solenoid
myCircle = myShapes.Wire()
myCircle.Create_Loop([0, 0], R1, 5, 'xy')
points = myCircle.coordz