|
[Sponsors] |
February 5, 2019, 16:21 |
Passing udf value to fluent
|
#1 |
Member
Durgesh
Join Date: Oct 2018
Posts: 34
Rep Power: 8 |
Hello!
I am solving solidification problem and for this, I am writing a udf with ADJUST macros. In that, I want to manipulate fluent's liquid fraction value through udf means fluent should use udf liquid fraction value for flow, energy, and species calculation. To give udf value to fluent, I am writing: C_LIQF(c,t)=C_UDMI(c,t,0); at every iteration fluent should use this value. Am I correctly doing this? Because when I am checking the contours of both fluent and udf liquid fraction value they are showing a slight difference. In my point of view, they should show exactly the same range of values in contour plot, as I am passing to fluent. Please clarify. Thank you |
|
February 10, 2019, 19:44 |
|
#2 |
Senior Member
Join Date: Sep 2017
Posts: 246
Rep Power: 12 |
Hi Durg,
If you put values into a variable, but Fluent is also solving that variable (and solving, by definition, puts new values into as well), then you cannot be sure what the result will be. In general, it will be a mess. An example of this is that Fluent's definition of a solution will include conservation of mass, energy, mass of separate species, etc. If you put arbitrary values into cells, and these quantities are not conserved by the new solution, Fluent will change the values to work towards conservation. (Actually, the situation is more complex than this, because Fluent often uses the current values and previous values in its calculations, for example to apply under-relaxation. So the problem does not disappear if new values obey conservation laws.) One way you *can* use UDFs to influence solved variables is by applying source terms. The solver does not need to know the origin of these sources, so it is happy to move the solution in response. If conservation of mass (for example) is not obeyed, as specified by the sources, then that is OK. This is the general principle. Unfortunately I am not familiar with the use of sources in solidification models. Good luck! Ed |
|
February 11, 2019, 13:55 |
|
#3 |
Member
Durgesh
Join Date: Oct 2018
Posts: 34
Rep Power: 8 |
Thank you for your valuable response. It is of great help.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem running fluent with udf on batch | tobi b. | Fluent UDF and Scheme Programming | 3 | April 14, 2016 14:54 |
implementing UDF for fluent in workbench for running multiple simulations | faizan_habib7 | Fluent UDF and Scheme Programming | 0 | March 18, 2016 23:29 |
Running UDF with Supercomputer | roi247 | FLUENT | 4 | October 15, 2015 14:41 |
Passing value in UDF Fluent | hariswch2 | Fluent UDF and Scheme Programming | 0 | September 19, 2015 03:58 |
fluent UDF external library lapack problem | Rick | FLUENT | 0 | May 7, 2008 11:16 |