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

Passing udf value to fluent

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 5, 2019, 15:21
Default Passing udf value to fluent
  #1
Member
 
Durgesh
Join Date: Oct 2018
Posts: 34
Rep Power: 7
durg is on a distinguished road
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
durg is offline   Reply With Quote

Old   February 10, 2019, 18:44
Default
  #2
Senior Member
 
Join Date: Sep 2017
Posts: 246
Rep Power: 11
obscureed is on a distinguished road
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
obscureed is offline   Reply With Quote

Old   February 11, 2019, 12:55
Default
  #3
Member
 
Durgesh
Join Date: Oct 2018
Posts: 34
Rep Power: 7
durg is on a distinguished road
Thank you for your valuable response. It is of great help.
durg 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
Problem running fluent with udf on batch tobi b. Fluent UDF and Scheme Programming 3 April 14, 2016 13:54
implementing UDF for fluent in workbench for running multiple simulations faizan_habib7 Fluent UDF and Scheme Programming 0 March 18, 2016 22:29
Running UDF with Supercomputer roi247 FLUENT 4 October 15, 2015 13:41
Passing value in UDF Fluent hariswch2 Fluent UDF and Scheme Programming 0 September 19, 2015 02:58
fluent UDF external library lapack problem Rick FLUENT 0 May 7, 2008 10:16


All times are GMT -4. The time now is 04:26.