CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   SP in USRSRC-CFX4 (https://www.cfd-online.com/Forums/cfx/21529-sp-usrsrc-cfx4.html)

RK August 18, 2005 05:54

SP in USRSRC-CFX4
 
Hi,

In the Source representation: S= SU+(PHI*SP)

When putting variables into SP, does one need to differentiate the term with respect to the variable?

For example:

IF the source(=TERM): TERM=(CNST1*H/CNST2+H), CNST1 & CNST2=constants, H=enthalpy

If this is a negative source and needs to be placed in SP,

is it simply: SP(INODE,IPHASE)=SP(INODE,IPHASE)-(CNST1/CNST2+H)

or

does one need to dTERM/dh, and then put the solution to this into SP.

If it is the latter, could you also explain why is this so? And if it applies to SP, why does it not apply to SU?

Hope someone can shed some light on this issue...

Many thanks,

Robin

Jeff August 19, 2005 20:04

Re: SP in USRSRC-CFX4
 
No, you do not need the gradient terms in the sources.

The thing to remember is that the code multiplies your entire source in SP by the variable PHI (in your case H).

Your Source

C1*H/C2 + H

Can be factored into H * (C1/C2 + 1)

Thus SP should be set to

SP(INODE,IPHASE)= SP(INODE,IPHASE) + (C1/C2 + 1)

You put the source terms in SP if they are negative (i.e. C1 or C2 in this expression is negative, but not both). You don't actually "force" them to be negative by subtracting from SP. If (C1/C2+ 1) is positive, just multiply the whole thing by the local H(INODE,IPHASE) and add it to SU.

Hope this helps. Jeff

rk August 20, 2005 05:41

Re: SP in USRSRC-CFX4
 
Hi Jeff,

Many thanks Jeff for this and your previous replies to my requests.

Robin


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