Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. watto8

    Gauss-Siedel Matrix to solve Elliptic Equation

    ...!Opening files in Matlab !Initial Conditions x(0)= 0 x(JI)= 1.0 y(0)= 0 y(NI)= SQRT(3.0) do i=0,JI do j=0,NI x(i)= i*h ! x-axix, x starts from 0 to 1 y(j)= j*h ! y-axis y starts from 0 to SQRT(3.0) u(i,j)= 0 ! Entire Boundary is zero end do end do while (error .GT. tolerence)...
  2. watto8

    Gauss-Siedel Matrix to solve Elliptic Equation

    ...!Opening files in Matlab !Initial Conditions x(0)= 0 x(JI)= 1.0 y(0)= 0 y(NI)= SQRT(3.0) do i=0,JI do j=0,NI x(i)= i*h ! x-axix, x starts from 0 to 1 y(j)= j*h ! y-axis y starts from 0 to SQRT(3.0) u(i,j)= 0 ! Entire Boundary is zero end do end do while (error .GT. tolerence)...
  3. watto8

    Jacobi iterative method to solve elliptic equation

    dear franc, i checked my output with my lectures and he told me it is correct. i just to plot the output in the matlab. i want to plot the value of u(i,j) between interval of both -1<x<1 and -1<y<1. since it is 3-d ,i getting problems to plot u values correctly between the x and y intervals by...
  4. watto8

    Jacobi iterative method to solve elliptic equation

    xyu =[ x-axis y-axis u(i,j) -1.00000 -1.00000 0.00000 -0.900000 -1.00000 0.00000 -0.800000 -1.00000 0.00000 -0.700000 -1.00000 0.00000 -0.600000 -1.00000 0.00000 -0.500000...
  5. watto8

    Jacobi iterative method to solve elliptic equation

    ...IMPLICIT NONE ! Declare Variables Real, allocatable :: x(:),y(:),u(:,:), v(:,:),u_old(:,:) Real:: xy,h,Smax,tolerence,error Integer:: i,j,JI Print *, 'Enter the space size:' read*, xy Print*, 'Enter the final space:' read*, Smax h=Smax/xy !The size of spacestep Print*, 'This gives stepsize...
  6. watto8

    Jacobi iterative method to solve elliptic equation

    ...Jacobi IMPLICIT NONE ! Declare Variables Real, allocatable :: x(:),y(:),u(:,:), v(:,:) Real:: xy,h,Smax,tolerence, error Integer:: i,j,JI,k,N Print *, 'Enter the space size:' read*, xy Print*, 'Enter the final space:' read*, Smax h=Smax/xy !The size of spacestep Print*, 'This gives stepsize...
  7. watto8

    Jacobi iterative method to solve elliptic equation

    ...NONE ! Declare Variables Real, allocatable :: x(:),y(:),u(:,:), v(:,:),u_old(:,:) Real:: xy,h,Smax,tolerence Integer:: i,j,JI,k,N, error Print *, 'Enter the space size:' read*, xy Print*, 'Enter the final space:' read*, Smax h=Smax/xy !The size of spacestep Print*, 'This gives stepsize of...
  8. watto8

    Jacobi iterative method to solve elliptic equation

    Here is my output, when i enter the space size=10, and the final space size =1, That gives h=0.1 for both directions x and y ApproximateSolution = x-axis y-axis u(i,j) [ -1.00000 -1.00000 0.00000 -0.900000 -0.900000 2.500000E-03...
  9. watto8

    Jacobi iterative method to solve elliptic equation

    ...new code PROGRAM Jacobi_method IMPLICIT NONE ! Declare Variables Real, allocatable :: x(:),y(:),u(:,:) Real:: xy,h,Smax Integer:: i,j,JI Print *, 'Enter the space size:' read*, xy Print*, 'Enter the final space:' read*, Smax h=Smax/xy !The size of spacestep Print*, 'This gives stepsize of...
  10. watto8

    Jacobi iterative method to solve elliptic equation

    I think this is not correct too ! The Entire Boundary Conditions u(0,1)=0 !West u(i-1,j), x direction u(2,1)=0 ! East u(i+1,j), x direction u(1,2)=0 !North u(i,j+1), y direction u(1,0)=0 !South u(i,j-1), y direction because The Entire Boundary Conditions of u=0, when i=1, j=1...
  11. watto8

    Jacobi iterative method to solve elliptic equation

    In question Sorry the elliptic equation is - u_xx - u_yy = 1 instead of u_xx - u_yy=1, there is - sign missing infront of u_xx. And same for the poisson euqation : - u_xx - u_yy = 1
  12. watto8

    Jacobi iterative method to solve elliptic equation

    ...1 not laplace equations, by using Jacobi iterative method for solving linear systems such as A*u= b u= A^(-1)*b Where b is the right hand side, u is unknown and A is matrix For this, we use a sequence u^(k)...
  13. watto8

    Jacobi iterative method to solve elliptic equation

    PROGRAM Jacobi_method IMPLICIT NONE ! Declare Variables Real, allocatable :: x(:),y(:),u(:,:) Real:: xy,h,Smax Integer:: i,j,JI Print *, 'Enter the space size:' read*, xy Print*, 'Enter the final space:' read*, Smax h=Smax/xy !The size of spacestep Print*, 'This gives stepsize of space h=',h...
  14. watto8

    Jacobi iterative method to solve elliptic equation

    ...my program PROGRAM Jacobi_method IMPLICIT NONE ! Declare Variables Real, allocatable :: x(:),u(:,:) Real:: m,xy,h,Smax Integer:: i,j,JI Print *, 'Enter the space size:' read*, xy Print*, 'Enter the final space:' read*, Smax h=Smax/xy !The size of spacestep Print*, 'This gives stepsize of...
  15. watto8

    CRANK-NICOLSON SCHEME TO SOLVE HEAT DFFUSION EQUATIONI

    Treating the case D(u)=1 when x<1/2 D(u)=1/2 When x>1/2 (otherwise) I need to use if statement: if (-1+j*dx >1/2) then ..... end if .. but not sure where to put and there might other codes I need to add to get discontinuity when x>1/2 at D(u)=1/2 and from get the values of u(j) values and...
  16. watto8

    CRANK-NICOLSON SCHEME TO SOLVE HEAT DFFUSION EQUATIONI

    Francios Jacq, Its a different question but just need to need the previous code to solve this new questions. As fae as Im concerned, this code is working perfectly.
  17. watto8

    CRANK-NICOLSON SCHEME TO SOLVE HEAT DFFUSION EQUATIONI

    ...normal code: program crank_nicolson implicit none real, allocatable :: x(:),u(:),a(:),b(:),c(:),d(:) real:: m,dx,dt,tmax integer:: j,ni,ji print*, 'enter the total number of time steps' read*, ni print*, 'enter the final time' read*, tmax dt=tmax/ni !the size of timestep print*, 'this...
  18. watto8

    heat equation using crank-nicolsan scheme in fortran

    Thank you very much Francois Jacq :)
  19. watto8

    heat equation using crank-nicolsan scheme in fortran

    ...intent(in) :: JI integer j do j = 2,JI !combined decomposition and forward substitution a(j) = a(j)/b(j-1) b(j) = b(j)-a(j)*c(j-1) d(j) = d(j)-a(j)*d(j-1) end do !back substitution d(JI) = d(JI)/b(JI) do j = JI-1,1,-1 d(j) = (d(j)-c(j)*d(j+1))/b(j)...
  20. watto8

    heat equation using crank-nicolsan scheme in fortran

    in the subroutine thomas_algorithm (a,b,c,d,JI), i still have JI which is 20.

Part and Inventory Search

Back
Top