Hi,
Simulation section could use "Circuit Model Depth = Real $ length" to define length for circuits solver.
I think you don't need to add all solvers to equation 1. Solvers(3) = 1 2 3 should be enough.
Solver mgdyn2d: MUMPS seems a little heavy direct solver for this kind of small 2D case. I am using:
Code: Select all
Linear System Solver = Direct
Linear System Direct Method = umfpack
You don't need these since it is direct solver
Code: Select all
Linear System Max Iterations = 5000
Linear System Preconditioning = ILU2
Linear System Convergence Tolerance = 1e-8
Linear System Residual Output = 50
If you add BH-curve then you need to add nonlinear stuff. Something like this:
Code: Select all
Nonlinear System Compute Change in Scaled System = Logical True
Nonlinear System Convergence Tolerance = 1e-5
Nonlinear System Convergence Measure = Residual
Nonlinear System Max Iterations = 20
Nonlinear System Min Iterations = 1
Nonlinear System Relaxation Factor = 1.0
Nonlinear System Newton After Iterations = 3
Each coil need its own component. Stranded example
Code: Select all
Component 1
Name = String Uplus
Body = Integer 6
Coil Type = String Stranded
Number of Turns = Real $ Nph
Resistance = Real $ Rs/2
End
Component 2
Name = String Uminus
Body = Integer 9
Coil Type = String Stranded
Number of Turns = Real $ Nph
Resistance = Real $ Rs/2
End
I am using voltage source and additional precomputed end winding inductance L_ew. 3 phase winding have been divided in to 3 separate one phase windings. (The other 2 winding would be very similar)
Code: Select all
!----------------------------------------------------------
!Winding 1
!----------------------------------------------------------
!init matrices of Ax' + Bx = Source
$ C.1.variables = 8
$ C.1.perm = zeros(C.1.variables)
$ C.1.A = zeros(C.1.variables, C.1.variables)
$ C.1.B = zeros(C.1.variables, C.1.variables)
$ C.1.Mre = zeros(C.1.variables, C.1.variables)
$ C.1.Mim = zeros(C.1.variables, C.1.variables)
!define circuit variables
$ C.1.name.1 = "i_s"
$ C.1.name.2 = "v_s"
$ C.1.name.3 = "i_component(1)"
$ C.1.name.4 = "v_component(1)"
$ C.1.name.5 = "i_component(2)"
$ C.1.name.6 = "v_component(2)"
$ C.1.name.7 = "i_ew"
$ C.1.name.8 = "v_ew"
!Define sources:
!------------------
$ C.1.B(0,1) = 1
$ C.1.source.1 = "U"
!Circuit equations:
!-------------------------
!Kirchoff current law
$ C.1.B(2,0) = -1
$ C.1.B(2,2) = 1
$ C.1.B(4,0) = 1
$ C.1.B(4,4) = 1
$ C.1.B(6,0) = -1
$ C.1.B(6,6) = 1
!Kirchoff voltage law
$ C.1.B(1,1) = -1
$ C.1.B(1,3) = 1
$ C.1.B(1,5) = -1
$ C.1.B(1,7) = 1
!Elemental equations
$ C.1.A(7,6) = L_ew
$ C.1.B(7,7) = -1
My understanding is that source has to in body force 1. Here is all 3 voltage sources inside body force 1.
Code: Select all
Body Force 1
Name = "Circuit"
! Y-connection
!Phase U
U_u = Variable time
Real MATC "U*sqrt(2)/sqrt(3)/2*sin(tx(0)*2*pi*f)"
!Phase V
U_v = Variable time
Real MATC "U*sqrt(2)/sqrt(3)/2*sin(tx(0)*2*pi*f-2*pi/3)"
!Phase W
U_w = Variable time
Real MATC "U*sqrt(2)/sqrt(3)/2*sin(tx(0)*2*pi*f+2*pi/3)"
End
BR,
Lauri