|
[Sponsors] |
modify a intern variable of Fluent with scheme and UDF |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 27, 2015, 11:25 |
modify a intern variable of Fluent with scheme and UDF
|
#1 |
Member
Join Date: Feb 2015
Posts: 32
Rep Power: 11 |
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 |
|
March 2, 2015, 03:32 |
|
#2 |
Member
Join Date: Nov 2014
Posts: 31
Rep Power: 11 |
Hi Fanch,
As per my understanding, you have to use DEFINE_ADJUST routine, not rp_vars. Best Regards |
|
March 2, 2015, 11:54 |
|
#3 |
Senior Member
Andrew Kokemoor
Join Date: Aug 2013
Posts: 122
Rep Power: 14 |
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.
|
|
March 2, 2015, 12:01 |
|
#4 |
Member
Join Date: Feb 2015
Posts: 32
Rep Power: 11 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
changing scheme variable with UDF? | Wagemakers | FLUENT | 17 | September 30, 2015 15:34 |
Calling zone name, zone id and total pressure from Fluent scheme to UDF | kuldip | Fluent UDF and Scheme Programming | 2 | October 6, 2014 01:23 |
udf for chemical reduction scheme | yorelchr | Fluent UDF and Scheme Programming | 0 | September 20, 2013 11:55 |
How to combine UDF and Scheme? | ali hemmati | Fluent UDF and Scheme Programming | 3 | March 19, 2011 15:45 |
Scheme and Fluent UDF? | Arthur Valais | FLUENT | 11 | January 31, 2000 14:19 |