CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > CFX

USER SCALAR

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 13, 2005, 07:03
Default USER SCALAR
  #1
Robin K
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
  Reply With Quote

Old   May 15, 2005, 04:51
Default Re: USER SCALAR
  #2
Jeff
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
  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 10: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 03:45
Using user scalar in USRRAT Jakub CFX 0 April 25, 2002 13:18


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