|
[Sponsors] |
December 23, 2018, 15:34 |
UDF for Cp of mixtures
|
#1 |
Member
Anshuman Sinha
Join Date: Oct 2018
Posts: 70
Rep Power: 8 |
I am doing a combustion analysis of Carbon monoxide gas, here I have defined my mixture template as Carbon di-oxide , Carbon monoxide and oxygen.
I have defined the cp of individual species as udf given below : Code:
#include "udf.h" DEFINE_SPECIFIC_HEAT(my_user_cp_o2, T) { real cp; real x= T; cp = 1000* ( -2e-15*(pow(x,4.) ) + 3e-11*(pow(x,3.)) - 1e-07*(pow(x,2.) ) + 0.0004*x + 0.8287 ); return cp; } DEFINE_SPECIFIC_HEAT(my_user_cp_co2, T) { real cp; real x= T; cp = 1000*(-7e-15*(pow(x,4.) )+ 1e-10*(pow(x,3.) )- 5e-07*(pow(x,2.) )+ 0.001*x + 0.5775 ); return cp; } DEFINE_SPECIFIC_HEAT(my_user_cp, T) { real cp; real x= T; cp = 1000*(-3e-16*(pow(x,4.) )+ 9e-12*(pow(x,3.) )- 8e-08*(pow(x,2.) )+ 0.0003*x + 0.9586) ; return cp; } I have set the individual cp's for CO,CO2 and O2 through the udf in the materials section under mixture materials. Now in the cp of mixture ( when we click edit on mixture template). I know I have to define cp wrt. composition like y[co2]*cp[co2]+y[o2]*cp[o2] + ... But how will it be done ? Will law of mixing do it for me ? or shall I write a new udf for it ? If new udf is to be written then how ? Why am I getting an error for temp = -602K, as temp less than 0K is not possible. |
|
Tags |
combustion, udf code |
|
|
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 |
can anyone help me about the udf of dynamic contact angle in FLUENT? | Albert Lee | FLUENT | 0 | July 1, 2018 09:21 |
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, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 05:01 |