|
[Sponsors] |
May 9, 2000, 11:35 |
Varying user scalar boundry conditions
|
#1 |
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 |
|
May 9, 2000, 12:11 |
Re: Varying user scalar boundry conditions
|
#2 |
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 |
|
May 10, 2000, 05:30 |
Re: Varying user scalar boundry conditions
|
#3 |
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 ? |
|
May 10, 2000, 05:53 |
Re: Varying user scalar boundry conditions
|
#4 |
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 |
|
May 10, 2000, 06:53 |
Re: Varying user scalar boundry conditions
|
#5 |
Guest
Posts: n/a
|
You are right ... problem solved ... thanks
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
3D airfoil boundry conditions | sarat | FLUENT | 1 | July 15, 2009 09:09 |
solving passive scalar by user function in AVLFIRE | huyp | Main CFD Forum | 0 | September 4, 2008 11:21 |
Using user scalar in USRRAT | Jakub | CFX | 0 | April 25, 2002 14:18 |
add user scalar and modify pressure | btzhu | CFX | 0 | April 11, 2002 23:09 |
How to store my own information to a USER SCALAR? | LI Ying | CFX | 1 | August 15, 2001 17:55 |