Ansys Learning Forum Forums Discuss Simulation Fluids Laser Surface melting in fluent using udf Reply To: Laser Surface melting in fluent using udf

Avinash Kumar
Subscriber
  • x[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, and r 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 radius r.
  • 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.