|
[Sponsors] |
June 22, 2012, 05:58 |
Space- and time-dependant heat flux via UDF
|
#1 |
Super Moderator
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49 |
Hi there,
I am currently trying to simulate a laser beam moving along the surface of a flat plate. For this purpose, the heat flux at the boundary has to be a function of time and space. As a first try, I would like to set up a quasi-2-dimensional test case. Thus the heat flux should follow the equation I=I_0*[step(x-x_0-t*v)-step(x-x_0-b-t*v)] I_0: intensity of the beam x: direction of the movement of the laser beam x_0: starting point of the laser beam t: simulation time v: speed at which the beam is moved across the surface b: width of the laser beam I found a few examples of UDFs varying a variable in time OR space, but not both at the same time. Since I am new to UDF programming I would really appreciate your help. |
|
June 25, 2012, 08:13 |
|
#2 |
Super Moderator
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49 |
Really? No ideas or suggestions?
|
|
June 26, 2012, 13:33 |
|
#3 |
Super Moderator
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49 |
For those who might be searching for something similar:
Some of the signs in my equation were wrong, the UDF now looks like this: Code:
#include "udf.h" DEFINE_PROFILE(laser_beam,t,i) { real x[ND_ND]; //Ortsvektor; ND liest aus ob 2D oder 3D-Fall real X; //Ortskoordinate real x_0=0.05; //Startpunkt des Strahls real v=0.05; //Geschwindigkeit des Strahls real b=0.02; //Breite des Strahls real I_0=10000000; //maximale Intensität des Strahls real time=RP_Get_Real("flow-time"); //der Variable time wird die Simulationszeit zugewiesen face_t f; begin_f_loop(f,t) { F_CENTROID(x,f,t); //liest Koordinate aus X=x[0]; if(X>=x_0+time*v-b/2 && X<=x_0+time*v+b/2) F_PROFILE(f,t,i) = I_0; else F_PROFILE(f,t,i) = 0; } end_f_loop(f,th); } |
|
June 27, 2012, 09:58 |
|
#4 |
Super Moderator
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49 |
The UDF in my last post does what I need.
But thanks a lot for your offer. |
|
September 10, 2012, 09:00 |
|
#5 |
Senior Member
tmeysam92
Join Date: Jun 2011
Posts: 135
Rep Power: 15 |
Hi Flotus1,
i want to model a heat transfer process in which the heat flux of the wall varies with time. do you have any example? i am new in udf. thanks in advance. |
|
Tags |
fluent, heat flux, profile, transient, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Time and space varying source term | Rajarshi | OpenFOAM | 3 | June 13, 2012 18:29 |
Numerical Weather Modelling : Time and space resolution issues | chriswatt | Main CFD Forum | 0 | February 15, 2011 22:32 |
Richardson Extrapolation to check time and space convergence | Hooman | Main CFD Forum | 0 | December 29, 2010 09:19 |
Time and Space Derivatives. | beezee99 | FLUENT | 0 | August 19, 2010 02:34 |
UDF for C_VOF variation with time and space | Frederik | FLUENT | 4 | December 19, 2005 01:53 |