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

Varying user scalar boundry conditions

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 9, 2000, 10:35
Default Varying user scalar boundry conditions
  #1
Franz Thomsen
Guest
 
Posts: n/a
I seem to be having a problem in CFX4.2. I am using the USRBCS subroutine to modify user scalars on a boundary, but I seem to be having a problem using GETSCA to get my scalarvariables for later use in VARBCS. Using GETVAR for eg. the temperature or pressure like in the example works fine. Have any of you had the same problem or if not, could I see the fortran source ?

Regards Franz Thomsen Student Aalborg University
  Reply With Quote

Old   May 9, 2000, 11:11
Default Re: Varying user scalar boundry conditions
  #2
Gert-Jan van der Gulik
Guest
 
Posts: n/a
The manual is very clear in this:

CALL GETSCA('SCALARNAME',IVAR,CWORK)

IVAR is the number of the scalar equation that you are looking for. Now you can alter the value of the scalar by assigning SCAL(INODE,IPHS,IVAR).

Works fine all the time. If it doesn't help, contact me for some fortran code.

Anyway, good luck.

Gert-Jan van der Gulik
  Reply With Quote

Old   May 10, 2000, 04:30
Default Re: Varying user scalar boundry conditions
  #3
Franz Thomsen
Guest
 
Posts: n/a
Yes, the manual is very clear about that, and that is I think the problem lies somewhere else. I have included the two pieces of fortran code.

In command file I have specified a patch and set the pressure and a userscalar (TEST1) on this boundry.

My first example shows, like in the example in the manual, how to write one of the "non user scalars" on the boundry to the screen. The result is whatever pressure I specify from the command file.

IUBCSF=2

CALL GETVAR('USRBCS','P ',IPRESSURE)

CALL FILCON('USRBCS','TEST.TXT','OPEN','FORMATTED',

+ 'NEW',INR1,0,IOST,IERR1)

CALL IPREC('MYPATCH','PATCH','CENTRES',IPT,ILEN,JLEN,KL EN,

+ CWORK,IWORK)

DO 103 K = 1, KLEN

DO 102 J = 1, JLEN

DO 101 I = 1, ILEN

INODE = IP(I,J,K)

WRITE(INR1,*) 'PRESSURE : ', VARBCS(IPRESSURE,1,INODE)

101 CONTINUE 102 CONTINUE 103 CONTINUE

My next example shows exactly the same, but with the user scalar. The problem is, that the result of this is not the same as specified in the command file for the user scalar on the boundry.

IUBCSF=2

CALL GETSCA('TEST1',ITEST1,CWORK)

CALL FILCON('USRBCS','TEST.TXT','OPEN','FORMATTED',

+ 'NEW',INR1,0,IOST,IERR1)

CALL IPREC('MYPATCH','PATCH','CENTRES',IPT,ILEN,JLEN,KL EN,

+ CWORK,IWORK)

DO 103 K = 1, KLEN

DO 102 J = 1, JLEN

DO 101 I = 1, ILEN

INODE = IP(I,J,K)

WRITE(INR1,*) 'USER SCALAR : ', VARBCS(ITEST1,1,INODE)

101 CONTINUE 102 CONTINUE 103 CONTINUE

My question is therefore. Why can´t I access my user scalars on the boundry when I can access other variables there ?
  Reply With Quote

Old   May 10, 2000, 04:53
Default Re: Varying user scalar boundry conditions
  #4
Jan Rusås
Guest
 
Posts: n/a
Dear Franz,

I think your problem is the naming of your scalar, try to read Gert-Jan's reply again. Your naming of the scalar should be SCAL(INODE,IPHS,IVAR) and not as you do it - VARBCS(ITEST1,1,INODE)

Hope this helps, Held og Lykke

Jan
  Reply With Quote

Old   May 10, 2000, 05:53
Default Re: Varying user scalar boundry conditions
  #5
Franz Thomsen
Guest
 
Posts: n/a
You are right ... problem solved ... thanks
  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
3D airfoil boundry conditions sarat FLUENT 1 July 15, 2009 08:09
solving passive scalar by user function in AVLFIRE huyp Main CFD Forum 0 September 4, 2008 10:21
Using user scalar in USRRAT Jakub CFX 0 April 25, 2002 13:18
add user scalar and modify pressure btzhu CFX 0 April 11, 2002 22:09
How to store my own information to a USER SCALAR? LI Ying CFX 1 August 15, 2001 16:55


All times are GMT -4. The time now is 09:21.