|
[Sponsors] |
December 14, 2018, 12:15 |
Intialization of UDF
|
#1 |
New Member
pavan
Join Date: Sep 2014
Posts: 5
Rep Power: 12 |
I am trying to write udf for variable dynamic viscosity for PCM as shown below
DEFINE_PROPERTY(PCM_Dynamicviscosity,cell,thread) { real tempe2,mu,bt; tempe2 = C_T(cell,thread); bt=(6722811.795)-(67319.37*tempe2)+(224.7*tempe2*tempe2)-(0.25*tempe2*tempe2*tempe2); printf("bt=%f \n",bt); if (tempe2 < 298.6) mu=180000; if ((tempe2 >= 298.6) && (tempe2 <= 300.6)) mu=0.001798(1+((100000(1-bt)*(1-bt))/((bt*bt*bt)+0.001))); else { mu=0.001798; } return mu; } the value of bt is 0.011 and hence mu value is 175632.39 but the value I am getting for bt when initializing is 1.5 and dynamic viscosity is coming wrong Problem is 0.25*tempe2*tempe2*tempe2=6655940.5 (fluent value) 0.25*tempe2*tempe2*tempe2=6655941.9189(Actual value) |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
udf for one dimensional linear motion based on force | maccheese | Fluent UDF and Scheme Programming | 2 | September 1, 2019 03:18 |
Save output of udf in another udf! | JuanJoMex | FLUENT | 0 | February 8, 2018 13:43 |
UDF Compilation Error - Loading Library - COMMON Problem! Help! | robtheslob | Fluent UDF and Scheme Programming | 8 | July 24, 2015 01:53 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 05:01 |