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

UDF for moving light beam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 29, 2013, 15:45
Default UDF for moving light beam
  #1
ppx
New Member
 
pp
Join Date: Jan 2013
Posts: 1
Rep Power: 0
ppx is on a distinguished road
Dear All,

I'm doing a simulation about a moving light beam and i really need some help.
In my simulation the light beam should move spirally. I want to use a UDF to define the movement of the light beam. I have found a code about a Laser beam moving along y. I tried to change the code to define the movement along x and y but it didn't work. Does anyone know how can i define the x path also so that the light beam can move spirally?
Thank you all in advance.


Here the udf:

#include "udf.h"

DEFINE_PROFILE(laser_beam,t,i)
{
real y[ND_ND];
real Y;
real y_0=-0.008; //starting point
real v=0.003; //velocity of the laser beam
real b=0.018; //width of the laser beam
real I_0=10000000000; //Intensity
real time=RP_Get_Real("flow-time");
face_t f;
begin_f_loop(f,t)
{
F_CENTROID(y,f,t);
Y=y[1];
if(Y>=y_0+time*v-b/2 && Y<=y_0+time*v+b/2) // moving along y
F_PROFILE(f,t,i) = I_0;
else
F_PROFILE(f,t,i) = 0;
}
end_f_loop(f,t);
}
ppx is offline   Reply With Quote

Reply


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
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 22:38
help debugging Beam deflection UDF josik_1982 Fluent UDF and Scheme Programming 0 December 19, 2010 18:36
FSI problem with topology of 3D beam via UDF greg FLUENT 7 July 17, 2006 06:32
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 05:03


All times are GMT -4. The time now is 12:01.