|
[Sponsors] |
May 13, 2005, 08:03 |
USER SCALAR
|
#1 |
Guest
Posts: n/a
|
Hi,
To use the IVAR for IEQN in USRSRC for the first scalar it would be defined as this: CALL GETVAR('USRSRC','SCAL ',ISCAL) CALL GETSCA('USER SCALAR1',ISC1,CWORK) ISC=ISCAL+ISC1-1 Then the above would be used as follows: IF (ISC.EQ.IEQN) THEN BLAH… NOW if there are many scalars (say 2 more)…then would it be simply: for scalar two CALL GETVAR('USRSRC','SCAL ',ISCAL) CALL GETSCA('USER SCALAR2',ISC2,CWORK) ISCA=ISCAL+ISC2-1 IF (ISCA.EQ.IEQN) THEN BLAH… CALL GETVAR('USRSRC','SCAL ',ISCAL) CALL GETSCA('USER SCALAR3',ISC3,CWORK) ISCB=ISCAL+ISC3-1 IF (ISCB.EQ.IEQN) THEN BLAH… ETC… Thanks, RK |
|
May 15, 2005, 05:51 |
Re: USER SCALAR
|
#2 |
Guest
Posts: n/a
|
That's the idea. I'd get all three indices (ISC,ISCA, and ISCB) first and then set up the if then else as:
IF (ISC.EQ.IEQN) THEN ....Blah1 ELSE IF(ISCA.EQ.IEQN) THEN ....Blah2 ELSE IF(ISCB.EQ.IEQN) THEN ....Blah3 ENDIF Just for programming efficiency. 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 24, 2014 00:48 |
solving passive scalar by user function in AVLFIRE | huyp | Main CFD Forum | 0 | September 4, 2008 11:21 |
The source of user scalar equation | rambol | CFX | 3 | November 14, 2002 08:37 |
add user scalar in one phase | zhu | CFX | 0 | April 27, 2002 04:45 |
Using user scalar in USRRAT | Jakub | CFX | 0 | April 25, 2002 14:18 |