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

Is this the correct approach to my problem? (UDF for object in motion)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 25, 2013, 07:45
Question Is this the correct approach to my problem? (UDF for object in motion)
  #1
New Member
 
Dean Smith
Join Date: Oct 2013
Posts: 8
Rep Power: 12
charlestan88 is on a distinguished road
I need to simulate a small object in a still pool of liquid. A force is exerted on the object pushing it downwards into the fluid a certain distance and eventually stops.

I am currently looking into writing a UDF for this motion with a dynamic mesh. Is this the correct approach?
The UDF essentially defines the motion of the object correcT?
charlestan88 is offline   Reply With Quote

Old   October 25, 2013, 12:11
Default
  #2
Member
 
Rafal
Join Date: Aug 2013
Location: CK
Posts: 36
Rep Power: 12
vekh is on a distinguished road
I don't use dynamic mesh but I was simulated couple of moving objects. For example for moving heat source you must add for your equation "dx" element. In my case dx=v*t, where v is velocity and t is current time step. Now you need to put that into your equation:
original equation - l=(p/a)*pow(2,x)
with dx l=(p/a)*pow(2,(x+dx));
That is of course example You must adapt that for your case.
vekh is offline   Reply With Quote

Old   October 26, 2013, 05:19
Default
  #3
New Member
 
Dean Smith
Join Date: Oct 2013
Posts: 8
Rep Power: 12
charlestan88 is on a distinguished road
Quote:
Originally Posted by vekh View Post
I don't use dynamic mesh but I was simulated couple of moving objects. For example for moving heat source you must add for your equation "dx" element. In my case dx=v*t, where v is velocity and t is current time step. Now you need to put that into your equation:
original equation - l=(p/a)*pow(2,x)
with dx l=(p/a)*pow(2,(x+dx));
That is of course example You must adapt that for your case.
I don't understand.

You didn't use a dynamic mesh?
Wouldn't this result in an inaccurate mesh when simulating the movement?

What equation do you mean? From what I can tell FLUENT only allows very simple movement in the boundary condition settings without coding a UDF
charlestan88 is offline   Reply With Quote

Old   October 27, 2013, 05:39
Default
  #4
Member
 
Rafal
Join Date: Aug 2013
Location: CK
Posts: 36
Rep Power: 12
vekh is on a distinguished road
Quote:
Originally Posted by charlestan88 View Post
I don't understand.

You didn't use a dynamic mesh?
Wouldn't this result in an inaccurate mesh when simulating the movement?
In my opinion dynamic mesh is needed only when you move physical object i.e. rock in water. In my case I move only heat flux so I don't need that.
Quote:
Originally Posted by charlestan88 View Post
What equation do you mean? From what I can tell FLUENT only allows very simple movement in the boundary condition settings without coding a UDF
Yes - without UDF It's difficult to move anything I used UDF with DEFINE_PROFILE function to define moving heat source along determined path in my model.
vekh is offline   Reply With Quote

Old   October 27, 2013, 05:52
Default
  #5
New Member
 
Dean Smith
Join Date: Oct 2013
Posts: 8
Rep Power: 12
charlestan88 is on a distinguished road
Quote:
Originally Posted by vekh View Post
In my opinion dynamic mesh is needed only when you move physical object i.e. rock in water. In my case I move only heat flux so I don't need that.

Yes - without UDF It's difficult to move anything I used UDF with DEFINE_PROFILE function to define moving heat source along determined path in my model.

Any idea where I can learn how to write a udf for motion?
The tutorials from abyss fluent seem to be of little use.
charlestan88 is offline   Reply With Quote

Old   October 27, 2013, 06:09
Default
  #6
Member
 
Rafal
Join Date: Aug 2013
Location: CK
Posts: 36
Rep Power: 12
vekh is on a distinguished road
I've learn it from this and other CFD forums. Youtube contains some helpful videos too. That take some time but there is no other way. If you know how to write simple C or C++ code you should learn UDF's quite fast. You must also be familiar with problem you want to solve. Equations which are included in UDF must be write properly. Additional options (like move or smth like that) must be done with precautions. To 'move' something there is often only one condition - to add some time dependent variable to equation.
vekh 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
CG Motion UDF Problem leoarmas Fluent UDF and Scheme Programming 17 February 14, 2023 08:59
Fluent UDF Discontinuous Motion lequi7 Fluent UDF and Scheme Programming 2 November 3, 2011 23:18
problem with udf for dynamic mesh ja92 FLUENT 0 February 24, 2011 09:32
UDF PROBLEM anant FLUENT 2 January 17, 2007 00:15
parallel UDF problem kerem FLUENT 2 June 20, 2006 06:56


All times are GMT -4. The time now is 06:59.