CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

modify a intern variable of Fluent with scheme and UDF

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Kokemoor

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 27, 2015, 10:25
Default modify a intern variable of Fluent with scheme and UDF
  #1
Member
 
Join Date: Feb 2015
Posts: 32
Rep Power: 11
fanch33 is on a distinguished road
Hi everybody,

I want to modify at each time step in each cell, the constant Cepsilon2 (Ceps2) from the k-epsilon RANS model that we can access from the viscous model panel.
In my UDF, I compute the value I want for Ceps2 in a C_UDMI variable.

From what I read, I think that I need to send this value from the UDF to a scheme program (using RP_Set_Real) to update the value of Ceps2.

How can I get back the value with a scheme program ?

Thanks for your help

Fanch
fanch33 is offline   Reply With Quote

Old   March 2, 2015, 02:32
Default
  #2
Member
 
Join Date: Nov 2014
Posts: 31
Rep Power: 11
maverick123 is on a distinguished road
Hi Fanch,

As per my understanding, you have to use DEFINE_ADJUST routine, not rp_vars.

Best Regards
maverick123 is offline   Reply With Quote

Old   March 2, 2015, 10:54
Default
  #3
Senior Member
 
Andrew Kokemoor
Join Date: Aug 2013
Posts: 122
Rep Power: 13
Kokemoor is on a distinguished road
The turbulent model constants are actually already stored as Scheme variables, so you shouldn't need to write any Scheme code. The constant C2-Epsilon for the RNG model is stored in the variable rng-kec2. If you use RP_Set_Real("rng-kec2",Ceps2) in your DEFINE_ADJUST macro, I don't think you'll need to do anything else.
ingpeppe likes this.
Kokemoor is offline   Reply With Quote

Old   March 2, 2015, 11:01
Default
  #4
Member
 
Join Date: Feb 2015
Posts: 32
Rep Power: 11
fanch33 is on a distinguished road
thank you for your answer Kokemoor.

I thought that I needed to use a scheme because my company give me a manual on that, but a bit obsolete...

But you're right, I tried RP_Set_Real in my UDF this morning and the Ceps2 value were updated as I wanted.

Anyway, thanks for your answer
fanch33 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
changing scheme variable with UDF? Wagemakers FLUENT 17 September 30, 2015 14:34
Calling zone name, zone id and total pressure from Fluent scheme to UDF kuldip Fluent UDF and Scheme Programming 2 October 6, 2014 00:23
udf for chemical reduction scheme yorelchr Fluent UDF and Scheme Programming 0 September 20, 2013 10:55
How to combine UDF and Scheme? ali hemmati Fluent UDF and Scheme Programming 3 March 19, 2011 14:45
Scheme and Fluent UDF? Arthur Valais FLUENT 11 January 31, 2000 13:19


All times are GMT -4. The time now is 10:50.