/out,emf1,out
! emf1.mac
! example of computing the emf in a coil for a 2D planar model. The emf is produced
! in a coil as a magnet moves across the face of the coil which has a 3 cm inner dimension. CEs
! are used to join the two models at the common interface.
!
! For 2D, the flux is the difference in Azs of the coils cross sections factored by the thickness.
! The example assumes an average velocity of the magnet.
!
! This example is for ONLY for the demonstration of the CEs, using Tables, and *voper commands.
!
! left coil section: real=2 mat=1 (1 cm x 1cm)
! right coil section: real=3 mat=1 (1 cm x 1cm)
! air : mat 1
! magnet : mat 2 (.5 cm x 1 cm)
! interface between models is at y=0
!
! output array:
! emft table
! emft(i,0) = index is X coordinate of magnet
! emft(i,1) = flux in coil for each position of magnet
! emft(i,2) = derivative of "1" times factor
!
fini
/nerr,0,1e5
/cle,all
/prep7
t=2 ! thickness in Z direction of magnet (cm)
n_s=20 ! number of solutions for the magnet going from one extreme position to the other
d_x=.002 ! size of step of magnet motion (distance moved is (n_s-1)*d_x
freq=360 ! frequency=3600RPM=360 cycles/sec. This is used to compute an
! average velocity (AV). average velocity is full distance moved in a cycle/time for cycle
av=(n_s-1)*d_x*freq
Nturn=5000 ! number of turns-distributed uniformly
!
! magnet
mp,murx,2,1.1 ! linear magnet
mp,mgyy,2,8e5 ! magnet Hc (Y)
mp,murx,1,1 ! air
wpave,0,-.01
rectan,-.005,.005,-.0025,.0025,
aatt,2,1,1
! air for bottom section
wpave
rectan,-.1,.1,-.1,0
aovl,all
! define components for lower section of model
cm,lower,area
lsel,,loc,y
cm,low_int,line
asel,none
! left coil section
wpave,-.02,.015
rectan,-.005,.005,-.005,.005
aatt,1,2,1
! right coil section
asel,none
wpave,.02,.015
rectan,-.005,.005,-.005,.005
aatt,1,3,1
! air for top section
wpave
rectan,-.1,.1,0,.1
aovl,all
asel,a,real,,2
aovl,all
alls
! mesh
et,1,13
lsel,,loc,y
lesi,all,,,45
ames,all
! define element component for upper section of air elements
nsel,,loc,y,0,1
esln,,1
esel,u,real,,2,3
cm,upper,elem
! boundary conditions
esel,all
nsel,,ext
nsel,u,loc,y
d,all,az ! flux parallel on exterior nodes
*set,emft
*dim,emft,table,n_s,2
! index is X coordinate of magnet
! emft(i,1)=flux for each position of magnet
! emft(i,2)=derivative of "1" times factor
emft(0,0)=1e-5
emft(0,1)=1 ! flux
emft(0,2)=2 ! emf
! move magnet to initial position
cmsel,,lower
lsla
ksll
xc=-d_x*n_s/2-d_x/2
agen,2,all,,,xc,,,,,1 ! move areas
eplo
*do,_i1,1,n_s
xc=xc+d_x ! current X of magnet
! move lower section
fini
/prep7
nsel,,loc,y
cedel,all
cmsel,,lower
lsla
ksll
agen,2,all,,,d_x,,,,,1 ! move areas
esla
nsle
nsel,r,loc,y ! selects nodes on surface of lower section
cmsel,,upper ! selects elements on upper section
ceintf ! CEs
fini
/solu
alls
eplo
solve
fini
/post1
plf2d
esel,,real,,2,3
etab,az,a,z
etab,,volu
smult,azv,az,volu
! get average AZ for left coil section
esel,,real,,2
ssum
*get,left_az,ssum,,item,azv
*get,left_v,ssum,,item,volu
left_az=left_az/left_v
! get right average AZ for right coil section
esel,,real,,3
ssum
*get,right_az,ssum,,item,azv
*get,right_v,ssum,,item,volu
right_az=right_az/right_v
! store position (m) and flux (webers)
emft(_i1,0)=xc ! position
emft(_i1,1)=(left_az-right_az)*t ! flux
*enddo
! compute emf
emffac=nturn*av
*voper,emft(1,2),emft(1,1),der1,emft(1,0),emffac
/grid,1
/axlab,y,EMF (V)
/axlab,x,X coordinate (m)
*vscf,xmin,min,emft(1,0)
*vscf,xmax,max,emft(1,0)
/xran,xmin,xmax
*vplo,emft(1,0),emft(1,2)
parsav,all,emft,par
/out
虽然这个不是旋转,但是有移动有耦合,旋转所需要的基本元素都在这里了。解耦好像没有,不过肯定不难找。
出处ansys.net |