|
[Sponsors] |
June 10, 2005, 19:24 |
Simple Programming
|
#1 |
Guest
Posts: n/a
|
Hi,
I need to calculate two things: (C5=SCAL1, C6=SCAL2) (1) pH=-log10(R*C5) (2) R=f(pH,C6) As written below the value of R is only known at the first node, but some value at others; using this approach the calculations are WRONG! Can someone offer a solution as to how one can wirte this simple code? (Since R is a variable, specifying within the loop as a constant defeats the purpose of the calculation)! Hope someone can help (and thanks for your help). SUBROUTINE USRINT CALL IPALL(BLAH...) pH=value1 R=value2 DO 101 I=1,NPT INODE=IPT(I) C5=MAX(SCAL(INODE,IPHASE,ISC1),SMALL) C7=MAX(SCAL(INODE,IPHASE,ISC2),SMALL) r=MAX(USRGR(INODE,IPHASE),SMALL) C5= VALUE3 C6= VALUE4 C7= VALUE5 pH= -LOG10(r*C5) C10= pH r= f(pH,C5,C7) 100 CONTINUE |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SIMPLE algorithm in 3D cylindrical coordinates | zouchu | Main CFD Forum | 1 | January 20, 2014 17:02 |
How to add correcting pressure equation in SIMPLE of MRFSimpleFOAM? | renyun0511 | OpenFOAM Programming & Development | 0 | November 4, 2010 01:38 |
compressible SIMPLE method | fakor | Main CFD Forum | 1 | August 30, 2010 11:21 |
PISO vs. SIMPLE | benedikt flurl | Main CFD Forum | 2 | April 14, 2005 06:54 |
flow over a 2D cyl using SIMPLE | T | Main CFD Forum | 1 | January 27, 2001 07:32 |