|
[Sponsors] |
December 8, 2010, 00:44 |
Define_dpm_injecyion_init
|
#1 |
New Member
Pei
Join Date: Dec 2010
Posts: 3
Rep Power: 16 |
Dear all,
I am trying to define initial injection velocities (gradually increase with time, then reach a constant value) with UDF of DPM model. "DEFINE_DPM_INJECTION_INIT" I think is the right one to make. Following is my code and quite simple: # include "udf.h" # include "dpm.h" DEFINE_DPM_INJECTION_INIT(init_inj,I) { double xvel, yvel; Particle *p; double current_time; current_time = RP_Get_Real("flow-time"); loop(p, I->p_init) { xvel=2990291.3*current_time; if (xvel >= 0.0|| xvel <= 616.0) { xvel=2990291.3*current_time; yvel=242718.4*current_time; } else { xvel=616.0; yvel=50.0; } P_INIT_VEL(p)[0]=xvel; P_INIT_VEL(p)[1]=yvel; } return; } I define all other parameters, like position, diameter and others in point properties of injection. The compiling and hooking process is fine. But this udf seems not working, fluent still reads value of point properties, not from this UDF. Can anyone take a look at this UDF and find what's wrong with my code? Really appreciate your support! All the best, Cheers, Pei Last edited by Pei; December 8, 2010 at 00:46. Reason: misunderstanding of Title |
|
December 9, 2010, 04:36 |
find expert in DPM UDF area
|
#2 |
New Member
Pei
Join Date: Dec 2010
Posts: 3
Rep Power: 16 |
I am trying to compile a breakup UDF and meet some problems. As I am pretty new to this area, I want to find a expert in this area. Can you send me a email, I will reply back with the UDF I have? Because the UDF is too big, it's impossible to post here.
My email: yuanjiang.pei@gmail.com Would appreciate if anyone can help me! All the best, Cheers, Pei |
|
Tags |
define_dpm_injection_init, point properties, udf |
|
|