CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

Space- and time-dependant heat flux via UDF

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 22, 2012, 04:58
Default Space- and time-dependant heat flux via UDF
  #1
Senior Member
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,098
Rep Power: 19
flotus1 will become famous soon enoughflotus1 will become famous soon enough
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.
flotus1 is offline   Reply With Quote

Old   June 25, 2012, 07:13
Default
  #2
Senior Member
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,098
Rep Power: 19
flotus1 will become famous soon enoughflotus1 will become famous soon enough
Really? No ideas or suggestions?
flotus1 is offline   Reply With Quote

Old   June 26, 2012, 12:33
Default
  #3
Senior Member
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,098
Rep Power: 19
flotus1 will become famous soon enoughflotus1 will become famous soon enough
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);
}
flotus1 is offline   Reply With Quote

Old   June 27, 2012, 08:58
Default
  #4
Senior Member
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,098
Rep Power: 19
flotus1 will become famous soon enoughflotus1 will become famous soon enough
The UDF in my last post does what I need.

But thanks a lot for your offer.
flotus1 is offline   Reply With Quote

Old   September 10, 2012, 08:00
Default
  #5
Senior Member
 
tmeysam92
Join Date: Jun 2011
Posts: 134
Rep Power: 6
tmeysam92 is on a distinguished road
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.
tmeysam92 is offline   Reply With Quote

Reply

Tags
fluent, heat flux, profile, transient, udf

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time and space varying source term Rajarshi OpenFOAM 3 June 13, 2012 17: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 01:34
UDF for C_VOF variation with time and space Frederik FLUENT 4 December 19, 2005 01:53


All times are GMT -4. The time now is 08:31.