Marchettibenjamin.files.wordpress.com



%matplotlib inline

from pylab import *

import numpy

from __future__ import division

import matplotlib.pyplot as plt

import matplotlib

from itertools import chain

SMALL_SIZE = 13

MEDIUM_SIZE = 22

BIGGER_SIZE = 40

plt.rc('font', size=MEDIUM_SIZE) # controls default text sizes

plt.rc('axes', titlesize=MEDIUM_SIZE) # fontsize of the axes title

plt.rc('axes', labelsize=MEDIUM_SIZE) # fontsize of the x and y labels

plt.rc('xtick', labelsize=MEDIUM_SIZE) # fontsize of the tick labels

plt.rc('ytick', labelsize=MEDIUM_SIZE) # fontsize of the tick labels

plt.rc('legend', fontsize=MEDIUM_SIZE) # legend fontsize

#plt.rc('figure', titlesize=BIGGER_SIZE) # fontsize of the figure title

#Latex

plt.rc('text', usetex=True)

plt.rc('font', family='serif')

symbolsize=250

DATA

v=loadtxt('Data_v.txt')

w=loadtxt('Data_w.txt')

t=loadtxt('Data_time.txt')

N1=250

N2=1000

S=16*1e-4

l=0.48

R=18080

C=21.03*1e-6

r0=16.2

Vfer=S*l #volume de fer

f=50 #fréquence d'acquisition

mu0=4*pi*10e-7

CALCUL B ET H

B=R*C*w/(N2*S)

H=N1*v/(r0*l)

M=B/mu0+H

print max(M)

print max(M)*mu0

FIGURE

fig1,axes=plt.subplots(1,2,figsize=(24,10))

axes[0].scatter(H,-B,marker='o',s=symbolsize,alpha=0.7)

axes[0].set_xlabel(r'H (A.m$^{-1}$)')

axes[0].set_ylabel(r'B (T)')

axes[0].grid('on')

axes[0].axhline(y=0,color='k',linewidth=2,zorder=0,alpha=0.7)

axes[0].axvline(x=0,color='k',linewidth=2,zorder=0,alpha=0.7)

axes[1].scatter(H,-M,marker='o',s=symbolsize,alpha=0.7)

axes[1].set_xlabel(r'H (A.m$^{-1}$)')

axes[1].set_ylabel(r'M (A.m$^{-1}$)')

axes[1].grid('on')

axes[1].axhline(y=0,color='k',linewidth=2,zorder=0,alpha=0.7)

axes[1].axvline(x=0,color='k',linewidth=2,zorder=0,alpha=0.7)

fig1.suptitle('Cycle d\'hysteresis du fer', fontsize=BIGGER_SIZE)

savefig('1.pdf',dpi=300)

PUISSANCE PERDU

diffh=diff(H)

argu=B[1::]*diff(H)

integrale=trapz(argu)

print(integrale)

P=integrale*Vfer/(1/f)

print P

print Vfer

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download