CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

DEFINE_DPM_LAW problem

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By pakk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 4, 2014, 04:51
Default DEFINE_DPM_LAW problem
  #1
New Member
 
Nicola
Join Date: Nov 2014
Posts: 6
Rep Power: 12
Cigna is on a distinguished road
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.
Cigna is offline   Reply With Quote

Old   November 4, 2014, 07:32
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
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.
pakk is offline   Reply With Quote

Old   November 4, 2014, 07:43
Default
  #3
New Member
 
Nicola
Join Date: Nov 2014
Posts: 6
Rep Power: 12
Cigna is on a distinguished road
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.
Cigna is offline   Reply With Quote

Old   November 4, 2014, 08:34
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
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.
pakk is offline   Reply With Quote

Old   November 4, 2014, 08:43
Default
  #5
New Member
 
Nicola
Join Date: Nov 2014
Posts: 6
Rep Power: 12
Cigna is on a distinguished road
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
Cigna is offline   Reply With Quote

Old   November 4, 2014, 08:52
Default
  #6
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
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);
So, it looks like you guessed right when you tried "DevolatilizationLaw". You can also see the exact names of the other laws here.

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"
I don't know if that works, but it might be worth a try. Otherwise, I don't know.
pakk is offline   Reply With Quote

Old   November 4, 2014, 11:09
Default
  #7
New Member
 
Nicola
Join Date: Nov 2014
Posts: 6
Rep Power: 12
Cigna is on a distinguished road
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!!
Cigna is offline   Reply With Quote

Old   November 4, 2014, 11:52
Default
  #8
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Quote:
Originally Posted by Cigna View Post
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!!
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.)
pakk is offline   Reply With Quote

Old   November 6, 2014, 18:07
Default
  #9
New Member
 
Nicola
Join Date: Nov 2014
Posts: 6
Rep Power: 12
Cigna is on a distinguished road
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!
Cigna is offline   Reply With Quote

Old   April 20, 2015, 02:11
Default
  #10
New Member
 
Join Date: Apr 2015
Posts: 16
Rep Power: 11
why? is on a distinguished road
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.
why? is offline   Reply With Quote

Old   April 20, 2015, 04:08
Default
  #11
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
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.
why? likes this.
pakk is offline   Reply With Quote

Old   February 5, 2018, 10:30
Default
  #12
New Member
 
sowmi
Join Date: Mar 2017
Posts: 14
Rep Power: 9
Sowmi is on a distinguished road
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
Sowmi is offline   Reply With Quote

Reply

Tags
define_dpm_law, devolatilization fluent, devolatilizationlaw, udf


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 08:52.