CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   CFX 4:USRSRC (https://www.cfd-online.com/Forums/cfx/21603-cfx-4-usrsrc.html)

RK September 8, 2005 19:12

CFX 4:USRSRC
 
Hi,

Can someone suggest what is wrong with the following statement? It is causing a divergence at present.

C ADD SOURCE TERM C....+R1 is added to enthalpy equation C C Check if R1 is positive or negative

IF (R1.GE.0) THEN

SU(INODE,IPHASE)=SU(INODE,IPHASE)+R1*VOL(INODE)

ELSE SU(INODE,IPHASE)=SU(INODE,IPHASE)-R1*VOL(INODE)

ENDIF

Checking R1 values, there are some values that -ive values, while some have +ive values!

Many Thanks,

RK

Jeff September 10, 2005 10:51

Re: CFX 4:USRSRC
 
If the sources are either positive or negative, then that's what they are. Arbitrarily negating the negative values to make them all positive isn't physical.

Sources should ALWAYS be added, whether they are positive or negative.

Jeff



All times are GMT -4. The time now is 04:55.