|
[Sponsors] |
January 14, 2012, 00:23 |
udf
|
#1 |
New Member
studen
Join Date: Jan 2012
Posts: 12
Rep Power: 14 |
i have a udf for variable viscosity function in .cpp format can anyone tell me how make fluent read .cpp files i read in the udf manual it only read .c extension.
the program in c++ is running fine, do i have to change it to work in fluent, or just load it as udf. |
|
January 14, 2012, 04:28 |
|
#2 |
Member
Join Date: Nov 2011
Location: Czech Republic
Posts: 97
Rep Power: 15 |
You will have to rewrite it into C. From C++ it should be so hard.
|
|
January 14, 2012, 05:43 |
|
#3 |
Senior Member
shoeb khan
Join Date: Nov 2011
Posts: 179
Rep Power: 15 |
hi
I think you know copy paste . copy the content of the file opne a new notepad and paste it there with name.c hoke it in fluent and run you are done shk |
|
January 14, 2012, 06:30 |
|
#4 |
Member
Join Date: Nov 2011
Location: Czech Republic
Posts: 97
Rep Power: 15 |
Well I think it depends on how the UDF is written. If it is using C++ features, C compiler won't be able to compile it So if you can share your UDF with us.
|
|
January 15, 2012, 01:30 |
thanks for the help
|
#5 |
New Member
studen
Join Date: Jan 2012
Posts: 12
Rep Power: 14 |
Thank you guys for the replies, shk12345 i had tried that, but c++ syntax is different from c suchas println can't be used in c, we have to opt for pintf and many other commands,
sixkillers thank you, i wrote it in c with some help and the function works i hooked it fluent and its working fine there too. now am facing a new probs, in fluent i have assigned the wall temperature as 25 and the fluid temperature as 45, am doing working on natural convection cooling, so after a certain amount of time the temperature inside the cavity will become constant at 25. but when i check for temp contour and velocity countours at particular intervals of time, i dont get temp range from 25 to 45, fluent contour plots only show temp range from 25 to 31 , can anyone explain why this is happening, and how can i get the o/p for my desired, range (the one i want), i tried changing the setting in contours by removing auto range and manually set min to 25 and max to 45, but the plots are not matching with the previous work. help and suggestion pls, thnx in advance |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 08:37 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
How to add a UDF to a compiled UDF library | kim | FLUENT | 3 | October 26, 2011 22:38 |
UDF...UDF...UDF...UDF | Luc SEMINEL | FLUENT | 0 | November 25, 2002 05:03 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 05:01 |