Euler

  • October 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Euler as PDF for free.

More details

  • Words: 119
  • Pages: 2
Example 3 – Euler’s Method delta = 0.4606 delta_arr(1)= .4606 x(1)=.01 deltaw = 0 delta_t=.01 f0 = 60 H=5 Pm=0.8 Pe1=.65 Pe2=1.465 Pa= Pm - Pe1*sin(delta) ddel_dt = deltaw ddel_dto=ddel_dt dwdt = pi*f0*Pa/H dwdto=dwdt a=1 t=0 while t<=0.3 deltan_p = delta + ddel_dt * delta_t deltawn_p = deltaw + dwdt* delta_t Pa= Pm - Pe1*sin(deltan_p) ddel_dt= deltawn_p dwdt= pi*f0*Pa/H delta= delta + ((ddel_dt+ddel_dto)/2)*delta_t deltaw= deltaw +((dwdt+dwdto)/2)*delta_t delta_arr(a)= delta dwdto=dwdt ddel_dto=ddel_dt t=t+.01 a=a+1 x(a)=x(a-1)+.01 end while t<=1 deltan_p = delta + ddel_dt * delta_t deltawn_p = deltaw + dwdt* delta_t Pa= Pm - Pe2*sin(deltan_p) ddel_dt= deltawn_p

dwdt= pi*f0*Pa/H delta= delta + ((ddel_dt+ddel_dto)/2)*delta_t deltaw= deltaw +((dwdt+dwdto)/2)*delta_t delta_arr(a)= delta dwdto=dwdt ddel_dto=ddel_dt t=t+.01 a=a+1 x(a)=x(a-1)+.01 end a=1:1:100 plot(x(a), delta_arr(a)) grid on Output Plot

Related Documents

Euler
May 2020 17
Euler
October 2019 26
Euler
June 2020 10
Euler
December 2019 40
10 Euler Correction
May 2020 9