{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

prob6-7-code

# prob6-7-code - p3p =(b(1*a(2,2-b(2*a(1,2/det p6p...

This preview shows pages 1–2. Sign up to view the full content.

program main cccccccccccccccccccccccc c prob 6.7 from patankar cccccccccccccccccccccccc real qa,qb,qc,qd,qe,qf real p1,p2,p3,p4,p5,p6 real p3p,p6p real ca,cb,cc,cd,ce,cf dimension a(2,2),b(2) c .... bcs p1=275 p2=270 p4=0 p5=40 qf=20 c... initial guesses p3=0 p6=0 c... c values ca=0.4 cb=0.2 cc=0.1 cd=0.2 ce=0.1 cf=0.2 c... iteration loop do iter=1,2 print *,' ' print *,'**** iter =', iter, '****' qa =ca*(p1-p3) qb =cb*(p3-p2) qc=cc*(p4-p3) qd=cd*(p3-p6) qe=ce*(p5-p6) print *,' qa*,qb*, qc*, qd*, qe*=', + qa,qb, qc, qd, qe c... solve p-prime equations a(1,1)= 0.9 a(1,2)=-0.2 a(2,1)=-0.2 a(2,2)=0.3

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

View Full Document
b(1) = qa+qc-qb-qd b(2) = qd+qe -qf det = a(1,1)*a(2,2)-a(2,1)*a(1,2)
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: p3p = (b(1)*a(2,2)-b(2)*a(1,2))/det p6p = (b(2)*a(1,1)-b(1)*a(2,1))/det print *, 'p3p,p6p=',p3p,p6p c... correct pressure p3 = p3+p3p p6 = p6+p6p print *, 'corrected p3,p6=',p3,p6 c... correct velocity qa = qa-ca*p3p qb = qb +cb*p3p qc = qc -cc*p3p qd =qd +cd*(p3p-p6p) qe = qe -ce*p6p print *,'qa+qc-qb-qd=', qa+qc-qb-qd print *,'qd+qe-qf=',qd+qe-qf print *,'qa -ca*(p1-p3)=',qa -ca*(p1-p3) print *,'qb -cb*(p3-p2)=',qb -cb*(p3-p2) print *,'qc -cc*(p4-p3)=',qc -cc*(p4-p3) print *,'qd -cd*(p3-p6)=',qd -cd*(p3-p6) print *,'qe -ce*(p5-p6)=',qe -ce*(p5-p6) print *, 'qa,qb,qc,qd,qe,qf=',qa,qb,qc,qd,qe,qf print *,'p1,p2,p3,p4,p5,p6=',p1,p2,p3,p4,p5,p6 end do stop end...
View Full Document

{[ snackBarMessage ]}