|
[Sponsors] |
February 23, 2020, 03:11 |
Udf Please help :(
|
#1 |
New Member
kedy6lsy
Join Date: Oct 2019
Posts: 10
Rep Power: 6 |
Hi all, i am trying to code a udf for calculating the diffusion coefficient of each species for a non-unity lewis number
The code below is calculating the diffusion coefficient for the methane species, the code is suggested from the udf manual, but I'm having error as fluent say :"Error: C:/Users/LEONGS~1/AppData/Local/Temp/LewisNumber.c.14616.3.c: line 19: structure reference not implemented" Same error is also shown when i put original code from the udf manual #include "udf.h" /*** Non-unity Lewis Number UDF ***/ #define Le_CH4 0.97 DEFINE_PROPERTY(CH4_Diff,c,t) { real ktc; //thermal conductivity real rho; //Density real Cp; //Viscosity real Diff; //Mass Diffusion Coefficient int i; //Species Index Material *sp; //Species Pointer Property *prop; //Pointer to property array mixture_species_loop(THREAD_MATERIAL(t),sp,i) { prop = (MATERIAL_PROPERTY(sp)); // ktc = generic_property(c,t,prop,PROP_ktc,C_T(c,t)); //return ktc of species i rho = generic_property(c,t,prop,PROP_rho,C_T(c,t)); //return rho of species i Cp = generic_property(c,t,prop,PROP_Cp,C_T(c,t)); //return Cp of species i Diff = Le_CH4*rho*Cp/ktc; } return Diff; } |
|
February 23, 2020, 03:34 |
Compilation
|
#2 |
Senior Member
|
You most likely are trying to interpret it. That won't work. You ought to compile it.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
February 23, 2020, 03:36 |
|
#3 |
New Member
kedy6lsy
Join Date: Oct 2019
Posts: 10
Rep Power: 6 |
how can i do that?
|
|
February 23, 2020, 06:14 |
VS or VC++
|
#4 |
Senior Member
|
Since you are using Windows, you need to install VS or VC++ or MS Build Tools with C++ compiler.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
udf for one dimensional linear motion based on force | maccheese | Fluent UDF and Scheme Programming | 2 | September 1, 2019 02:18 |
Save output of udf in another udf! | JuanJoMex | FLUENT | 0 | February 8, 2018 12:43 |
UDF Compilation Error - Loading Library - COMMON Problem! Help! | robtheslob | Fluent UDF and Scheme Programming | 8 | July 24, 2015 00:53 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 22:14 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 04:01 |