|
[Sponsors] |
February 24, 2017, 01:08 |
UDF Dynamic Meshing for Translation Motion
|
#1 |
New Member
Join Date: Dec 2015
Location: Japan
Posts: 25
Rep Power: 10 |
Hi all,
I have used the simple UDF to prescribe the translational CG motion for a box to move in the x-direction with velocity of 1 m/s. The UDF as below: ************************************************** ************ #include "udf.h" DEFINE_CG_MOTION(translational_profile, dt, vel, omega, time, dtime) { real u1 = 1.0; vel[0] = u1; vel[1] = 0.0; vel[2] = 0.0; } ************************************************** ************ My question: Is that possible for me to simulate the box move in the x-direction for 2seconds then continue to move in the opposite direction (Negative x-direction) for another 2seconds? Thank you! |
|
February 24, 2017, 05:29 |
|
#2 |
Senior Member
Kevin
Join Date: Dec 2016
Posts: 138
Rep Power: 10 |
Sure, time is passed as an argument, so you can use it to specify the motion.
Last edited by KevinZ09; February 28, 2017 at 04:35. Reason: typo |
|
February 28, 2017, 04:02 |
|
#3 |
New Member
Join Date: Dec 2015
Location: Japan
Posts: 25
Rep Power: 10 |
Thank you so much, KevinZ09.
Do you have any UDF sample or guideline that defines such movement by using the argument function? Would you mind to share with me? |
|
February 28, 2017, 04:38 |
|
#4 |
Senior Member
Kevin
Join Date: Dec 2016
Posts: 138
Rep Power: 10 |
I don't have any myself, but there's a pretty good example in the manual, with clear descriptions. So I'd suggest to have a look at that one, and adapt it to your personal needs. Try it, and if it doesn't work, explain what you're trying to do, show your work and give details on the errors you get. Then we can help you further from there.
|
|
February 28, 2017, 22:28 |
|
#5 |
New Member
Join Date: Dec 2015
Location: Japan
Posts: 25
Rep Power: 10 |
Thank you for the guidance, KevinZ09.
I will work on it |
|
March 7, 2017, 05:11 |
|
#6 |
New Member
Join Date: Dec 2015
Location: Japan
Posts: 25
Rep Power: 10 |
Hi KevinZ09, my problem has been solved with time argument. Thank you
|
|
April 19, 2017, 05:35 |
|
#7 | |
New Member
Ninh
Join Date: Mar 2016
Posts: 4
Rep Power: 10 |
Quote:
I also working on moving a solid sphere with a velocity of 0.1m/s. The sphere should move upwards (due to the boyancy force) but in experiment, the rising velocity of the sphere is controlled by hand so it rises with 0.1m/s upwards. Can you please guide me how to set up the simulation? Thank you, Ninh |
||
April 24, 2017, 09:22 |
|
#8 |
New Member
Join Date: Dec 2015
Location: Japan
Posts: 25
Rep Power: 10 |
Hi Ninhtran,
I assume you want to move the sphere in +y-direction. Do correct me if I'm wrong. You may prescribe 0.1m/s in +y-direction and 0m/s in x-direction or z-direction. In case you want to stop the movement after some time, you may use time argument to control it Regards, kywong5 |
|
April 24, 2017, 17:08 |
|
#9 | |
New Member
Ninh
Join Date: Mar 2016
Posts: 4
Rep Power: 10 |
Quote:
Yes, you are absolutely right. Does your simulation work? How did you solve the time argument? I will work on the CG translational movement, because sofar I only tried with 6DOF UDF so i dont know how to set up with CG Movement. Thank you for your kind reply! |
||
April 25, 2017, 03:13 |
|
#10 |
New Member
Join Date: Dec 2015
Location: Japan
Posts: 25
Rep Power: 10 |
Hi Ninhran,
Yes, it works. I'm using the dynamic mesh and UDF to prescribe the CG translational movement. You are most welcome. |
|
June 17, 2017, 23:36 |
|
#11 |
New Member
Charles
Join Date: Oct 2015
Posts: 2
Rep Power: 0 |
Please can you show your time argument UDF ... PLEASE
|
|
June 17, 2017, 23:39 |
|
#12 |
New Member
Charles
Join Date: Oct 2015
Posts: 2
Rep Power: 0 |
||
June 15, 2019, 18:42 |
|
#13 |
New Member
ahmed
Join Date: Jun 2019
Posts: 10
Rep Power: 7 |
please can you send the udf code urgently
|
|
November 22, 2019, 02:34 |
|
#14 |
Member
m.reza
Join Date: Apr 2011
Posts: 38
Rep Power: 15 |
Please send me the udf.
I have a membrane and its movement in y direction is a function of x and z positions. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with UDF for CG Circular Motion | luthlau | Fluent UDF and Scheme Programming | 1 | September 16, 2016 03:08 |
DYNAMIC MESH udf for orbiting motion. | avidash | Fluent UDF and Scheme Programming | 3 | March 4, 2015 11:58 |
UDF for dynamic meshing? | prasaddeole | FLUENT | 2 | October 6, 2014 12:55 |
code in dynamic meshing udf | wlt_1985 | FLUENT | 3 | April 21, 2011 15:33 |
Problem related with UDF for dynamic mesh | Ryan | FLUENT | 6 | April 29, 2004 10:29 |