CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Adaptation using UDF's (https://www.cfd-online.com/Forums/fluent/27413-adaptation-using-udfs.html)

Jackson December 12, 1999 13:59

Adaptation using UDF's
 
Hi,

I am trying to use Fluent to adapt the mesh according to an 'error sensor' that I have defined. In order to compute the value of this error sensor for an individual cell, I need to perform integrations of the flow variables around the faces of each cell, and integrations throughout the volumes of each cell.

I cannot do this using the 'Custom Field Functions' in Fluent, as I need information on the face areas etc (for each cell), and these are not available from the drop lists of 'Field Functions'.

As such, I have looked at creating a 'User Defined Function' (UDF) that will enable me to compute the error function at each cell in the fluid domain. However, I do not think that I can do this either, as there is no obvious 'allowed function' that enables me to assign local values to a new variable.

I would appreciate it if anyone could shed any light on my problem, or let me know if they have had similar difficulties.

Many thanks.

Jackson


Greg Perkins December 16, 1999 23:43

Re: Adaptation using UDF's
 
What you might try is to store your error function in a user defined scalar (and perhaps turn off solution of the transport equation or force it to your desired value). In this way you can have your error function stored for each control volume in the domain.

To adapt the grid based on this function use solution adaption on the scalar values and/or gradients. You can also use the scalar to visualise the error function in the domain using contour plots.

I have done this using material permeability.

Regards

Greg Perkins


All times are GMT -4. The time now is 21:44.