|
[Sponsors] |
June 4, 2014, 09:21 |
Trouble with compiling/hooking
|
#1 |
New Member
Join Date: Mar 2014
Posts: 11
Rep Power: 12 |
I'm trying to define the mass transfer between two phases using an UDF. The full version of my UDF need to be compile and not interpreted since I'll be using the function Scalar_Reconstruction and Scalar_Derivatives (from what I've read). There seem to be a problem with the compilation because when I compile the simple UDF below, it says it have been compile (except the warning: udf_names.c(8) : warning C4113: 'void (*)()' differs in parameter lists from 'void (*)(void)'), when I load the UDF, there doesn't seem to be any problem since it shows the name I have given the function (name).
The problem is when I try to hook the UDF in the models it says: No User-defined funciton has been loaded. It anyone has experience a similar problem or have any advise. It would be greatly appreciated. #include"udf.h" DEFINE_MASS_TRANSFER(name,cell,mixture_thread,from _phase_index,from_species_index,to_phase_index,to_ species_index) { real m_lg = 0.0; return (m_lg); } |
|
June 5, 2014, 10:27 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Try to remove the 'libudf' folder, and compile again. It might help; I don't understand why, but it helped me before in a similar context.
|
|
June 5, 2014, 11:56 |
|
#3 |
New Member
Join Date: Mar 2014
Posts: 11
Rep Power: 12 |
Thanks for your advise.
I've actually found the problem. I was activating the Linearized mass transfer from the solve/set/expert command and it seems like it was confusing fluent. So by setting it to [no], the problem was solved...until the next. Unfortunately, I am now experiencing problem with the UDF below where it doesn't print anything on the screen. #include "udf.h" DEFINE_ADJUST(my_adjust,d) { printf("---------------------TEST------------\n\n"); } I'll be needing the DEFINE_ADJUST macro to calculated the volume of fluid gradient in each cell. P.S: I still get the warning tho |
|
June 5, 2014, 12:11 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
I also get those warnings since switching from Fluent 14.5 to 15.0, and I just ignore them
About printf: use Message instead in compiled functions. |
|
June 5, 2014, 14:15 |
|
#5 |
New Member
Join Date: Mar 2014
Posts: 11
Rep Power: 12 |
It worked!
Thanks a lot. Hopefully it will help me figured out what is wrong with the rest of my UDF. |
|
June 27, 2014, 05:58 |
|
#6 |
New Member
Dhananjaya
Join Date: May 2014
Posts: 7
Rep Power: 12 |
How to activate or deactivate Solve/Set/Expert in Ansys fluent 14.5?
PLease help.. |
|
June 27, 2014, 08:22 |
|
#7 |
New Member
Join Date: Mar 2014
Posts: 11
Rep Power: 12 |
I'm working with the version 15.0 but it should be similar. You left-click on the main windows where there is the output for the iterations, then you type solve/set and press enter.
Fluent will ask the following question: Linearized Mass transfer UDF? use alternate formulation for wall temperatures? Save cell residuals for post-processing? Keep temporary solver memory from being freed? Allow selection of all applicable discretization schemes? You answer each one by typing yes or no and then pressing enter. Hope that is what you are looking for... |
|
June 27, 2014, 08:40 |
|
#8 |
New Member
Dhananjaya
Join Date: May 2014
Posts: 7
Rep Power: 12 |
Thanks Crow,
That problem is sorted out. djn |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ANSYS Meshing] Trouble meshing revolved feature | evoeng | ANSYS Meshing & Geometry | 1 | August 27, 2012 04:54 |
Trouble with Turbulent(K-Epsilon) solver | imzy | Main CFD Forum | 0 | October 27, 2011 18:34 |
[ICEM] trouble with mesh quality from ICEM in CFX Solver | escher25 | ANSYS Meshing & Geometry | 0 | February 28, 2011 08:38 |
[GAMBIT] Trouble meshing complex VOF geometry | RPJones | ANSYS Meshing & Geometry | 2 | February 14, 2011 19:54 |
Trouble migrating oodles to pisoFoam while changing from OF 1.5 to 1.7 | sebi | OpenFOAM | 0 | December 7, 2010 10:00 |