|
[Sponsors] |
November 4, 2014, 04:51 |
DEFINE_DPM_LAW problem
|
#1 |
New Member
Nicola
Join Date: Nov 2014
Posts: 6
Rep Power: 12 |
Hi to everybody,
I'm new in this forum couse I started using FLUENT 14.00 a few months ago. I'm simulating the gasifigation in a entrained flow gasifier of a biomass and I need to change the single-rate devolatilization law. To do that I wrote a DEFINE_DPM_LAW macro for the devolatilization following the vaporization example of the UDF manual, paragraph 2.5.7.3 Example When I try to interpret the macro, FlUENT displays this error: Error: <macro path>: line 15: function "DevolatilizationLaw" not found (pc=34). It seems that it's unable to find the function inside its library. Do you have an idea to solve this? Thanks Last edited by Cigna; November 4, 2014 at 08:05. |
|
November 4, 2014, 07:32 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Your link does not work for me. Anyway, in my Fluent help, section 2.5.7.3., the example uses "VaporizationLaw(p)", so I'll guess for now that your link shows the same example.
You changed it in your code to "DevolatilizationLaw". I have three questions: 1. Is my guess correct, that your link also uses VaporizationLaw? 2. Does your code give the same error message when you use VaporizationLaw instead of DevolatilizationLaw? 3. How did you decide to change "VaporizationLaw" into "DevolatilizationLaw"? Was that a guess, or did you find it somewhere? I can not find the name anywhere in the Fluent help, so I wonder how you know it should be written that way. |
|
November 4, 2014, 07:43 |
|
#3 |
New Member
Nicola
Join Date: Nov 2014
Posts: 6
Rep Power: 12 |
I just used the example code model step by step to rewrite my own devolatilization macro.
I have to change the Devolatilization law , not the vaporization one. The link is to the Fluent Help paragraph 2.5.7.3. Example. There aren't example for the devolatilization. I tried to call different Laws just to check and the program give me the same error. |
|
November 4, 2014, 08:34 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Can you please give answers to the questions I asked? Right now I still have to guess what you did and why you did it.
2. Does your code give the same error message when you use VaporizationLaw instead of DevolatilizationLaw? 3. How did you decide to change "VaporizationLaw" into "DevolatilizationLaw"? Was that a guess, or did you find it somewhere? I can not find the name anywhere in the Fluent help, so I wonder how you know it should be written that way. |
|
November 4, 2014, 08:43 |
|
#5 |
New Member
Nicola
Join Date: Nov 2014
Posts: 6
Rep Power: 12 |
2. yes the code give the same error message.
3. I supposed that the model presented by the example is valid for each type of law so I adapted the example to my devolatilization problem |
|
November 4, 2014, 08:52 |
|
#6 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
OK.
Regarding 3: I had a look in dpm_laws.h (you can find it somewhere in your Fluent installation), and this has the code: Code:
/************************************************************* * DPM Laws *************************************************************/ FLUENT_EXPORT void InertHeatingLaw(Tracked_Particle *p); FLUENT_EXPORT void VaporizationLaw(Tracked_Particle *p); FLUENT_EXPORT void BoilingLaw(Tracked_Particle *p); FLUENT_EXPORT void DevolatilizationLaw(Tracked_Particle *p); FLUENT_EXPORT void SurfaceCombustionLaw(Tracked_Particle *p); FLUENT_EXPORT void MulticomponentLaw( Tracked_Particle *p); The bad news is that it did not work. So Fluent apparently did not load the dpm_law.h header file, which is strange, I would think it should load automatically, if you have the dpm model enabled. (Do you have that?) You could try to add it manually by adding this to the top of the code: Code:
#include "dpm_laws.h" |
|
November 4, 2014, 11:09 |
|
#7 |
New Member
Nicola
Join Date: Nov 2014
Posts: 6
Rep Power: 12 |
Now I understand why you said "guess"! I red the dpm_laws.h before writing here! Sorry for my misanderstood. I tried also to write #include "dpm_laws.h" but it didn't work!
Thank you very much and if you have other suggestion please write here!! |
|
November 4, 2014, 11:52 |
|
#8 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
I have only one suggestion: try to get the Fluent example running first. Then you are sure there is no mistake in the code. (At least if we assume the Fluent manual contains no mistakes.)
|
|
November 6, 2014, 18:07 |
|
#9 |
New Member
Nicola
Join Date: Nov 2014
Posts: 6
Rep Power: 12 |
I FOUND A SOLUTION!
The obstacle was Windows 7!! The UDF is compiled immediatly if using Linux. Is also possible to compile or interpret the UDF in Windows running Fluent with the CMD shell of Microsoft Windows SDK v7.0 like is written step by step here: http://www.cfd-online.com/Forums/flu...ng-libudf.html. Thanks pakk for your suggestion! |
|
April 20, 2015, 02:11 |
|
#10 |
New Member
Join Date: Apr 2015
Posts: 16
Rep Power: 11 |
So for DPM laws which are not mentioned in the UDF manual, I can go to the Fluent installation directory source files, see what a specific law is called and call it by that name in my UDF?
Is that the actual way of doing this? Because I kept on thinking for DPM LAW SWITCH for example that I will have to write the actual DPM laws (I want to switch between regardless of them being present in Fluent) again in my UDF to use them. |
|
April 20, 2015, 04:08 |
|
#11 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
It appears to me that this is the way to do it, mainly because I don't know another way.
Ideally, it should all be included in the Fluent manual. In real life, the Fluent manual is incomplete. |
|
February 5, 2018, 10:30 |
|
#12 |
New Member
sowmi
Join Date: Mar 2017
Posts: 14
Rep Power: 9 |
Hi pakk
Can you suggest me how to write coding for DPM law and to insert in custom law option in injection window. Am using fluent 17 and I want to check the particle temperature along path line with the UDF. And am not able to get correct particle temperature if am using inert particle. It would be grateful if u reply me as early as possible.. Thanks in advance |
|
Tags |
define_dpm_law, devolatilization fluent, devolatilizationlaw, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF compiling problem | Wouter | Fluent UDF and Scheme Programming | 6 | June 6, 2012 05:43 |
Gambit - meshing over airfoil wrapping (?) problem | JFDC | FLUENT | 1 | July 11, 2011 06:59 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 07:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 20:13 |
Is this problem well posed? | Thomas P. Abraham | Main CFD Forum | 5 | September 8, 1999 15:52 |