|
[Sponsors] |
the difference of pressure calculated by fluent and udf |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 11, 2020, 08:42 |
the difference of pressure calculated by fluent and udf
|
#1 |
Senior Member
Join Date: Feb 2020
Posts: 114
Rep Power: 6 |
I'm using incompressible ideal gas model,and when I use UDM to monitor the pressure,I find it is different from the value calculated by fluent's counter.I don't understand
Code:
#include"udf.h" #define H2 0 #define H2O 1 #define N2 2 #define O2 3 #define SO2 4 #define NUM_SPECS 5 #define R 8.31447 #define pi 3.14159 #define F 96485 DEFINE_DIFFUSIVITY(gas_diff,c,t,i) { real v[4],y[4],Dkn[4],D[4][4]; real M[4]={2e-3,18e-3,28e-3,32e-3}; real tem=C_T(c,t); concen0=C_R(c,t)*C_YI(c,t,0)/M[0]; /*H2*/ concen1=C_R(c,t)*C_YI(c,t,1)/M[1]; /*H2O*/ concen2=C_R(c,t)*C_YI(c,t,2)/M[2]; /*N2*/ concen3=C_R(c,t)*C_YI(c,t,3)/M[3]; /*O2*/ concent1=concen0+concen1; /*Anode*/ concent2=concen2+concen3; /*cathode*/ p1=concent1*R*tem; p2=concent2*R*tem; C_UDMI(c,t,14)=p1; C_UDMI(c,t,15)=p2; |
|
October 11, 2020, 09:04 |
|
#2 |
Senior Member
Join Date: Feb 2020
Posts: 114
Rep Power: 6 |
does it due to that fluent uses Density = P_operate/(R*T),it is a constant,and in udf the density is not a constant?
|
|
October 12, 2020, 07:44 |
|
#3 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
not sure, but you may check it
macro to get operating pressure is Code:
p_op = RP_Get_Real("operating-pressure");
__________________
best regards ****************************** press LIKE if this message was helpful |
|
October 12, 2020, 08:20 |
|
#4 |
Senior Member
Join Date: Feb 2020
Posts: 114
Rep Power: 6 |
||
October 20, 2020, 10:47 |
|
#5 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
It might help if you share the value that fluent shows, and the value that your UDF shows.
|
|
October 21, 2020, 06:48 |
|
#6 |
Senior Member
Join Date: Feb 2020
Posts: 114
Rep Power: 6 |
||
October 22, 2020, 23:32 |
|
#7 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
||
October 23, 2020, 09:40 |
|
#8 |
Senior Member
Join Date: Feb 2020
Posts: 114
Rep Power: 6 |
can you open: http://cdn.img.headns.com/2010/3934b2dcef76f.png
|
|
October 23, 2020, 13:26 |
|
#9 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Very nice picture.
Now back to the topic: which value does fluent give, and which bakkie does your UDF give? You say they are different, shoe me the difference! |
|
October 23, 2020, 23:55 |
|
#10 | |
Senior Member
Join Date: Feb 2020
Posts: 114
Rep Power: 6 |
Quote:
|
||
October 24, 2020, 00:12 |
|
#11 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Looking at the minima: one says 101083 Pa, the other 101325 Pa. That is a difference of only 0.2%, very small.
So, what small inaccuracy do you have in your code? I think the values of the molecular weights. |
|
October 24, 2020, 08:32 |
|
#12 |
Senior Member
Join Date: Feb 2020
Posts: 114
Rep Power: 6 |
||
Tags |
post-processing, pressure, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to put udf inlet velocity and udf outlet pressure in fluent | raminostadi | Fluent UDF and Scheme Programming | 4 | July 3, 2017 07:43 |
Running UDF with Supercomputer | roi247 | FLUENT | 4 | October 15, 2015 14:41 |
UDF Compilation Error - Loading Library - COMMON Problem! Help! | robtheslob | Fluent UDF and Scheme Programming | 8 | July 24, 2015 01:53 |
Calling zone name, zone id and total pressure from Fluent scheme to UDF | kuldip | Fluent UDF and Scheme Programming | 2 | October 6, 2014 01:23 |
Fluent 5.2, UDF and Pressure BC's | Alfonso Ferrandez | FLUENT | 0 | May 4, 2000 08:02 |