|
[Sponsors] |
September 28, 2010, 14:47 |
Problem with DEFINE_DPM_PROPERTY
|
#1 |
New Member
Henry
Join Date: Sep 2010
Posts: 1
Rep Power: 0 |
Hi all,
I wrote a simple UDF to incorporate vapour pressure data of urea water solution (UWS) into a urea spray simulation. Problem is I do not know if the DPM evaporation law is actually taking my vapor pressure reading into account as I could not see the changes I expected from the addition of UWS vapour pressure data during post-processing. Note: After I interpreted the UDF, I simply replaced water's vapor pressure in the MATERIAL/PROPERTY section. Could anyone please let me know if I am on the right track? The UDF is as follows: /************************************************** * UDF that defines Adblue vapour pressure ************************************************** **/ #include "udf.h" #define MWurea = 60.06; #define MWh2o = 18.02; DEFINE_DPM_PROPERTY(Adblue_Vap_Pressure,c,t,p) { real Tp = P_T(p); real LF_h2o = P_LF(p); /*liquid fraction of water in Adblue*/ /*First obtain real water vapor pressure based on particle temperature*/ real vp_h2o = 0.0; real n_urea = 0.0; real n_h2o = 0.0; real n_N = 0.0; real rho_h2o = P_RHO(p); real rho_urea; real V1 = 0.0; real V2 = 0.0; real a = 0.0; real vp_adblue; rho_urea = 1.32; if ((Tp >= 300.0) && (Tp <= 333.0)) { vp_h2o = 776468.0 - 5319.5 * Tp + 9.145 * Tp * Tp; } else { vp_h2o = -11585500.0 + 108092.0 * Tp -337.58 * Tp * Tp + 0.3533* Tp * Tp * Tp; } /*Vapor Pressure for water due to urea concentration*/ V1 = 18.02 / rho_h2o; V2 = 60.06 / rho_urea; n_h2o = LF_h2o / V1; n_urea = (1.0 - LF_h2o) / V2; n_N = n_urea / n_h2o; a = n_N/3.3; vp_adblue = vp_h2o / pow(10.0, a); /*printf("LF = %f P_ablue = %f", LF_h2o, vp_adblue);*/ return vp_adblue; } Thanks for your help in advance! Best regards, Henry |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF compiling problem | Wouter | Fluent UDF and Scheme Programming | 6 | June 6, 2012 05:43 |
Incoherent problem table in hollow-fiber spinning | Gianni | FLUENT | 0 | April 5, 2008 11:33 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 07:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 20:13 |
Is this problem well posed? | Thomas P. Abraham | Main CFD Forum | 5 | September 8, 1999 15:52 |