CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   SU & SP: CFX 4.4 HELP!!! (https://www.cfd-online.com/Forums/cfx/21355-su-sp-cfx-4-4-help.html)

Robin K June 19, 2005 21:19

SU & SP: CFX 4.4 HELP!!!
 
Hi,

I want to put source:

Source=R3-R2-R1 where R1, R2 and R3 represent different expressions. R1=+ive, R2=-ive, R3=+ive

At the moment, I am carrying out the following operation:

SP(INODE,IPHASE)=SP(INODE,IPHASE)+R2*VOL(INODE)

SU(INODE,IPHASE)=SU(INODE,IPHASE)+((R3-R1))*VOL(INODE).

This is causing a divergence.

Does anyone have any other way of doing it!...I hope so...?

Thanks in Advance,

Robin K

Jeff June 27, 2005 21:30

Re: SU & SP: CFX 4.4 HELP!!!
 
Robin,

The form of a source term, when solving for variable phi is as follows:

Source = SU + SP * phi

Since in your source term, you don't have any variables that are a function of the solved variable, phi, SP should be zero.

SU(INODE,IPHASE) = SU(INODE,IPHASE) + R3 - R2 - R1 SP(INODE,IPHASE) = SP(INODE,IPHASE) + 0.0

Use this if your source is mostly positive.

If (R3-R2-R1) is very negative, you may want to put this in the SP term by first dividing by phi (since the code will multiply it by phi later). This would be:

SU(INODE,IPHASE) = SU(INODE,IPHASE) + 0.0 SP(INODE,IPHASE) = SP(INODE,IPHASE) + (R3-R2-R1)/phi(INODE,IPHASE)

This will make the matrix more diagonally dominant when SP gets carried to the other side and incorporated into the matrix diagonal.

Jeff


All times are GMT -4. The time now is 05:44.