|
[Sponsors] |
August 21, 2020, 16:30 |
UDF for charge density parameter
|
#1 |
New Member
Alex
Join Date: May 2019
Posts: 2
Rep Power: 0 |
Hello, i'm trying to use UDF for charge density of inert particles. I'm using MHD module and DPM.
When using discrete phase sample on reports (particle tracks for example) i see error: Error at Node 2: get_udf_function: function charge_density_macro has wrong type: 2! = 46. It happened even with simple code like i used last time: #include "udf.h" DEFINE_DPM_PROPERTY(charge_density_macro, c, t, p, T) { real charge_density; charge_density = -1; return charge_density; } I know, error means that i'm using wrong type of udf for this parameter, but i wonder what i do wrong... P.S. If i use interpreted , here is no mistake. That erroe happenes only when i use compiled code (i need to use compiled for main code) Last edited by ofsavier; August 22, 2020 at 08:42. |
|
August 24, 2020, 01:26 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
I've compiled this code without any error
Are you sure you can define negative density?
__________________
best regards ****************************** press LIKE if this message was helpful |
|
Tags |
mhd, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF for modifying density of mixture phase during the calculating process | sola86 | Fluent UDF and Scheme Programming | 2 | May 28, 2019 10:24 |
confusion on how to write udf for density of a mixture solution in multiphase problem | Hirakjyoti | Fluent UDF and Scheme Programming | 1 | September 11, 2017 02:21 |
Density UDF Divergence | Baden | Fluent UDF and Scheme Programming | 0 | January 11, 2017 16:25 |
UDF for solid density | gghazal | Fluent UDF and Scheme Programming | 3 | November 13, 2012 04:10 |
UDF: Density Cell Gradient Vector Macros | matteo | FLUENT | 0 | December 1, 2007 13:14 |