December 17, 2021 at 2:01 pm

DmitriyTGU

Subscriber

Hi!

Thanks for your reply. This is what I am using.

#include "udf.h"

#include "sg_mphase.h"

#include "mem.h"

#include "sg_mem.h"

#include "math.h"

#include "flow.h"

#include "unsteady.h"

#include "metric.h"

DEFINE_SOURCE(heat_source, c, t, dS, eqn)

{

Thread *pri_th, *sec_th;

real source;

real x[ND_ND],volume,r,k;

volume = C_VOLUME(c,t);

C_CENTROID(x, c, t);// Acquire the cell centroid location

real T = C_T(c,t);

pri_th = THREAD_SUB_THREAD(t, 0);

sec_th = THREAD_SUB_THREAD(t, 1);

r=sqrt(pow(x[0],2.0)+pow(x[1]-0.002,2.0));

k=(pow((3.46/0.003),2.0)); // concentration factor

if(C_VOF(c,sec_th)>0.55 && C_VOF(c,sec_th)<1)

{

if (r<=0.0015)

{

source = (950*exp(-k*r*r));

dS[eqn] = 0.0;

}

else

{

source = 0.0;

dS[eqn] = 0.0;

}

}

else

{

source = 0.0;

dS[eqn] = 0.0;

}

return source;

}

Such a source does not generate heat.

2 Phase Mode is in use.

I also found that, before the material melts, X, Y momentum act on heating, even if they do not heat up to zero.

If you turn off X, Y momentum, turn off heating appears, but still this is not enough.

The question is, what am I doing wrong? I've spent a lot of time looking into this problem. Heating can be obtained if instead of 950 there will be about 1e10