-
-
November 18, 2023 at 5:15 pm
Avinash Kumar
SubscriberI am trying to simulate the problem of laser surface melting in fluent . I have created a domain of 11*5*2 mm cuboid shape with 4,44,000 elements and mesh is fined along on of the faces along the length direction through the centroid of the cuboid along the length and laser source is applied as heat flux with gaussian distribution and it is applied as heat flux on the face and as user defined function and in model and boundary conditons are top face and all side face is convected and bottom face is adiabatic .i am sharing the details of the problem in for of photos and i am trying to run calcultions its not converging #questions #disscussion
I would greatly appreciate it if you could kindly assist me in resolving this issue as soon as possible. -
November 21, 2023 at 11:09 am
Rob
Forum ModeratorWhat is the flow field doing? If it's a transient calculation why are you updating the animation every iteration?Â
-
November 24, 2023 at 5:56 am
Avinash Kumar
SubscriberI am using Energy equations on with solidification and melting on . with boundary conditions as all the surface of cuboid is convected to atmosphere with top is applied as udf as heat flux which will be moving to centroid of rectangle from one breadth to another breadth of cuboid.
-
November 24, 2023 at 10:00 am
Rob
Forum ModeratorOK, and what is happening with the flow?Â
-
November 26, 2023 at 5:48 pm
Avinash Kumar
SubscriberThere is no inlet and outlet only heat source is moving and natural convection is applied to all faces of cuboid
-
November 28, 2023 at 2:07 pm
Rob
Forum ModeratorOK, but if there's no inlet or outlet where does the extra volume go that's generated to give natural convection? Without any images of flow I can't do much to help.Â
-
November 28, 2023 at 2:30 pm
Avinash Kumar
SubscriberÂ
This is mail id email – Edited - RobÂ
Just send me Hi I will send the images of flow and in details about the problem . It will very helpful as I am new to this software .
Â
-
November 28, 2023 at 3:03 pm
Rob
Forum ModeratorI'm only permitted to comment on "public domain" questions and information, so please post on here. I'll remove your email address from the thread.Â
-
November 28, 2023 at 4:11 pm
Avinash Kumar
SubscriberI have written a udf for 2D gaussian heat source moving in x direction on the face to the centroid of the largest face of rectangle .
#include "udf.h"DEFINE_PROFILE(gauss2D_heat_flux, thread, position){Â real x[ND_ND];Â face_t f;Â real current_time;Â real Q = 250;Â real PI = acos(-1);Â real vel = 1e-2;Â real r = 0.00125;Â real B = -3;Â real A;Â real d;Â real dt;Â real x_pos;Â current_time = CURRENT_TIME;Â dt = CURRENT_TIMESTEP;Â A = (2 * Q) / (PI * pow(r, 2.));Â begin_f_loop(f, thread)Â {Â Â Â F_CENTROID(x, f, thread);Â Â Â x_pos = vel * current_time;Â Â Â F_PROFILE(f, thread, position) = A * exp(B * (pow((x[0] - x_pos), 2.) + pow(x[1], 2.)) / pow(r, 2.));Â }Â end_f_loop(f, thread)}I think there is probelm in udf Can you check it. -
November 28, 2023 at 4:52 pm
-
November 28, 2023 at 5:20 pm
Rob
Forum ModeratorWhich surface are you adding heat to? Ie are the x[0] and x[1] coordinates on that surface?
-
November 28, 2023 at 5:33 pm
Avinash Kumar
SubscriberActually I have copied the code from YouTube . And I am adding the heat source on the top surface of the cuboid in the boundary condition as heat flux.
-
November 28, 2023 at 5:43 pm
Rob
Forum ModeratorAnd how does that relate to x[0] and x[1] positions and your equation?Â
-
November 28, 2023 at 6:04 pm
Avinash Kumar
Subscriberx[0]
is the x-coordinate of the face centroid.x[1]
is the y-coordinate of the face centroid.x_pos
is a variable representing the current position of the heat source along the x-direction, which is updated based on the velocity and current simulation time (vel * current_time
).A
,B
, andr
are constants in your equation.F_PROFILE(f, thread, position)
sets the temperature profile on the face.
Breaking down the equation:
(x[0] - x_pos)
represents the distance of the face centroid from the current x-position of the heat source.(pow((x[0] - x_pos), 2.) + pow(x[1], 2.))
is the square of the Euclidean distance of the face centroid from the current position of the heat source in both x and y directions.pow(r, 2.)
is the square of the radiusr
.B * (pow((x[0] - x_pos), 2.) + pow(x[1], 2.)) / pow(r, 2.)
is the argument inside the exponential term.exp(...)
calculates the exponential function.
-
November 29, 2023 at 8:55 am
Rob
Forum ModeratorYes, and what is the value of (x[0]-xpos)Â ?Â
-
November 30, 2023 at 5:34 am
Avinash Kumar
Subscriber(x[0] - x_pos)
represents the distance of the face centroid from the current x-position of the heat source.
-
November 30, 2023 at 9:28 am
Rob
Forum ModeratorYes, and if you look at the actual value is it on the surface you think it is?Â
-
November 30, 2023 at 9:39 am
Avinash Kumar
SubscriberYes I asked the person who have written the udf it's on surface.
-
November 30, 2023 at 10:41 am
Rob
Forum ModeratorAnd how have you hooked the UDF?Â
-
November 30, 2023 at 11:10 am
Avinash Kumar
SubscriberI want the heat source to move from one side of rectangle ( top face of cuboid ) to the other side through centroid along the length of rectangle
-
- The topic ‘Laser Surface melting in fluent using udf’ is closed to new replies.
-
2979
-
970
-
857
-
755
-
599
© 2025 Copyright ANSYS, Inc. All rights reserved.