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/)
-   -   define laminar flame speed in thickened flame model (https://www.cfd-online.com/Forums/fluent-udf/222172-define-laminar-flame-speed-thickened-flame-model.html)

Haitao Lu November 14, 2019 05:43

define laminar flame speed in thickened flame model
 
Hello, I want to define laminar flame speed in thickened flame model, it can be compiled, but didn't give a correct answer.Could anyone give me some help? thankyou.
Code:

#include "udf.h"
DEFINE_PROPERTY(fl_speed,c,t)
{
        real s;
        real x;
        real y;
        real xc[ND_ND];
        Domain *domain;
        domain=Get_Domain(1);
        thread_loop_c(t,domain)
  {
        begin_c_loop_all(c,t)
          {
            C_CENTROID(xc,c,t);
                x=xc[0];
                y=xc[1];
                if(x*x+y*y<0.0016)
                {
                        s=0.4;
                }else if(x*x+y*y>0.0025)
                {
                        s=0.4;
                }else
                {
                        s=0.35;
                }
            end_c_loop_all(c,t)
        }   
  }
      return s;
}


pakk November 14, 2019 14:07

"didn't give a correct answer" can mean many different things.
If you can tell what you expected to see, and what you did see, it is much easier to help you.


All times are GMT -4. The time now is 06:59.