- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Anyone know whats wrong with this program for F95?
integer n, W, icount
real(8) Sig_tr, Sig_a, vSig_f, S, Lambda_tr, D, L, dx, k, S_o
real(8), allocatable :: A(:,:), B(:), Y(:,:), Z(:)
write(*,*) 'Input the number of nodes (n)'
read(*,*) n
write(*,*) 'Input the length of the slab(W)'
read(*,*) W
Sig_tr = 23;
Sig_a = 100;
vSig_f = 101;
S_o = 10e8;
Lambda_tr = 1/Sig_tr ;
D = Lambda_tr/3;
L = sqrt(D/Sig_a);
dx = W / (n-1);
k = S*L/(2*D);
allocate(A(n-1,n-1))
allocate(B(n-1))
A= Y(1:n-1 , 1:n-1);
B = Z(1:n-1);
allocate(Y(n,n))
Y = 0
allocate(Z(n))
Z = 0
Y(1,1) = ((D/dx)+(Sig_a*dx/2));
Y(1,2) = -D/dx;
Z(1) = S_o/2;
do icount = 2,n-1
Y(icount,icount) = (2*D)/dx+Sig_a*dx;
Y(icount,icount+1) = -D/dx;
Y(icount,icount-1) = -D/dx;
Z(icount) = 0;
enddo
!AAA = inv(A)*B;
!AAA(n) = 0
!print AAA
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jim Dempsey

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page