|
[Sponsors] |
June 7, 2018, 00:09 |
parse error while interpreting udf
|
#1 |
New Member
Ana Belen Cueva
Join Date: Nov 2017
Location: South Korea
Posts: 4
Rep Power: 9 |
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) } } |
|
June 7, 2018, 03:38 |
|
#2 |
New Member
Ngo Bao Chung
Join Date: Sep 2012
Posts: 14
Rep Power: 14 |
Hello Ana,
Have you tried this one? Code:
solog = 27.769+(-2500.906/T)-8.323*log10(T); |
|
June 7, 2018, 09:16 |
|
#3 |
New Member
Ana Belen Cueva
Join Date: Nov 2017
Location: South Korea
Posts: 4
Rep Power: 9 |
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. |
|
Tags |
fluent, parse error, udf |
|
|
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 02:57 |
Parse error interpreting UDF | mrwts | Fluent UDF and Scheme Programming | 2 | September 14, 2015 17:45 |
Parse error in UDF | Agad15 | Fluent UDF and Scheme Programming | 2 | April 7, 2015 04:16 |
WILLING TO PAY/ FREELANCER REQUIRED / small UDF coding force loads over body / 6DOF | acasas | CFD Freelancers | 1 | January 23, 2015 08:26 |
UDF parse error on line 1 ..... (Unusual) | Amit Maha | FLUENT | 4 | June 30, 2006 13:15 |