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

USER_GETVAR

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 11, 2003, 17: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, 17: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, 11: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, 13: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

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



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