How to create a moving 'fixed value' in FLUENT?
A fixed value can be imposed via a source term and source term can depend on time. In this way it's possible to move a 'fixed value' around the domain during the simulation.
The question becomes how to fix a variable value with a source term?
Complete explanation can be found in Patankar's book page 145 (Numerical Heat Transfer and Fluid Flow, Suhas V. Patankar, McGraw Hill, ISBN: 0070487405).
Since source term is:
S = S_c + S_p * PHI_p
if this source term is large enough to make other terms in the equation negligible, the discretization equation reduces to this :
S_c + S_p * PHI_p ~= 0 (where ~= means approximatively)
<=> PHI_p ~= -S_c / S_p
Hence, if we use:
S_c = 10^30 * PHI_p_desired
S_p = -10^30
source term is large enough to make other terms negligible and solver, by solving the reduced discterized equation will impose the desired value for PHI_p.
This approach is illustrated here with a UDF example. The aim here is to impose a moving fixed temperature in a solid zone. This source of temperatrue is due to a moving laser. The easiest way to impose this moving fixed temperature in the solid slab is to use the following UDF:
#define T 620.0 /*Desired Temperature (to be imposed in the slab)*/
#define CON 10.0e30
#define laser_radius 0.005
#define laser_init_pos 0.05
#define laser_vel 0.01
DEFINE_SOURCE(fix_temp, cell, thread, dS, eqn)
laser_position_x = laser_init_pos + laser_vel * CURRENT_TIME;
if((laser_position_x - laser_radius) <= x &&
(laser_position_x + laser_radius) >= x)
source = CON *T - CON * C_T(cell,thread);
dS[eqn] = -CON;
source = 0.0;