|
[Sponsors] |
March 19, 2011, 04:06 |
How to combine UDF and Scheme?
|
#1 |
New Member
Ali
Join Date: Mar 2011
Posts: 27
Rep Power: 15 |
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. |
|
March 19, 2011, 10:01 |
|
#2 |
Senior Member
|
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. |
|
March 19, 2011, 12:56 |
|
#3 |
New Member
Ali
Join Date: Mar 2011
Posts: 27
Rep Power: 15 |
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. |
|
March 19, 2011, 15:45 |
|
#4 |
Senior Member
|
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 |
|
Tags |
rotating wall, scheme, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Accessing wall clock time from Scheme or UDF | Angelo Sozzi | FLUENT | 2 | February 23, 2018 06:03 |
changing scheme variable with UDF? | Wagemakers | FLUENT | 17 | September 30, 2015 15:34 |
How to implement a numerical scheme by using UDF? | Furui Xiong | FLUENT | 0 | July 29, 2010 02:30 |
Boundary Condition Types Using Scheme and UDF | Nasir | FLUENT | 0 | September 15, 2008 22:54 |
Scheme and Fluent UDF? | Arthur Valais | FLUENT | 11 | January 31, 2000 14:19 |