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

changing scheme variable with UDF?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 12, 2007, 08:35
Default changing scheme variable with UDF?
  #1
Wagemakers
Guest
 
Posts: n/a
Hi All,

Is it possible to change or set a scheme variable through an UDF? Currently, I use rpsetvar after I get the value from the UDF by printf. Is there a way to do this directly in the UDF?

Thanks

  Reply With Quote

Old   September 12, 2007, 08:41
Default Re: changing scheme variable with UDF?
  #2
Joe
Guest
 
Posts: n/a
yes. section 3.6 in the udf manual.
  Reply With Quote

Old   September 13, 2007, 05:10
Default Re: changing scheme variable with UDF?
  #3
Wagemakers
Guest
 
Posts: n/a
Thanks joe for the rapid respons,

I can access a scheme variable by rpgetvar in an UDF, and I'd like to change that variable within this UDF, not trhough the text interface by using rpsetvar. Is there a command similar to rpsetvar that can be used in the UDF? I read the UDf manual 3.6, but I don't seem to find it. Am I overlooking something?

With regards, R. Wagemakers

  Reply With Quote

Old   November 24, 2014, 06:56
Default
  #4
New Member
 
Alessandro Innocenti
Join Date: Nov 2014
Posts: 5
Rep Power: 2
Dr. Aliosha is on a distinguished road
Hi Wagemakers,
I'm facing the same problem.
Did you find any answer or workaround?

Regards,
Alessandro
Dr. Aliosha is offline   Reply With Quote

Old   November 24, 2014, 11:25
Default
  #5
Senior Member
 
Andrew Kokemoor
Join Date: Aug 2013
Posts: 116
Rep Power: 4
Kokemoor is on a distinguished road
UDF Manual, section 3.6.4, has what you're looking for.
Kokemoor is offline   Reply With Quote

Old   November 24, 2014, 11:45
Default
  #6
New Member
 
Alessandro Innocenti
Join Date: Nov 2014
Posts: 5
Rep Power: 2
Dr. Aliosha is on a distinguished road
Hi Kokemoor,
Thanks for your reply.
Looking at the UDF Manual (section 3.6.4), however, it seems that it's possible to define a scheme variable or get and use its value within the UDF.
It is also possible to change the scheme-variable value, from the text interface.

What I am looking for is a way to change the scheme-variable value from the UDF (instead of the text interface).

Any suggestion?

Thanks.
Dr. Aliosha is offline   Reply With Quote

Old   November 24, 2014, 11:56
Default
  #7
Senior Member
 
Andrew Kokemoor
Join Date: Aug 2013
Posts: 116
Rep Power: 4
Kokemoor is on a distinguished road
Sure enough, I guess it doesn't show those. Can't imagine why not. I should've looked more closely at what I suggested myself

There are matching functions for all the RP_Get_* functions:
RP_Set_Real("variable-name",real)
RP_Set_Integer("variable-name",int)
etc...
Kokemoor is offline   Reply With Quote

Old   November 25, 2014, 10:15
Default
  #8
New Member
 
Alessandro Innocenti
Join Date: Nov 2014
Posts: 5
Rep Power: 2
Dr. Aliosha is on a distinguished road
Good call!

Thank you Kokemoor.
Dr. Aliosha is offline   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
emag beta feature: charge density charlotte CFX 4 March 22, 2011 10:14
How to combine UDF and Scheme? ali hemmati Fluent UDF and Scheme Programming 3 March 19, 2011 15:45
Do I need to use UDF to get time-averaged variable? ivanbuz Fluent UDF and Scheme Programming 0 August 11, 2009 14:26
Variable for AVERAGE VELOCITY, Pressure etc. in UDF? aam Fluent UDF and Scheme Programming 0 May 15, 2009 05:21
Boundary Condition Types Using Scheme and UDF Nasir FLUENT 0 September 15, 2008 21:54


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