|
[Sponsors] |
Population balance modelling breakage rate UDF Parse error |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 30, 2015, 05:34 |
Population balance modelling breakage rate UDF Parse error
|
#1 |
New Member
Sumalika
Join Date: Oct 2015
Posts: 3
Rep Power: 11 |
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. |
|
October 30, 2015, 08:42 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Line 123 of which file? The code you show now does not have 123 lines.
|
|
October 31, 2015, 01:05 |
|
#3 |
New Member
Sumalika
Join Date: Oct 2015
Posts: 3
Rep Power: 11 |
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. |
|
November 2, 2015, 06:40 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
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.) |
|
November 4, 2015, 05:00 |
|
#5 |
New Member
Sumalika
Join Date: Oct 2015
Posts: 3
Rep Power: 11 |
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. |
|
November 4, 2015, 15:04 |
|
#6 |
New Member
Nima
Join Date: Jan 2015
Posts: 1
Rep Power: 0 |
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. |
|
Tags |
breakage rate, pbm, udf |
|
|
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 |