|
[Sponsors] |
Expected moving path of laser in y direction in UDF |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 19, 2021, 09:58 |
Expected moving path of laser in y direction in UDF
|
#1 |
New Member
Xu Zhao
Join Date: Jun 2021
Posts: 5
Rep Power: 5 |
Hello, I'm currently simulate the oscillation laser welding process. The waveform of oscillation path in y direction is triangle wave (From zero to amplitude value A, then from A to -A, eventually from -A to zero). The cycle duty is 1/f_osc (f_osc is the oscillation frequency). The program of oscillation path in y direction is as below. Simulation results shows the position in y direction at the initial time-step is -A mm, while 0 mm for the expected result. Anyone who encounters the similar problem. Could you give me some advice? Thanks for your help.
Best wishes, Xu Zhao. // The program time=RP_Get_Real("flow-time"); time1=((time*f_osc)-int(time*f_osc))/f_osc; //Time normalization in the interval [0,T] if(time1<1/(4*f_osc)) // As aforementioned, the position in y direction can be regarded as a three- stage linear functions { y=xc[1]-4*A*f_osc*time1; // A is the oscillation amplitude } else if(time1>=1/(4*f_osc)&&time1<3/(4*f_osc)) { y=xc[1]-A+4*A*f_osc*(time1-1/(4*f_osc)); } else { y=xc[1]+A-4*A*f_osc*(time1-3/(4*f_osc)); } |
|
June 19, 2021, 15:44 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
You don't show how you define f_osc, there might be a problem there.
If you do one of the following, you will have a problem with integer division that gives the result that you see : int f_osc=10; #define f_osc 10 This problem is avoided with these definitions: float f_osc=10; #define f_osc 10.0
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build". |
|
June 19, 2021, 22:49 |
|
#3 | |
New Member
Xu Zhao
Join Date: Jun 2021
Posts: 5
Rep Power: 5 |
Quote:
Xu Zhao |
||
Tags |
oscillation laser, udf, welding path |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Moving Wall velocity in Negative X direction | mpapon | FLUENT | 1 | July 1, 2016 11:56 |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 07:42 |
Help please UDF flow direction | val17lr | FLUENT | 2 | September 4, 2010 06:30 |
udf with moving heat source | Ryan | FLUENT | 0 | April 10, 2003 20:13 |
udf for moving and deforming mesh | xie haibo | FLUENT | 4 | October 27, 2002 07:45 |