CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   changing scheme variable with UDF? (http://www.cfd-online.com/Forums/fluent/46012-changing-scheme-variable-udf.html)

Wagemakers September 12, 2007 08:35

changing scheme variable with UDF?
 
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


Joe September 12, 2007 08:41

Re: changing scheme variable with UDF?
 
yes. section 3.6 in the udf manual.

Wagemakers September 13, 2007 05:10

Re: changing scheme variable with UDF?
 
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


Dr. Aliosha November 24, 2014 06:56

Hi Wagemakers,
I'm facing the same problem.
Did you find any answer or workaround?

Regards,
Alessandro

Kokemoor November 24, 2014 11:25

UDF Manual, section 3.6.4, has what you're looking for.

Dr. Aliosha November 24, 2014 11:45

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.

Kokemoor November 24, 2014 11:56

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 :p

There are matching functions for all the RP_Get_* functions:
RP_Set_Real("variable-name",real)
RP_Set_Integer("variable-name",int)
etc...

Dr. Aliosha November 25, 2014 10:15

Good call!

Thank you Kokemoor.


All times are GMT -4. The time now is 18:42.