CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   UDF Combustion Laws Switch (https://www.cfd-online.com/Forums/fluent-udf/122252-udf-combustion-laws-switch.html)

Leepox August 15, 2013 05:34

UDF Combustion Laws Switch
 
Hi guys, I am trying to start writing UDF's for the law switching in combustion cases so that I can get more control later down the line. I am starting with a simple one but for some reason it always goes straight to law 3 (DPM_LAW_BOILING) can anybody help me with this?

/************************************************** ********************
DPM_SWITCH UDF to manage the transition between laws for DPM
drying/combustion cases.
************************************************** *********************/

#include "udf.h" /* default requirement for Fluent UDF's*/
#include "dpm.h" /* just in case dpm laws are included here to expand the code */

DEFINE_DPM_SWITCH(DPM_switch_law, p, ci)

{
Material *m; /* Undocumented but to signify tracked material */

if(P_T(p)<DPM_EVAPORATION_TEMPERATURE(p,m))
{
P_CURRENT_LAW(p) = DPM_LAW_INITIAL_INERT_HEATING;
}

else if(P_T(p)>DPM_BOILING_TEMPERATURE(p,m))
{
P_CURRENT_LAW(p) = DPM_LAW_BOILING; /* Hazard guess it's called that since it's not documented */
}

else
{
P_CURRENT_LAW(p) = DPM_LAW_VAPORIZATION;
}

}

felipecingmec December 28, 2013 00:09

Hello Leepox,

You got more information about the different values that can take the macro P_CURRENT_LAW(p)?

Inert Heating or Cooling (Law 1/Law 6)
P_CURRENT_LAW(p) = DPM_LAW_INITIAL_INERT_HEATING;


Droplet Vaporization (Law 2)
P_CURRENT_LAW(p) = DPM_LAW_VAPORIZATION;


Droplet Boiling (Law 3)
P_CURRENT_LAW(p) = ??????

Devolatilization (Law 4)
P_CURRENT_LAW(p) = ?????

Surface Combustion (Law 5)
P_CURRENT_LAW(p) = ??????

Thanks

Leepox January 9, 2014 22:46

Quote:

Originally Posted by felipecingmec (Post 467902)
Hello Leepox,

You got more information about the different values that can take the macro P_CURRENT_LAW(p)?

Inert Heating or Cooling (Law 1/Law 6)
P_CURRENT_LAW(p) = DPM_LAW_INITIAL_INERT_HEATING;


Droplet Vaporization (Law 2)
P_CURRENT_LAW(p) = DPM_LAW_VAPORIZATION;


Droplet Boiling (Law 3)
P_CURRENT_LAW(p) = ??????

Devolatilization (Law 4)
P_CURRENT_LAW(p) = ?????

Surface Combustion (Law 5)
P_CURRENT_LAW(p) = ??????

Thanks

Hi, the laws are as named

DPM_LAW_DEVOLATILIZATION
DPM_LAW_SURFACE_COMBUSTION

not sure about boiling though.


All times are GMT -4. The time now is 17:28.