CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Simple Programming (https://www.cfd-online.com/Forums/cfx/21331-simple-programming.html)

RK June 10, 2005 19:24

Simple Programming
 
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



All times are GMT -4. The time now is 22:39.