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

USER SCALAR

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread 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


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 Off
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 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


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