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

UDF for moving wall (oscillating)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 1, 2018, 01:52
Post UDF for moving wall (oscillating)
  #1
New Member
 
SAMBHU JAYACHANDRAN
Join Date: Mar 2018
Location: KERALA, INDIA
Posts: 4
Rep Power: 8
Sambhu.jayachandran is on a distinguished road
I have been doing a project on sloshing in tanks. In my experimental setup i am using a 'Shake Table Apparatus'.
so for making similar moving condition for my geometry in ansys fluent, i need to create an oscillating moving wall using a udf. I don't have much knowledge in making a udf.

I request you to kindly help me in making a udf for an oscillating wall.

Given below is the udf i had used so far, but its only giving motion along one direction. i got this udf from a video regarding "generating wawes in tank"

#include "udf.h"
#include "dynamesh_tools.h"
DEFINE_CG_MOTION(oscillate,dt,vel,omega,time,dtime )
{
Thread *t;
face_t f; /* define the variables */
t = DT_THREAD(dt);
begin_f_loop(f,t) /* loop over each face in the zone to create an array of data */
{
vel[0]=-2;
}
end_f_loop(f,t)
}


T

Thanks for reading
Sambhu.jayachandran is offline   Reply With Quote

Old   March 1, 2018, 04:12
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
Here it moves in one direction because the UDF gives it a constant velocity of 2 m/s in negative y-direction.
You don't want a constant velocity. What velocity do you want?
(Please don't answer with "an oscillating", but make an equation.)

BTW: I don't think this is about not knowing how to make a UDF. This is about making a mathematical model for your problem. You should do that before you make code.
pakk is offline   Reply With Quote

Old   March 12, 2018, 01:00
Default
  #3
New Member
 
SAMBHU JAYACHANDRAN
Join Date: Mar 2018
Location: KERALA, INDIA
Posts: 4
Rep Power: 8
Sambhu.jayachandran is on a distinguished road
Quote:
Originally Posted by pakk View Post
Here it moves in one direction because the UDF gives it a constant velocity of 2 m/s in negative y-direction.
You don't want a constant velocity. What velocity do you want?
(Please don't answer with "an oscillating", but make an equation.)

BTW: I don't think this is about not knowing how to make a UDF. This is about making a mathematical model for your problem. You should do that before you make code.


Thanks for your answer sir..
So i need to find out a mathematical model for the moving object. Also if i wrote an equation, how can i give the input in the form of udf?
Sambhu.jayachandran is offline   Reply With Quote

Old   March 12, 2018, 03:23
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
Quote:
Originally Posted by Sambhu.jayachandran View Post
Thanks for your answer sir..
So i need to find out a mathematical model for the moving object. Also if i wrote an equation, how can i give the input in the form of udf?
If your mathematical model gives an equation for the x-velocity as (for example)
Code:
v_x = 3 * time + 24 - 8 * sin(time/2)
Then you put that in the UDF as:

Code:
vel[0] = 3 * time + 24 - 8 * sin(time/2);
So you see that last step is not the biggest problem, and we can help with any small problems that you encounter. Getting the mathematical equation is the most work.
pakk 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
How to use a UDF to set the volume fraction in the cells next to a wall? DF15 Fluent UDF and Scheme Programming 33 August 20, 2020 13:36
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 06:20
Radiation interface hinca CFX 15 January 26, 2014 17:11
Accessing wall shear stress using UDF Robert Fluent UDF and Scheme Programming 2 July 31, 2013 08:34
udf variable for wall temperature Kiran FLUENT 0 July 31, 2008 08:31


All times are GMT -4. The time now is 11:19.