CFD Online Logo CFD Online URL
Home > Forums > FLUENT

Switch problem! using 2 custom udf laws at the same time

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   September 15, 2004, 09:48
Default Switch problem! using 2 custom udf laws at the same time
Posts: n/a
Hi! I have written 2 custom udf laws (one for devolatilization and one for surface combustion). When I hook my custom devol law instead of Fluent's one, everything works fine. Similarly when I hook my surf combustion law (instead of Fluent's standard), but when I hook them both simultaneously, then surface combustion does not occur.

Can anybody tell me what the problem is? Is it a switching problem? Any suggestions would be appreciated.

Thanks in advance Ilias.

The laws are:

#include "udf.h" #define PI 3.14159265358979323

boolean just_started_dev_law=1; boolean just_started_cc_law=1;

/************************************************** ******************** constant diameter law for devolatilisation ************************************************** *********************/

DEFINE_DPM_LAW(devol_const_diam_law, p, ci) {

static real dp_law_init;

//Get particle state when law starts





//first, call standard devolatilization routine to calculate

//the mass and heat transfer


//then set the current diameter (constant during the devolatilisation

//procedure) equal to the after drying diameter


//calculate and set the current density (according to the

//constant diameter)




/************************************************** ******************** constant density law for char combustion ************************************************** *********************/

DEFINE_DPM_LAW(char_comb_const_diam_law, p, ci) {

static real rhop_law_init;

//Get particle state when law starts





//first, call standard char combustion routine to calculate

//the mass and heat transfer


//then set the current density (constant during the char combustion

//procedure) equal to the after devolatilisation density


//calculate and set the current diameter (according to the

//constant density)


P_DIAM(p)=pow(6*P_MASS(p)/(PI*rhop_law_init),0.3333333333); }
  Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM Running, Solving & CFD 8 March 28, 2016 11:08
Contribution a new utility: refine wall layer mesh based on yPlus field lakeat OpenFOAM Mesh Utilities 57 February 1, 2015 09:25
Problem in UDF time dependent vloumetric heat source eng_yasser_2020 Fluent UDF and Scheme Programming 0 March 30, 2014 08:07
dynamic Mesh is faster than MRF???? sharonyue OpenFOAM Running, Solving & CFD 14 August 26, 2013 07:47
Problem with FloatingObject Leech OpenFOAM Running, Solving & CFD 10 March 29, 2012 15:24

All times are GMT -4. The time now is 15:11.