CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Compiled UDFs - questions (https://www.cfd-online.com/Forums/fluent/42145-compiled-udfs-questions.html)

Antonis August 26, 2006 17:08

Compiled UDFs - questions
 
Hi!

I'm a rookie on the UDF subject and I have some questions.

1) I want to impose a Neuman boundary condition (velocity gradients), possibly through the DEFINE_ADJUST macro. Do I have to interpret it or compile it??

2) When using compiled UDFs, do I need to compile the source file BEFORE loading it in Fluent?

3) Can I compile using the devc++ compiler or is it not compatible with Fluent?

I'm using Fluent 6.2.16 and Windows XP.

I would appreciate any help!! Antonis

cadaei August 26, 2006 20:19

Re: Compiled UDFs - questions
 
Will try to answer some of your questions.

1) you wont be able to implement a boudnary condition using a DEFINE_ADJUST macro. You will only be able to change boundary conditions using DEFINE_PROFILE. It will be very difficult to implement a Neumann boudary condition in Fluent.

2) you can interpret the source code which doesnt require a compiler although it runs slower than compiling. I would recommend compiling.

3) I'm not sure about this one. Its easiest just to compile within fluent.

Antonis August 27, 2006 07:52

Re: Compiled UDFs - questions
 
Thanks for your answer.

For the Neumann condition, you mean it will be difficult to implement it through a interpreted UDF, or in general?

Also another question:

When setting a boundary conditions, should I loop over the cells of the boundary, or the face?


cadaei August 27, 2006 12:50

Re: Compiled UDFs - questions
 
For the Neumann condition, I think it will be difficult to implement at a wall because fluent does not allow you to access the boundary condition using UDF as far as i know. I have done something similar using two-phase flow and ended up using UDS equations to do it.

For setting boundary condition, you loop over all the faces on the boundary of interest. fluent stores values on the faces at the domain boundary and cell centroid in the interior

Albert F. August 28, 2006 11:03

Re: Compiled UDFs - questions
 
I tryed to compile UDF using dev c++ but it didn't worked. As far as I know you need to install .Net framework and make a few changes at enviroment settings. If you want look for a post called error while compiling udf, I posted the instructions I followed to solve compilers problems.

Antonis August 29, 2006 08:36

Re: Compiled UDFs - questions
 
@cadaei: I don't want to implement the Neumann condition at a wall, but at a velocity inlet (in fact I want to impose the 2d zero vorticity condition du/dy=dv/dx).

@Albert F.: thanks, I found the previous thread, very helpful.

Rahul123 December 26, 2012 07:12

Can anyone tell me how to apply du/dy=0 at a boundary using UDF.
I cannot understand how to differentiate between du/dx and du/dy
thank you


All times are GMT -4. The time now is 23:39.