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 Mike Lewis 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

    PROGRAM Gauss_Seidel IMPLICIT NONE ! Declare Variables Real, allocatable :: x(:),y(:),u(:,:),u_old(:,:) Real:: h,tolerence,error Integer:: i,j,JI,NI h=0.01 JI=100 NI=173 error = 1.d0 tolerence = 10E-4 ! Total number of space stepsize allocate...
  2. watto8

    Gauss-Siedel Matrix to solve Elliptic Equation

    Qs: Write a FORTRAN program to approximately solve elliptic equation : - u_xx - u_yy=1 with the five-point finite difference formula in the right-angled triangle, sides 1,2,3^(1/2) using the Gauss-Seidel matrix solver withe the boundary conditions u=0 on all sides. Take a mesh spacing to be...
  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

    PROGRAM Jacobi_method 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*...
  6. watto8

    Jacobi iterative method to solve elliptic equation

    PROGRAM 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...
  7. watto8

    Jacobi iterative method to solve elliptic equation

    PROGRAM Jacobi_method IMPLICIT 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*...
  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

    I have read your comment very carefully and i really appreciate it. but there might be some misunderstanding between our comments. Anyway i manage it to get some changes in my coding and it is working but i really don't whether i have answer the question or not? Refering back to qs agian: Qs...
  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

    This the question again: Qs: Write a FORTRAN program to approximately solve elliptic equation :-u_xx-u_yy=1 on a unit square -1<x<1, -1<y<1, with u=0 on the entire boundary. Use the five -point finite difference formula on a uniform mesh of size h in each direction. Set up the matrix system...
  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

    Qs: Write a FORTRAN program to approximately solve elliptic equation :-u_xx-u_yy=1 on a unit square -1<x<1, -1<y<1, with u=0 on the entire boundary. Use the five -point finite difference formula on a uniform mesh of size h in each direction. Set up the matrix system Au=b (taking the natural...
  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

    QUESTION: Heat diffusion equation is u_t= (D(u)u_x)_x. Modify this program to investigate the following developments: Allow for the diffusivity D(u) to change discontinuously, with initial data as u(x,0)= (1+x)(1-x)^2. boundary values u(+-1,t)=0. Treat in detail the case D(u)=1 when x<1/2 and...
  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

    subroutine thomas_algorithm (a,b,c,d,JI) ! a - sub-diagonal (means it is the diagonal below the main diagonal) ! b - the main diagonal ! c - sup-diagonal (means it is the diagonal above the main diagonal) ! d - right part implicit none real, intent(inout),dimension(JI) ...
  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