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

[DPM/DDPM]How to employ UDF only for total flow rate of a injection?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 26, 2016, 11:19
Smile [DPM/DDPM]How to employ UDF only for total flow rate of a injection?
  #1
New Member
 
Join Date: Apr 2016
Posts: 11
Rep Power: 10
Narita is on a distinguished road
Dear all,
My simulation is transient, and I have tried DEFINE_DPM_INJECTION_INIT and 'loop(p,I->p_init)' inside for a simple constant-flow-rate case. However, the tracked particle number didn't increase with time.
In this situation, I start to think about writing an UDF which only modifies the total flow rate of a injection. I believed I could do it since we have a dropdown right beside the total-flow-rate blank.
Unfortunately, I failed to find the way to do it although I thought I've well read through the UDF guide..
Does anyone has some good ideas?
Narita is offline   Reply With Quote

Old   June 27, 2016, 02:18
Exclamation
  #2
New Member
 
Join Date: Apr 2016
Posts: 11
Rep Power: 10
Narita is on a distinguished road
Quote:
Originally Posted by Narita View Post
Dear all,
My simulation is transient, and I have tried DEFINE_DPM_INJECTION_INIT and 'loop(p,I->p_init)' inside for a simple constant-flow-rate case. However, the tracked particle number didn't increase with time.
In this situation, I start to think about writing an UDF which only modifies the total flow rate of a injection. I believed I could do it since we have a dropdown right beside the total-flow-rate blank.
Unfortunately, I failed to find the way to do it although I thought I've well read through the UDF guide..
Does anyone has some good ideas?
!!!!!!!!!!!!!
It seems I made a mistake when employing DEFINE_DPM_INJECTION_INIT. I'm now attempting with it.
Back soon for any news!
Narita is offline   Reply With Quote

Old   June 27, 2016, 02:25
Exclamation
  #3
New Member
 
Join Date: Apr 2016
Posts: 11
Rep Power: 10
Narita is on a distinguished road
Quote:
Originally Posted by Narita View Post
!!!!!!!!!!!!!
It seems I made a mistake when employing DEFINE_DPM_INJECTION_INIT. I'm now attempting with it.
Back soon for any news!
!!!!!!!!!!!!!!!!!!

Sorry I made a mistake in my codes.
The good news is that you can freely use the macro to set the injection flow rate as a function as you like -- it perfectly works with the transient DPM simulation.
Narita is offline   Reply With Quote

Old   May 2, 2022, 12:17
Smile ask for help
  #4
New Member
 
Join Date: May 2022
Posts: 1
Rep Power: 0
ala_liar is on a distinguished road
Quote:
Originally Posted by Narita View Post
!!!!!!!!!!!!!!!!!!

Sorry I made a mistake in my codes.
The good news is that you can freely use the macro to set the injection flow rate as a function as you like -- it perfectly works with the transient DPM simulation.
Hello Narita,recently I'm having the same problem you used to have. Here's my code:
DEFINE_DPM_INJECTION_INIT(fuel,I)
{
Particle *pt;
real time = RP_Get_Real("flow-time");
real m1=0.012667, m2=0.014057;

loop(p,I->p_init)
{
PP_FLOW_RATE(p) = (fuel_m1+(fuel_m2-fuel_m1)*time/0.6)/12;
}
}

When I intepret it, here's error:"reference not implemented",
when I compile it, erro:"not for parallel“

Now I wonder whether my code is right but not for parallel, or I got something wrong? Can you show me the way you solve it ? I'd appreciate your help!
ala_liar is offline   Reply With Quote

Old   May 3, 2022, 01:41
Default
  #5
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
the only part which could be a problem for parallel consideration is this line:
Code:
real time = RP_Get_Real("flow-time");
change to
Code:
real time = CURRENT_TIME;
ZZH1997 likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Reply

Tags
injection, total flow rate


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
Particle Injection Flow Rate [kg/m2-s] Manathan FLUENT 2 May 5, 2015 04:09
mass flow rate... sanjar OpenFOAM Running, Solving & CFD 1 December 2, 2013 01:09
mass flow rate inlet udf alikami Fluent UDF and Scheme Programming 3 June 4, 2010 14:47
UDF mass flow rate Juan FLUENT 2 December 22, 2007 10:29
How to calculate the mass flow rate with UDF ? HP FLUENT 0 January 10, 2005 20:38


All times are GMT -4. The time now is 21:32.