USRSRC User scalar
I need set a source in a mass fraction equation.
In command file I set
MASS FRACTION1 'HYD'
In usrsrc routine which string I should set like getvar argument?
Re: USRSRC User scalar
Trying hard to recall CFX-4 stuff.....
You need to find the equation index and then check to see if USRSRC is being called for the equation you want. Since HYD is a scalar and is embedded in the SCAL array, you need to get the SCAL index and add the mass fraction index to it (-1).
IPHASE = 1 ! first phase only
CALL GETVAR('USRSRC','SCAL ',ISCAL)
IVAR = ISCAL + IHYD - 1
IF (IEQN.EQ.IVAR) THEN
DO INODE = 1,NNODE ! loop over nodes
SU(INODE,IPHASE) = ............
SP(INODE,IPHASE) = ............
Hope this helps. You really need to switch to CFX-5. It's much easier than this, and fewer and fewer people remember this CFX-4 stuff.
|All times are GMT -4. The time now is 03:29.|