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

USER_GETVAR

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 11, 2003, 16:21
Default USER_GETVAR
  #1
Jonathan
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
  Reply With Quote

Old   November 11, 2003, 16:45
Default Re: USER_GETVAR
  #2
Johnson
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
  Reply With Quote

Old   November 12, 2003, 10:28
Default Re: USER_GETVAR
  #3
Jonathan
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
  Reply With Quote

Old   November 12, 2003, 12:38
Default Re: USER_GETVAR
  #4
Johnson
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
  Reply With Quote

Old   June 3, 2021, 11:10
Default
  #5
New Member
 
jinzhihui
Join Date: Oct 2017
Posts: 12
Rep Power: 8
Jinzhihui is on a distinguished road
dear all
Now I am trying to couple CFX with other code.
Jinzhihui is offline   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



All times are GMT -4. The time now is 17:35.