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...
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...
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...
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...
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...
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
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...
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...
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...
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.
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...
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) ...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.