|
[Sponsors] |
|
May 18, 2004, 04:29 |
USRSRC User scalar
|
#1 |
Guest
Posts: n/a
|
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? Thanks Andrea Musso |
|
May 23, 2004, 00:31 |
Re: USRSRC User scalar
|
#2 |
Guest
Posts: n/a
|
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 GETSCA('HYD',IHYD,CWORK) 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) = ............ ENDDO ENDIF 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. Jeff |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
dieselFoam problem!! trying to introduce a new heat transfer model | vivek070176 | OpenFOAM Programming & Development | 10 | December 23, 2014 23:48 |
solving passive scalar by user function in AVLFIRE | huyp | Main CFD Forum | 0 | September 4, 2008 10:21 |
The source of user scalar equation | rambol | CFX | 3 | November 14, 2002 07:37 |
add user scalar in one phase | zhu | CFX | 0 | April 27, 2002 03:45 |
Using user scalar in USRRAT | Jakub | CFX | 0 | April 25, 2002 13:18 |