|
[Sponsors] |
Help: UDF problem--How to add bodyfore to the DPM |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 13, 2003, 16:10 |
Help: UDF problem--How to add bodyfore to the DPM
|
#1 |
Guest
Posts: n/a
|
My model is to build a ultrafine particle injection to laminar flow with the electric field fore. (2D, Steady,DPM). When I want to add the constant electric field as body fore using UDF, I met a compile error and following is my code:
#include "udf.h" #define ELECTRIC_FORCE=1.0045 DEFINE_DPM_BODY_FORCE(particle_body_electric, p, i) { real bforce; if(i==0) { bforce=0; } else { bforce=-ELECTRIC_FORCE; /* electric force Y */ } return bforce; } I noticed that I didn't use p as a parameter in the micro definition. But I don't know what's wrong with these seemingly simple lines. I need your help! Sincerely |
|
August 17, 2003, 09:46 |
Re: Help: UDF problem--How to add bodyfore to the
|
#2 |
Guest
Posts: n/a
|
I think the error is due to the define declaration It should be:
#define ELECTRIC_FORCE 1.005 |
|
August 17, 2003, 15:08 |
Re: Help: UDF problem--How to add bodyfore to the
|
#3 |
Guest
Posts: n/a
|
Thank u for your advice. I've already corrected it. But I still have some problems with UDF-sometimes it can compile the file I difined, sometimes it didn't. It's the exact same file. I really don't know what's wrong with the fluent compiler. Usually it needs several times to get it complied and connected to the iretation.
Good luck to U! |
|
August 18, 2003, 09:02 |
Re: Help: UDF problem--How to add bodyfore to the
|
#4 |
Guest
Posts: n/a
|
I don't know the detail of your udf, but if you want to use some advanced features of UDF, you'd better to use compiled rather than interpreted.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A problem about 'printf' and 'Message' in UDF. | LICH | Fluent UDF and Scheme Programming | 2 | May 2, 2013 03:45 |
DPM Output Problem (Again...) | DLINSA | Fluent UDF and Scheme Programming | 1 | March 16, 2012 01:45 |
Parallel DPM Udf problem | dust_2 | Fluent UDF and Scheme Programming | 4 | June 11, 2011 11:03 |
problem in compoile UDF | h.daniyel | FLUENT | 5 | June 12, 2008 06:06 |
fluent UDF external library lapack problem | Rick | FLUENT | 0 | May 7, 2008 11:16 |