Hello Guys,

i´m quite new to Maple and found a guide to draw an Ossannacircle with Maple.

The problem is, that it doesn´t work and i don´t get what´s wrong.

Could someone help?

That´s the code:

restart: with(plots):

interface(imaginaryunit=j, displayprecision=4):

plotsetup("inline",plotoutput=terminal,plotoptions="colour=cmyk,resolution=2000"):

U[n]:= 500: # V

U[2,n]:= 83.2: # V

I[1,n]:= 28.7: # A

phi[n]:= arccos(0.844):

evalf(180/Pi*phi[n]); # Grad

n[0]:= 1000: # 1/min

R1:= 0.465: R2:= 0.00985: # Ohm

ü:= U[n]/U[2,n]; # Übersetzungsverhältnis

I[1,0]:= 8.5: # A

phi[0]:= arccos(0.15):

evalf(180/Pi*phi[0]); # phi[0] in Grad

U[k]:= 170.5: # V

I[k]:= 28.7: # A

phi[k]:= arccos(0.277):

evalf(180/Pi*phi[k]); # phi[k] in Grad

I_[1,n]:= ?I[1,n]*exp(j*phi[n])?;

Pn_:= I_[1,n]:

I_[1,0]:= ?I[1,0]*exp(j*phi[0])?; P0_:= I_[1,0]:

I[1,k]:= ?I[1,n]*U[n]/U[k]?;

I_[1,k]:= 'I[1,k]*exp(j*phi[k])';

Pk_:= I_[1,k]:

G1:= '(Im(P0_)-xm)^2+(Re(P0_)-ym)^2 = r^2';

G2:= '(Im(Pk_)-xm)^2+(Re(Pk_)-ym)^2 = r^2';

G3:= '(Im(Pn_)-xm)^2+(Re(Pn_)-ym)^2 = r^2';

Loe:= solve({G1,G2,G3}, [xm,ym,r]);

assign(Loe);

linie:= proc(ap, ep, opt)

# ap... Anfangspunkt, ep...Endpunkt

# opt...Optionen (z.B. Farbe, Dicke); als Liste vorzugeben

plot([[Im(ap),Re(ap)],[Im(ep),Re(ep)]],op(opt));

end proc:

punkt:= proc(pp)

# pp... Zeiger auf den Punkt

pointplot([[Im(pp), Re(pp)]], symbol=solidcircle):

end proc:

kreis:= plottools[circle]([xm,ym], r, color=black):

P0:= punkt(P0_): Pk:= punkt(Pk_): Pn:= punkt(Pn_):

D_:= 'Re(P0_)+j*Im(Pk_)';

DD:= punkt(D_): # D ist für den Differentialoperator reserviert

P0D:= linie(P0_, D_, [color=black]):

DPk:= linie(D_, Pk_, [color=black]):

I_[2,k]:= 'I_[1,k]-I_[1,0]';

D_E:= 'Re(I_[2,k])*R[1]/(R[1]+R[2]*ü^2)';

E_:= 'D_ + D_E';

EE_:= 'E_ - P0_';

E:= punkt(E_):

ML:= linie(P0_, E_, [legend="Drehmomentlinie ", color=blue]):

LL:= linie(P0_, Pk_, [linestyle=dash, legend="Leistungslinie ",color=blue]):

I_10:= linie(0, P0_, [color=blue]):

d:= 0.05*Im(Pk_): # Textabstand

text:= textplot([[Im(P0_)-0.7*d, Re(P0_)+d/2,"P0"],[Im(Pn_)-0.7*d, Re(Pn_)+d/2,"Pn"], [Im(Pk_)+d, Re(Pk_),"Pk"],[Im(D_)+d/2, Re(D_)+1,"D"], [Im(E_)+d/2, Re(E_)+1,"E"]]):

KD:= display(kreis, P0, Pk, Pn, DD, E, I_10, LL, ML, P0D, DPk, text,scaling=constrained, title=typeset("Asynchronmotor\n U =",U[n], " V, I = ",I[1,n]," A\n"), titlefont=[TIMES,12,BOLD],labels=[typeset(Im('I[1]/A')),typeset(Re('I[1]/A'))]): KD;

G4:= ''(x-xm)*(xk-xm) + (y-ym)*(yk-ym) = r^2'';

G5:= isolate(G4,y);

G6:= collect(G5, x);

AA:= op(rhs(G6));

A := AA[1]/x;

G7:= isolate(A = Re(EE_)/Im(EE_), yk);

G8:= (xk-xm)^2 + (yk-ym)^2 = r^2;

Loe2:= solve({G7,G8}, [xk,yk]);

I_[1,kipp]:= subs(Loe2[1], j*xk + yk); Pkipp_:= I_[1,kipp]:

Pkipp:= punkt(Pkipp_):

LMS:= sqrt(3)*U[n]/1000; # Leistungsmaßstab in kW/A

DMS:= sqrt(3)*U[n]/(2*Pi*n[0]/60); # Drehmomentmaßstab in Nm/A

moment:= proc(P_)

local S; global P0_, E_, D_, DMS;

# Ermittlung der Strecke von P bis zur Drehmomentlinie

S:= Re(P_)-Re(P0_)-(Im(P_)-Im(P0_))*(Re(E_)-Re(D_))/

(Im(D_)- Im(P0_));

evalf(S*DMS);

end proc:

leistung:= proc(P_)

local S; global P0_, Pk_, D_, LMS;

# Ermittlung der Strecke von P bis zur Leistungslinie

S:= Re(P_)-Re(P0_)-(Im(P_)-Im(P0_))*(Re(Pk_)-Re(D_))/(Im(D_)-Im(P0_));

evalf(S*LMS);

end proc:

M[n]:= moment(Pn_);

Pmech[n]:= leistung(Pn_);

M[kipp]:= moment(Pkipp_);

Pmech[kipp]:= leistung(Pkipp_);

text2:= textplot([[Im(Pkipp_), Re(Pkipp_)+d, "Pkipp"]]):

plotsetup(ps, plotoutput="print", plotoptions="noborder,resolution=2000"):

display(KD, Pkipp, text2, labels=[" "," "], tickmarks=[0,0],caption=" ");

ZL:= readstat("Zeigerlänge vom Punkt (0,0) bis Pk in mm:");

IMSd:= abs(Pk_)/ZL; # A/mm

LMSd:= evalf(IMSd*U[n]*sqrt(3)/1000); # kW/mm

DMSd:= evalf(LMSd*1000/(2*Pi*n[0]/60)); # Nm/mm

Regards

Alex