|
[Sponsors] |
November 11, 2003, 17:21 |
USER_GETVAR
|
#1 |
Guest
Posts: n/a
|
Hello CFXers,
Is it possible to use USER_GETVAR with a User CEL FORTRAN Function twice to obtain two pointers to two different variables? I want to define a source based on two different mass fractions. Is this possible with User FORTRAN in CFX 5.6? Thanks, Jonathan |
|
November 11, 2003, 17:45 |
Re: USER_GETVAR
|
#2 |
Guest
Posts: n/a
|
Hi Jonathan
You can call user_getvar() as many times as you like within a User CEL Function. Just declare separate pointers for each variable you want to get. Johnson |
|
November 12, 2003, 11:28 |
Re: USER_GETVAR
|
#3 |
Guest
Posts: n/a
|
Thank you for your reply, Johnson. I must not understand the User FORTRAN well enough. Isn't RZ the only real pointer variable that you are allowed to declare? Or do I have to set RZ up as an array?
Jonthan |
|
November 12, 2003, 13:38 |
Re: USER_GETVAR
|
#4 |
Guest
Posts: n/a
|
Hi Jonathan
RZ() is the complete working real stack/array for the solver. A pointer returned from user_getvar() (e.g. pVAR1, if you've declared this as a __stack_point__ variable), is a pointer into this stack. Different variables will be located at different locations in the stack, so all you need to declare is a separate pointer for each variable you want to retrieve with user_getvar(), i.e. each time you want to call user_getvar(). Hope this helps, Johnson |
|
June 3, 2021, 12:10 |
|
#5 |
New Member
jinzhihui
Join Date: Oct 2017
Posts: 12
Rep Power: 9 |
dear all
Now I am trying to couple CFX with other code. |
|
|
|