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

Population balance modelling breakage rate UDF Parse error

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By pakk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 30, 2015, 05:34
Default Population balance modelling breakage rate UDF Parse error
  #1
New Member
 
Sumalika
Join Date: Oct 2015
Posts: 3
Rep Power: 11
Sumalika is on a distinguished road
Hi,
I am trying to write a UDF to define a breakage rate in population balance modelling(PBM) where I am using discrete phase PBM considering only breakage as a phenomena but I am encountering a parse error.Please help.

The breakage rate function g1(v) is attached to this post and the UDF is as follows:
#include "udf.h"
#include "sg_pb.h"
#include "sg_mphase.h"

DEFINE_PB_BREAKUP_RATE_FREQ(break_up_freq,cell,thr ead,d_1)
{
real f1, f2, rho_d, v, P;
real K1 = 0.00481, K2=0.08, sigma = 0.01368, P = 150000000 ,phi=0.00559 , rho_d= 909, sigma=0.02;

Thread *tm = THREAD_SUPER_THREAD(thread);

v = (4/3)*3.14*pow((d_1)/2, 3);

f1 = pow(v, -1./3.)*pow(P, 1./2.)*pow(rho_d, -1./2.) ;
f2= (-K2*sigma*pow((1.+phi),2.))/(pow(v, 1./3.)*P) ;
return K1*f1*exp(f2);
}

Kindly suggest some changes so that I can avoid getting a parse error in line 123.
Attached Images
File Type: png breakage rate.png (9.8 KB, 38 views)
Sumalika is offline   Reply With Quote

Old   October 30, 2015, 08:42
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Line 123 of which file? The code you show now does not have 123 lines.
pakk is offline   Reply With Quote

Old   October 31, 2015, 01:05
Default
  #3
New Member
 
Sumalika
Join Date: Oct 2015
Posts: 3
Rep Power: 11
Sumalika is on a distinguished road
Thank you for the response,sir.

Basically I wrote a C source file and interpreted it in ansys and in response I get the following message:

C:\PROGRA~1\ANSYSI~1\v150\fluent\ntbin\win64\cpp.e xe -I"C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.0/src" -I"C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.0/cortex/src" -I"C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.0/client/src" -I"C:\PROGRA~1\ANSYSI~1\
150\fluent\fluent15.0.0/multiport/src" -I. -DUDFCONFIG_H="<udfconfig.h>" "E:\simulation\23.9\150 Mpa_files\dp0\FFF-1\Fluent\udf.c"
Error: E:\\simulation\\23.9\\150 Mpa_files\\dp0\\FFF-1\\Fluent/sg_pb.h: line 123: parse error.

I thought the first three lines meant line 123.
Can you kindly point out where I am going wrong.Really appreciate your help.
Sumalika is offline   Reply With Quote

Old   November 2, 2015, 06:40
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Hmm... The error points to one of Fluent's files.

I can think of only one thing: remove '#include "sg_pb.h"' from the code. According to the help, this should be included in udf.h anyway, so it is a bit strange that the in the example in the help this is also included separately.

If that does not help, I don't know... (Except for the advice to compile your code in stead of interpreting.)
pooneh61 likes this.
pakk is offline   Reply With Quote

Old   November 4, 2015, 05:00
Default
  #5
New Member
 
Sumalika
Join Date: Oct 2015
Posts: 3
Rep Power: 11
Sumalika is on a distinguished road
I tried what you suggested but I continue to get the same error. Also when I try to compile it in visual studio , I get the following error :

Value cannot be null.
Parameter name: solutionDirectory

I need to input this breakage rate in population balance model as a UDF.

Suggestion of any other alternatives would be really helpful.
Sumalika is offline   Reply With Quote

Old   November 4, 2015, 15:04
Default
  #6
nnf
New Member
 
Nima
Join Date: Jan 2015
Posts: 1
Rep Power: 0
nnf is on a distinguished road
Hi everyone

I should use population balance method in my simulation and I need to consider the adhesion of second phase to the wall but the problem is that the model is eulerian-eulerian and I don't know how to consider the adhesion to the wall. I appreciate if you help me.
nnf is offline   Reply With Quote

Reply

Tags
breakage rate, pbm, udf


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
Mesquite - Adaptive mesh refinement / coarsening? philippose OpenFOAM Running, Solving & CFD 94 January 27, 2016 10:40
UDF Compilation Error - Loading Library - COMMON Problem! Help! robtheslob Fluent UDF and Scheme Programming 8 July 24, 2015 01:53
checking the system setup and Qt version vivek070176 OpenFOAM Installation 22 June 1, 2010 13:34
POSDAT problem piotka STAR-CD 4 June 12, 2009 09:43
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 21:50


All times are GMT -4. The time now is 20:00.