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

How to combine UDF and Scheme?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 19, 2011, 04:06
Question How to combine UDF and Scheme?
  #1
New Member
 
Ali
Join Date: Mar 2011
Posts: 27
Rep Power: 6
ali hemmati is on a distinguished road
Hello Fluenters!
I am simulating the trajectory of a fast revolving ball moving in a fluid. I used a circular wall as ball at the center of containing tank and meshed it. Because the problem is unsteady, I need to solve it by thousands of time steps. I didn't used moving mesh, but Fluent has an option for rotating wall. It's just enough to determine angular velocity and center of rotation of the wall.
The problem for me is how to gain force (pressure and viscous force) and moment on the wall (ball) and determine new angular velocity and new center of rotation for the next time step.
I know that using a UDF which contains DEFINE_EXECUTE_AT _END will do that, but it's hard for me to gain forces and moment on the wall and also set new boundary condition (new angular vel. and center of rotation of the wall).
On the other hand, I think by using Scheme Programming it is easier to set new boundary condition and extract force and moment. (But I don't know how?)
My challenging problem is how to combine these two facts (about UDF and Scheme) to solve the problem. In fact, I want to use Scheme at the end of every time step.

Please help me how to solve it.
Thanks for your time…

Last edited by ali hemmati; March 19, 2011 at 08:04.
ali hemmati is offline   Reply With Quote

Old   March 19, 2011, 10:01
Default
  #2
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Shiraz, Iran
Posts: 739
Blog Entries: 1
Rep Power: 14
Amir is on a distinguished road
Hi Ali,
for your case, it doesn't need to use UDF. with a simple FORTRAN code generate a scheme or journal file that computes forces at the end of each time step and makes some changes.
Amir is offline   Reply With Quote

Old   March 19, 2011, 12:56
Default
  #3
New Member
 
Ali
Join Date: Mar 2011
Posts: 27
Rep Power: 6
ali hemmati is on a distinguished road
Thank you Amir,
Would you please tell me how to assign force and moment to a variable? By entering
report / forces / wall-forces yes 1 0 yes "Output directory" ,
I can just write forces to a txt file. But I want to assign force to a variable in order to calculate the next velocity by manipulating that variable.
Is there any way for this?

I have another Q: When I save a *.scm file which contains report / forces / wall-forces yes 1 0 yes "Output directory", fluent shows an error. Is this a correct syntax?

Thanks.
ali hemmati is offline   Reply With Quote

Old   March 19, 2011, 15:45
Default
  #4
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Shiraz, Iran
Posts: 739
Blog Entries: 1
Rep Power: 14
Amir is on a distinguished road
if you choose a file name without any space it doesn't show any error.(save as *.frp)!
to assign the force to a variable, you need some scheme programming. e.g. to obtain a flow time you can easily use (rpgetvar 'flow-time) but for force and moment I don't have any idea! you can ask other guys that may have some experiences in.
also here is a list of schemes that includes wall forces but I didn't try them before:
http://www.cfd-online.com/Wiki/Fluent_environment
Amir is offline   Reply With Quote

Reply

Tags
rotating wall, scheme, udf

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
changing scheme variable with UDF? Wagemakers FLUENT 7 November 25, 2014 10:15
How to implement a numerical scheme by using UDF? Furui Xiong FLUENT 0 July 29, 2010 01:30
Boundary Condition Types Using Scheme and UDF Nasir FLUENT 0 September 15, 2008 21:54
Accessing wall clock time from Scheme or UDF Angelo Sozzi FLUENT 0 July 6, 2005 18:24
Scheme and Fluent UDF? Arthur Valais FLUENT 11 January 31, 2000 14:19


All times are GMT -4. The time now is 10:16.