How to read data in DEFINE_SOURCE( ) from DPM?
I need to calculate particle concentration in DEFINE_SOURCE( ),but the DPM data all have p in their variables like P_MASS(p) which the DEFINE_SOURCE( )cannot recognize. How to solve this problem? Thanks a lot!
|
Re: How to read data in DEFINE_SOURCE( ) from DPM?
particle concentration in kg/m3Cell = C_DPMS_CONCENTRATION(c,t)
RoM |
Re: How to read data in DEFINE_SOURCE( ) from DPM?
Thank you very much, Rom.
I use a UDF to solve electric field with the source defined by UDF. When I run the UDF, the following error occures: iter time/iter chip-exec: charge_density: wrong return type: void udf function expected Error: FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. Error Object: () The UDF is shown below: #include "udf.h" #define QM -5e-6 #define N 2500 DEFINE_SOURCE(charge_density,c,t,dS,eqn) { real density; density=QM*C_DPMS_CONCENTRATION(c,t)/C_VOLUME(c,t); printf("density", density); return density; } |
All times are GMT -4. The time now is 21:06. |