A Data Science Central Community
Tweaking 1000s of parameters at once is possible with Calculus programming. Math models can be algebraic, ODEs, PDEs, constrained, implicit, nonlinear, nested, etc. It solves them all with built in numerical methods. Leave the work to Calculus-level compilers. Users work on improving their math model and output displays (i.e. plots) and that's all. Nice and short. Try Calculus Programming, you'll love it!
Visit digitalCalculus.com examples for industry problem write-ups.
Thanks,
Phil
Tags: &, Calculus, Modeling, Programming, Simulation
global allproblem acmotor dimension cns(7)
dynamic botm, bnd
call input
call design
print *, '---------------initial design---------------'
call output
find coiltrns, ! number of turns per coil
& EPDIAM, ! Separating diameter
& STASLOTW, ! Stator slot opening width
& ROTSLOTW, ! Rotor slot opening width
& AIRGAP, ! Air gap
& STATOOTW, ! Stator tooth width
& STABAKIR, ! Stator back iron
& ROTTOOTW, ! Rotor tooth width
& ROTBAKIR, ! Rotor back iron
& STASLOTO, ! Stator slot opening depth
& ROTSLOTO, ! Rotor slot opening depth
& SLIP ! Slip
& IN DESIGN; BY THOR(TCON);
& WITH BOUNDS BND; AND LOWERS BOTM;
& HOLDING CNS; TO MAXIMIZE EFF
print *, '----------------optimized design-----------------'
call output
end
model design
f1 = 231258.0438 / coiltrns
q1 = sepdiam * pi / 56 : q2=sepdiam * pi / 69 : q3=sepdiam * pi / 28
c1 =q1/((q1-staslotw)+(staslotw *(.7 -(.036 * staslotw/ airgap))))
c2 =q2/((q2-rotslotw)+(rotslotw *(.7-(.036 * rotslotw/airgap))))
crnol = f1 * airgap * c1 * c2 / (6.96 * coiltrns * q3)
q4 = (statorod - stabakir - stabakir - sepdiam - .1) / 2 - .01
q5= (sepdiam+q4+.1) * pi / 56 - statootw - .016 : a3=q4 * q5
z1 = 7000 * a3
q6 = coiltrns * 2 / z1 : z3= - 2 : z4=32+z3 : q7=1.26**z3 * 162
q8=64 / 1.26**z3 : z5=stacklen+stacklen+pi * statorod / 14
rdc =z5 * coiltrns * 28 * q7 / 12000
v1 = (sepdiam - .06 - rotorid - rotbakir - rotbakir) / 2
v2 = (sepdiam - .06 - v1) * pi / 69 - rottootw
a4 = v1 * v2 : r2 = (.0133 / a4) * (stacklen / 12000) * u1
rrot= (56 * coiltrns)**2 * r2 / 138 : r4 = rrot
g3 = 3.2 * (q4 / (3 * q5)+.03 / (staslotw+q5)+stasloto / staslotw)
g4 = 3.2 * (v1 / (3 * v2)+.03 / (rotslotw+v2)+rotsloto / rotslotw)
g5 = (1 / c1+1 / c2 - 1)**2 * .26 / airgap
g6= (g3+g5 * q1) / 56+(g4+g5 * q2) / 69
xleak = xc * pi * coiltrns**2 * (.05+g6 * stacklen) ! leakage reactance
crstal = 115 / (sqrt(((rdc+r4)**2)+xleak**2)) ! stall current
crfl= 115 / (sqrt(((rdc+r4 / slip)**2)+xleak**2)) ! full load current
storq = 1.5792 * (crstal**2) * r4 ! stall torque
rtorq = 1.5792 * (crfl**2) * r4 / slip ! running torque
p8=rtorq * (1 - slip) * 1.264944649 : p6= (crstal**2) * (rdc+r4)
p7 = (crfl**2) * r4 / slip
flux = (1.4 * f1 / (statootw * stacklen) / 6450 ! flux density
b7 = (sqrt(crfl**2+crnol**2) * flux / crnol) / 1.4 : b2 =.13 * b7**1.9
b3 = (((statorod**2 - sepdiam**2) * pi / 4) - 56 * a3) * 0.28 * stacklen
feloss = b3 * b2 ! iron losses
culsta = (b7 * crnol) / flux)**2 * rdc ! stator copper losses
eff = .5 * p8 / (p7+feloss / 2+culsta) ! efficiency - maximize this
rac =13225 / feloss ! a.c. resistance
xmag =115 / crnol ! magnetizing reactance
culrot = crfl * crfl * rrot / staslotw ! rotor copper losses
cns(1) = statorod - .1 - sepdiam ! stator o.d. > = separation diam+.1
cns(2) = sepdiam - rotorid+.1 ! separation diam > = rotor i.d. - .1
cns(3) = ((sepdiam * pi / 69) - .035) - rottootw ! rotor tooth geometry
cns(4)=.5*(sepdiam - rotorid) -.025 -rotbakir ! rotor back iron geometry
cns(5) = storq - 60 ! stall torque > = 60
cns(6) = 19 - flux ! flux density < = 19
cns(7) =.05 - slip ! slip < = 5 percent
end
As this example illustrates, the benefits of multiple - parameter optimization in practical engineering calculation can often be dramatic. Because of the large number of parameters, something on the order of a billion to a trillion computer cases would have been necessary to achieve this result if using the original program. The bottom line benefit is dramatically reduced cost, higher engineering productivity, and immediate results to meet tight schedules.
---- Thor Summary, Invoked At Acmotor[29] For Model Design---- Convergence Condition After 35 Iterations o
o
o
Loop Number...... [Initial] 35
Unknowns
coiltrns 2.900000e+01 3.214302e+01sepdiam 4.000000e+00 5.010000e+00staslotw 6.000000e-02 6.570807e-02
rotslotw 3.500000e-02 3.500000e-02
airgap 8.000000e-03 8.000000e-03
statootw 1.350000e-01 1.687119e-01
stabakir 1.500000e-01 3.955060e-01
rottootw 1.100000e-01 8.885508e-02
rotbakir 4.700000e-01 9.700004e-01
stasloto 3.500000e-02 2.500000e-02
rotsloto 1.500000e-02 0.000000e+00
slip 3.000000e-02 5.000000e-02
Objective
Eff 4.020854e-01 7.312523e-01
Inequality Constraints
cns ( 1) 1.010000e+00 0.000000e+00cns ( 2) 1.225000e+00 2.235000e+00cns ( 3) 3.712132e-02 1.042519e-01
cns ( 4) 6.750000e-02 7.249963e-02
cns ( 5) -7.555936e+00 6.415480e-04
cns ( 6) 1.258933e+01 1.437190e+01
cns ( 7) 2.000000e-02 0.000000e+00
--- End Of Loop Summary
Another improved productivity example do to using Calculus (level) programming.
© 2020 AnalyticBridge.com is a subsidiary and dedicated channel of Data Science Central LLC Powered by
Badges | Report an Issue | Privacy Policy | Terms of Service
Most Popular Content on DSC
To not miss this type of content in the future, subscribe to our newsletter.
Other popular resources
Archives: 2008-2014 | 2015-2016 | 2017-2019 | Book 1 | Book 2 | More
Most popular articles