|
[Sponsors] |
July 15, 2015, 06:38 |
dynamic mesh 2D UDF
|
#1 |
New Member
Yoon
Join Date: Mar 2015
Location: Seoul
Posts: 22
Rep Power: 11 |
HI everyone
I have a question to ask yours recently I'm trying to make dynamic mesh in 2D and 3D I want do like below (https://www.youtube.com/watch?v=YbDSbXmgKBo) but there is problem on UDF. How can I write UDF ( with CG_motion or Grid motion ) to making dynamic mesh in that video?? need your help. |
|
April 18, 2017, 19:30 |
|
#2 |
New Member
Join Date: Mar 2017
Posts: 8
Rep Power: 9 |
hello touyet! Do you like filters?
|
|
April 19, 2017, 08:40 |
|
#3 |
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 22 |
You can use DEFINE_CG_MOTION macro as shown in following example. You will have to made additional setup dynamic mesh. See Step-7 for this tutorial. You may find some hints.
Code:
#include "udf.h" #define omega 1.0 /* rotational speed, rad/sec */ #define R 0.109 /* radius of the arc, meters */ DEFINE_CG_MOTION(butterfly_flex_UDF, dt, cg_vel, cg_omega, time, dtime) { cg_vel[0] = 0.0; cg_vel[1] = 0.0; cg_vel[2] = 0.0; cg_omega[0] = 0.0; cg_omega[1] = 0.0; cg_omega[2] = omega; } |
|
April 19, 2017, 09:00 |
|
#4 |
Member
Davoud Malekian
Join Date: Jan 2016
Posts: 53
Rep Power: 10 |
Hi,
the UDF you are trying to write is pretty simple, if the only velocity vector for your object is in the direction of the X axis, and the velocity magnitude is constant (0.1m/s) (your object doesn't have acceleration or drag on it), the UDF will be like below: DEFINE_CG_MOTION(motion_disk, dt, vel, omega, time, dtime) { real flow_time = CURRENT_TIME; Thread *t; face_t f; real x[ND_ND]; NV_S(vel, =, 0); NV_S(omega, =, 0); t = DT_THREAD(dt); if (flow_time <= 0.111) vel[0] = 0.1; else vel[0] = 0; } in the above code, i want the object to be stopped from moving any further at the time 0.111sec, you can change this time depending on the time you want your object to be stopped at. one more thing, "vel[0]" is the magnitude of the object's velocity in the X direction. if you want to add acceleration in your UDF, you just have to change the line "vel[0] = 0.1;" like:"vel[0] = -0.2 * flow_time + 0.1" . for hooking this UDF in fluent see the help of the product. for more accurate results i highly recommend you to use quad meshses instead of tri and use layering with sliding mesh methods. however if you are not familiar with these two methods, feel free and use smoothing-remeshing methods. |
|
May 12, 2017, 08:22 |
|
#5 |
New Member
rihen full
Join Date: May 2012
Posts: 10
Rep Power: 13 |
I try to solve a flow past a oscillating cylinder between paralel wall. I would like to make cylinder goes up and down. But I cannot prepare udf file for cylinder motion. Can you help me? Cylinder has sinusolidal motion on y axıs direction. there is no motion on x axis. CAn you help me?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic mesh udf for oscillating wall | QBeast | Fluent UDF and Scheme Programming | 3 | December 17, 2020 02:03 |
Need HELP in writing UDF for a dynamic mesh problem | farrux | Fluent UDF and Scheme Programming | 0 | July 3, 2015 02:53 |
"Reverse engineering" UDF for Dynamic Mesh | Leb | FLUENT | 0 | June 3, 2015 15:25 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 06:20 |
Problem related with UDF for dynamic mesh | Ryan | FLUENT | 6 | April 29, 2004 09:29 |