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

UDF Dynamic Meshing for Translation Motion

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By kywong5

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 24, 2017, 00:08
Default UDF Dynamic Meshing for Translation Motion
  #1
New Member
 
Join Date: Dec 2015
Location: Japan
Posts: 25
Rep Power: 8
kywong5 is on a distinguished road
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!
kywong5 is offline   Reply With Quote

Old   February 24, 2017, 04:29
Default
  #2
Senior Member
 
Kevin
Join Date: Dec 2016
Posts: 138
Rep Power: 7
KevinZ09 is on a distinguished road
Sure, time is passed as an argument, so you can use it to specify the motion.

Last edited by KevinZ09; February 28, 2017 at 03:35. Reason: typo
KevinZ09 is offline   Reply With Quote

Old   February 28, 2017, 03:02
Default
  #3
New Member
 
Join Date: Dec 2015
Location: Japan
Posts: 25
Rep Power: 8
kywong5 is on a distinguished road
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?
kywong5 is offline   Reply With Quote

Old   February 28, 2017, 03:38
Default
  #4
Senior Member
 
Kevin
Join Date: Dec 2016
Posts: 138
Rep Power: 7
KevinZ09 is on a distinguished road
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.
KevinZ09 is offline   Reply With Quote

Old   February 28, 2017, 21:28
Default
  #5
New Member
 
Join Date: Dec 2015
Location: Japan
Posts: 25
Rep Power: 8
kywong5 is on a distinguished road
Thank you for the guidance, KevinZ09.
I will work on it
kywong5 is offline   Reply With Quote

Old   March 7, 2017, 04:11
Default
  #6
New Member
 
Join Date: Dec 2015
Location: Japan
Posts: 25
Rep Power: 8
kywong5 is on a distinguished road
Hi KevinZ09, my problem has been solved with time argument. Thank you
kywong5 is offline   Reply With Quote

Old   April 19, 2017, 04:35
Default
  #7
New Member
 
Ninh
Join Date: Mar 2016
Posts: 4
Rep Power: 8
ninhtran is on a distinguished road
Quote:
Originally Posted by kywong5 View Post
Hi KevinZ09, my problem has been solved with time argument. Thank you
HI Kywong,

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
ninhtran is offline   Reply With Quote

Old   April 24, 2017, 08:22
Default
  #8
New Member
 
Join Date: Dec 2015
Location: Japan
Posts: 25
Rep Power: 8
kywong5 is on a distinguished road
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
kywong5 is offline   Reply With Quote

Old   April 24, 2017, 16:08
Default
  #9
New Member
 
Ninh
Join Date: Mar 2016
Posts: 4
Rep Power: 8
ninhtran is on a distinguished road
Quote:
Originally Posted by kywong5 View Post
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
Hi Kywong,

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!
ninhtran is offline   Reply With Quote

Old   April 25, 2017, 02:13
Default
  #10
New Member
 
Join Date: Dec 2015
Location: Japan
Posts: 25
Rep Power: 8
kywong5 is on a distinguished road
Hi Ninhran,

Yes, it works. I'm using the dynamic mesh and UDF to prescribe the CG translational movement.
You are most welcome.
ninhtran likes this.
kywong5 is offline   Reply With Quote

Old   June 17, 2017, 22:36
Default
  #11
New Member
 
Charles
Join Date: Oct 2015
Posts: 2
Rep Power: 0
Charlesdupumping is on a distinguished road
Please can you show your time argument UDF ... PLEASE
Charlesdupumping is offline   Reply With Quote

Old   June 17, 2017, 22:39
Default
  #12
New Member
 
Charles
Join Date: Oct 2015
Posts: 2
Rep Power: 0
Charlesdupumping is on a distinguished road
Quote:
Originally Posted by kywong5 View Post
Hi Ninhran,

Yes, it works. I'm using the dynamic mesh and UDF to prescribe the CG translational movement.
You are most welcome.

Please can you show your time argument UDF. Thanks
Charlesdupumping is offline   Reply With Quote

Old   June 15, 2019, 17:42
Default
  #13
New Member
 
ahmed
Join Date: Jun 2019
Posts: 10
Rep Power: 5
ahmed fahmy is on a distinguished road
please can you send the udf code urgently
ahmed fahmy is offline   Reply With Quote

Old   November 22, 2019, 01:34
Default
  #14
Member
 
m.reza
Join Date: Apr 2011
Posts: 33
Rep Power: 13
m.reza is on a distinguished road
Please send me the udf.
I have a membrane and its movement in y direction is a function of x and z positions.
m.reza is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Problem with UDF for CG Circular Motion luthlau Fluent UDF and Scheme Programming 1 September 16, 2016 02:08
DYNAMIC MESH udf for orbiting motion. avidash Fluent UDF and Scheme Programming 3 March 4, 2015 10:58
UDF for dynamic meshing? prasaddeole FLUENT 2 October 6, 2014 11:55
code in dynamic meshing udf wlt_1985 FLUENT 3 April 21, 2011 14:33
Problem related with UDF for dynamic mesh Ryan FLUENT 6 April 29, 2004 09:29


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