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

Space- and time-dependant heat flux via UDF

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By flotus1
  • 1 Post By flotus1

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 22, 2012, 05:58
Default Space- and time-dependant heat flux via UDF
  #1
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
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, 08:13
Default
  #2
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
Really? No ideas or suggestions?
flotus1 is offline   Reply With Quote

Old   June 26, 2012, 13:33
Default
  #3
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
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);
}
Gwench likes this.
flotus1 is offline   Reply With Quote

Old   June 27, 2012, 09:58
Default
  #4
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
The UDF in my last post does what I need.

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

Old   September 10, 2012, 09:00
Default
  #5
Senior Member
 
tmeysam92
Join Date: Jun 2011
Posts: 135
Rep Power: 15
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


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 Off
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 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


All times are GMT -4. The time now is 04:55.