1 / 7

Plasma Application Modeling, POSTECH

Plasma Application Modeling, POSTECH. ODE by using Modified Euler Method. 2005. 9. 27. G.J. Kim. Plasma Application Modeling, POSTECH. Problem 8. Solve the following ODE by using second-order modified Euler method without iteration through the shooting method. Plasma Application

marius
Télécharger la présentation

Plasma Application Modeling, POSTECH

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Plasma Application Modeling, POSTECH ODE by using Modified Euler Method 2005. 9. 27. G.J. Kim

  2. Plasma Application Modeling, POSTECH Problem 8 Solve the following ODE by using second-order modified Euler method without iteration through the shooting method

  3. Plasma Application Modeling, POSTECH Exact Solution Exact Solution

  4. Plasma Application Modeling, POSTECH Code subroutine ode(y0,z0,yl,x,y,z) real y0,z0 real x(100),y(100),z(100) real dx integer N common /a/ N,dx y(1) = y0 z(1) = z0 do 400 i = 2,N z(i) = z(i-1)+dx*dz(x(i-1),y(i-1),z(i-1)) y(i) = y(i-1)+dx*dy(x(i-1),y(i-1),z(i-1)) z(i) = z(i-1)+0.5*dx* ( dz(x(i),y(i),z(i)) + dz(x(i-1),y(i-1),z(i-1)) ) y(i) = y(i-1)+0.5*dx* ( dy(x(i),y(i),z(i)) + dy(x(i-1),y(i-1),z(i-1)) ) 400 continue yl = y(N) end subroutine shoot(Y0,YL,x,y,z) real Y0,YL real yll,b,slope,o1,o2,t1,t2 real error b = 0 yll = YL + 100 t1 = 0.0 t2 = 1.0; call ode(Y0,t1,o1,x,y,z) call ode(Y0,t2,o2,x,y,z) slope = (o1 - o2)/(t1 - t2) do 300 i = 1,100 b = b + (YL-yll)/slope; print *,'b = ',b call ode(Y0,b,yll,x,y,z) error = abs(YL-yll) print *,'error = ',error,i if(error .LT. 0.001) go to 301 300 continue 301 end

  5. Plasma Application Modeling, POSTECH Euler Method solution error

  6. Plasma Application Modeling, POSTECH Modified Euler Method (no iteration) solution error

  7. Plasma Application Modeling, POSTECH Compare h=0.125 h=0.25 h=0.0625 h=0.03125

More Related