Adaptation using UDF's
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.
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.
|All times are GMT -4. The time now is 01:26.|