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

parse error while interpreting udf

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 6, 2018, 23:09
Default parse error while interpreting udf
  #1
New Member
 
Ana Belen Cueva
Join Date: Nov 2017
Location: South Korea
Posts: 4
Rep Power: 8
belenscita86 is on a distinguished road
Dear friends,
I have created a UDF to include solubility in crystallization process. I need to use logartithm in base 10 for the solubility equation and I have searched how to writte it but I am still getting parse error when interpreting. If somebody can help me I will be grateful.
Fluent reports an error in the line that is underlined and in red in my code.

This is my UDF:

DEFINE_ADJUST(adjust_func, domain)

{

Thread *tc;
real kcl, solub, S, T, solog;
Thread **pt;



mp_thread_loop_c(tc, domain, pt)

{
cell_t cell;

Thread *tp = pt[P_PHASE];

begin_c_loop_int(cell,tc)

{

kcl = (C_YI(cell,tp,0)/Mw_KCl)/((C_YI(cell,tp,0)/Mw_KCl)+(1-(C_YI(cell,tp,0)))/Mw_H2O);


T = C_T(cell,tp);

solog = 27.769+(-2500.906/T)-8.323*(double log10 (double T));

solub = pow((10),solog);

S = kcl-solub;

C_UDMI(cell,tc,0) = S;

} end_c_loop_int(cell,tc)

}

}
belenscita86 is offline   Reply With Quote

Old   June 7, 2018, 02:38
Default
  #2
New Member
 
Ngo Bao Chung
Join Date: Sep 2012
Posts: 14
Rep Power: 13
chienfm is on a distinguished road
Hello Ana,

Have you tried this one?
Code:
solog = 27.769+(-2500.906/T)-8.323*log10(T);
chienfm is offline   Reply With Quote

Old   June 7, 2018, 08:16
Default
  #3
New Member
 
Ana Belen Cueva
Join Date: Nov 2017
Location: South Korea
Posts: 4
Rep Power: 8
belenscita86 is on a distinguished road
Hello Ngo,
thank you very much for your response. Actually I tried that one and it worked. Since I saw in ANSYS manual the double one I used initially that one.
belenscita86 is offline   Reply With Quote

Reply

Tags
fluent, parse error, 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
Error during interpreting UDF for VoF vekh Fluent UDF and Scheme Programming 9 March 12, 2018 01:57
Parse error interpreting UDF mrwts Fluent UDF and Scheme Programming 2 September 14, 2015 16:45
Parse error in UDF Agad15 Fluent UDF and Scheme Programming 2 April 7, 2015 03:16
WILLING TO PAY/ FREELANCER REQUIRED / small UDF coding force loads over body / 6DOF acasas CFD Freelancers 1 January 23, 2015 07:26
UDF parse error on line 1 ..... (Unusual) Amit Maha FLUENT 4 June 30, 2006 12:15


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