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

UDF-DPM: Structure reference not implemented

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   September 6, 2015, 09:26
Question UDF-DPM: Structure reference not implemented
  #1
Member
 
Eduardo Tola
Join Date: Aug 2015
Location: Madrid/Haifa
Posts: 50
Rep Power: 10
edu_aero is on a distinguished road
16-09-2015
Taking into account my experience related with udf and DPM. I strongly recommend to use 'compiled' functions, because structures as loop(p,I->p_init) or get Ilist = Get_dpm_injections() ONLY WORK WITH COMPILED CODES!!

---------------------------------------------------------------------------------------------------------------------------------------

Hello to everyone =)

I would like to ask you all a problem that I am facing with UDF.
It is likely that it is something quite easy. But it is the same time that I am using udf which I am struggling with it.

I am trying to implement a code in order to calculate the flow mass ratio of some droplets in the outlet. In order to do that, I want to develope a programme. However, while trying I have created some codes and all have a common same mistake, structure reference not implemented in the line where 'loop(p,I->p_init) ' is implemented.On the Internet, it seems like this loop is the way of looping through all the particles.

This is my code:

# include "udf.h"
# include "dpm.h" // However it is not neccesary, included in udf.h

DEFINE_ADJUST(TRY1, domain)
{
Particle *p;
Injection *I;
int i=0;
real sum=0;


loop(p,I->p_init)
{
i=i+1;
sum=sum+P_FLOW_RATE(p);
}

printf("P_FLOW_RATE(p)/i%s\n", sum/i);
}


I am not able even to loop through all the particles because the loop is not working.
__________________
Having fun with CFD =)

Last edited by edu_aero; September 16, 2015 at 02:31.
edu_aero is offline   Reply With Quote

 

Tags
dpm, fluent, mass flow rate, udf, user defined function


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
Setting the height of the stream in the free channel kevinmccartin CFX 12 October 13, 2022 21:43
Second Derivative Zero - Boundary Condition fu-ki-pa OpenFOAM 11 March 27, 2021 04:28
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 05:21
Constant velocity of the material Sas CFX 15 July 13, 2010 08:56
Compiling new Solver with wmake lin123 OpenFOAM 3 April 13, 2010 14:18


All times are GMT -4. The time now is 09:38.