CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent Multiphase

Problem in defining moving heat source by UDF on the free surface cells

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

LinkBack Thread Tools Search this Thread Display Modes
Old   October 22, 2020, 02:18
Default Problem in defining moving heat source by UDF on the free surface cells
New Member
Taosif Alam
Join Date: Oct 2020
Posts: 4
Rep Power: 5
taosifme014 is on a distinguished road
Hi Everyone!

I am trying to model a moving heat source on the cells having the free surface (0.05 < VOF < 0.95) using an UDF. I think mainly my problem lies on finding the co-ordinates of the cells having the free surface of VOF value between 0.05 to 0.95. My simulation domain is 720 um * 270 um *210 um. And it has two fluids: air and liquid metal. When I try to run a simulation it shows an error like this in the console. :

" 999999: mpt_accept : error : accept failed : No error "

And the UDF is like this:

#include "udf.h"

#include "math.h"

#define vof_cutoff 0.05

#define P 250

#define eta 0.3
#define S 30e-6

#define d 30e-6

#define pi 3.1416

#define v_laser 300e-3

#define h 20

#define Te 300

#define sig 5.67e-8

#define emi 0.95

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


/*Thread *tp = THREAD_SUB_THREAD (t,1);*/

real x[ND_ND];

real X, Y, Z;

real ti = CURRENT_TIME;

real Xs, Zs, a, H, T, I,q;

if ((C_VOF(c,t) > vof_cutoff) && (C_VOF(c,t) <(1- vof_cutoff)) )



X = x[0];

Y = x[1];

Z = x[2];

T = C_T(c,t);

I = 1/0.75*(-2.25*pow((Y/S),2.0) +1.5 *(Y/S)+0.75);

Xs = v_laser*ti +0;

Zs = 105e-6;

a = 2*P/(pi*pow(d,2));

H = a * exp(-2*(pow((X-Xs),2.0)+pow((Z-Zs),2)/pow(d,2.0)));

q = (eta*H*I/S - h*(T-Te) - sig*emi*(pow(T,4.0)-pow(Te,4.0)));




q =0;


return q;


I would highly appreciate if somebody can help me in finding out my problem and give me suggestion or possible solution.


taosifme014 is offline   Reply With Quote


define_source udf, vof multiphase

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] snappyHexMesh sticking point natty_king OpenFOAM Meshing & Mesh Conversion 11 February 20, 2024 09:12
[swak4Foam] Installation Problem with OF 6 version Aurel OpenFOAM Community Contributions 14 November 18, 2020 16:18
[Other] How to use finite area method in official OpenFOAM 2.2.0? Detian Liu OpenFOAM Meshing & Mesh Conversion 4 November 3, 2015 03:04
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 09:38
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 11:44

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