knokap6 -...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
c1234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890 c *************************************************** c Name - Kimberly Okafor c Email - knokafor@uh.edu c ECE 3331 Computer Problem 6 c Semester - Spring 2010 c *************************************************** c Purpose - To solve for the output weight fractions c Yin and Xin c *************************************************** c Data files c c cp61010.txt - input data file comtaining N, F2,F1, c Yin, Xin, and K c knokap6.out - output file to which results will be c written c *************************************************** c program main c c DECLARATIONS c N-> number of stages c F1-> flowrate c F2-> flowrate c Yin-> weight fraction c Xin-> weight fraction c K-> distribution coefficient c double precision F1, F2, Yin, Xin, K REAL coeff(10,10), RH(10), X(10), UL(10,11), S(10) integer num, i, j, N, IER, IWRT,LDA c open files open(unit=5,file='cp61010.txt',status='old') open(unit=6,file='knokap6.out') c initialize num and lda lda=10 num=0 c start loop 5 Read(5,*,end=100)N,F1,F2,Yin,Xin,K c initerate num num=num+1 c echo check write(6,*) write(6,*)'For Data Set No.',num write(6,*) write(6,*)'Number of Stages: ', N write(6,*)'Distribution coefficient: ',K write(6,*)'Flowrate F1: ',F1 write(6,*)'Flowrate F2: ',F2 write(6,*)'Weight Fraction Yin: ',Yin write(6,*)'Weight Fraction Xin: ',Xin c call on Build call Build(N,F1,F2,Yin,Xin,K,coeff,RH) c print coefficient matrix write(6,*)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
write(6,*)'COEFFICIENT MATRIX' write(6,*)'------------------------------------------------------' do 10 i=1,N,1 write(6,*)(coeff(i,j),j=1,N) 10 continue write(6,*) write(6,*)'______________________________________________________' c print right hand vector write(6,*) write(6,*)'RIGHT-HAND-VECTOR' write(6,*)'------------------------------------------------------' do 15 i=1,N,1 write(6,*)RH(i)
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

knokap6 -...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online