Курсовая работа: Численное моделирование и анализ переходных процессов в электрической цепи
Ik1,Ik2,Uk1,Uk2,Ik3,Uk3,Ik4,Uk4,It, Ut, dIt, dUt: real;
j:integer;
y: text;
Begin
clrscr;
assign(y,'c:\rezyltat.txt');
rewrite(y);
R1:=30; R2:=25; R3:=50; R4:=1.88; R5:=15; R6:=50;
L:=0.00557; C:=0.00002;
A:=(R5+R6)/(R5+R6+R3); G:=1/(R5+R6+R3); B:=R2/(R1+R2);
D:=R4+(R1*R2/(R1+R2))+R3*((R5+R6)/(R5+R6+R3));
h:=0.0002; f:=50; fi:=5; w:=2*pi*f;
E0:=15; It:=0; Ut:=0; t:=0; j:=0;
While t<=0.0202 do
begin
Ik1:=h*(1/L)*(B*(E0+E0*sin(w*t+fi))-D*It-A*Ut);
UK1:=h*(1/C)*(A*It-G*Ut);
Ik2:=h*((1/L)*(B*(E0+E0*sin(w*(t+h/2)+fi))-D*(It+Ik1/2)-A*(Ut+Uk1/2)));
Uk2:=h*(1/C)*(A*(It+Ik1/2)-G*(Ut+UK1/2));
Ik3:=h*((1/L)*(B*(E0+E0*sin(w*(t+h/2)+fi))-D*(It+Ik2/2)-A*(Ut+Uk2/2)));
Uk3:=h*(1/C)*(A*(It+Ik2/2)-G*(Ut+UK2/2));
Ik4:=h*((1/L)*(B*(E0+E0*sin(w*(t+h)+fi))-D*(It+Ik3)-A*(Ut+Uk3)));
Uk4:=h*(1/C)*(A*(It+Ik3)-G*(Ut+UK3));
dIt:=(Ik1+2*Ik2+2*Ik3+Ik4)/6;
dUt:=(Uk1+2*Uk2+2*Uk3+Uk4)/6;
if j mod 5=0 then
Writeln(y,'t=',t:6:4,' It=',It:9:6,' Ut=',Ut:6:5);
Writeln('j=',j:3,' t=',t:6:4,' It=',It:9:6,' Ut=',Ut:6:5);
It:=It+dIt; Ut:=Ut+dUt; j:=j+1; t:=t+h;