CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Interpret three UDF for property (http://www.cfd-online.com/Forums/fluent/40687-interpret-three-udf-property.html)

Atsu April 21, 2006 12:19

Interpret three UDF for property
 
Hi all,

I am trying to use UDF for three properties, which are density, thermal conductivity and viscosity. When I compile the UDF I get only one UDF. The last one compiled overlaps the previous one, so I cannot define three different properties using the UDF. I compiled them by the "Interpreted UDF". How can I use the three UDFs at a same time?

I would appreciate any help and suggestions

thank you Atsu

Atsu April 21, 2006 13:41

Help: Interpret three UDF for property
 
Hi again,

I tryed to set each UDFs at a time in another way; 1. interpret density.c -> set density on Mat. prop. 2. interpret viscosity.c -> set viscosity on it 3. interpret thermcond.c -> set therm. cond. on it and then tryed to calculate, but not run. How can I use the three UDFs at a same time?

Please help, Atsu

Markus April 22, 2006 05:31

Re: Help: Interpret three UDF for property
 
Hi Atsu,

You don't have to use different c-files for each UDF. Just put all DEFINE_PROPERTY macros in one single c-file, compile this file and all the UDF's will be available. Cheers Markus

Atsu April 22, 2006 12:12

Re: Help: Interpret three UDF for property
 
Hi Markus,

Thank you for your favor. Could you show me more about how I should make one single c-file for some properties? Should I make c-file for three properties as follows?;

#include "udf.h"

DEFINE_PROPERTY(prop_name, cell, thread)

{

real temp, press, density, thermalcond, visco;

temp = C_T(cell, thread);

press = C_P(cell, thread);

{/* equation for density */}

{/* equation for thermalcond */}

{/* equation for visco */}

C_MU_L(cell, thread) = visco;

C_R(cell, thread) = density;

C_K_L(cell, thread) = thermalcond;

}


Atsu April 22, 2006 15:04

Re: Help: Interpret three UDF for property
 
Hi Markus,

I can run!! Thank you very much for your advice.

I had to make it listed bellow;

#include "udf.h"

DEFINE_PROPERTY(density, cell, thread)

{/* equation for density */}

DEFINE_PROPERTY(thermalcond, cell, thread)

{/* equation for thermalcond */}

DEFINE_PROPERTY(viscosity, cell, thread)

{/* equation for visco */}



All times are GMT -4. The time now is 01:28.