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

Moving wall with velocity profile

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 16, 2011, 13:44
Default
  #21
New Member
 
Join Date: Mar 2011
Posts: 28
Rep Power: 15
Tobard is on a distinguished road
Hi Amir,

Thank you for this advice, I've checked: my dynamic zones are OK.

To be more precise about my problem, please find attached a picture of the velocity distribution I got.
The flow is laminar, so the velocity distribution vs the radius has to be linear, as it is when I use moving wall option. I cannot understand why there is a difference since I haven't changed any parameter when applying Dynamic mesh.
Another strange thing is the fact that the "colored layer" becomes thinner if I reduce the time step.
Have you any idea?

Thanks!

Tobard
Attached Images
File Type: jpg moving_mesh.jpg (57.0 KB, 73 views)
Tobard is offline   Reply With Quote

Old   May 16, 2011, 16:29
Default
  #22
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Hi,
the velocity profile would be linear if you impose a constant angular velocity. (is it your case?)
it seems that the wall momentum has diffused in the domain but you have to have much more time steps to reach the linear profile; let it advances in time.
Also check that whether your wall velocity is correct or not.
Amir is offline   Reply With Quote

Old   May 16, 2011, 17:29
Default
  #23
New Member
 
Join Date: Mar 2011
Posts: 28
Rep Power: 15
Tobard is on a distinguished road
Hi,

The angular velocity is constant after 2 seconds.
The problem is that even if I wait for more timesteps this profile doesn't change any more, which is physically impossible. I could have sent the same picture at 4 or 5 seconds, it would have been the same! And if I reduce the time step, this profile becomes thinner...
Besides, the results that I am able to have using another method (moving wall) are quite different for the same flow time. I really don't understand why moving mesh give me such inaccurate results.

Thank you for your reply.

Tobard
Tobard is offline   Reply With Quote

Old   May 17, 2011, 09:12
Default
  #24
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Hi,
Post your UDF and I'll check that.
Amir is offline   Reply With Quote

Old   May 17, 2011, 16:50
Default
  #25
New Member
 
Join Date: Mar 2011
Posts: 28
Rep Power: 15
Tobard is on a distinguished road
Hi!

It is a very basic UDF:
------------------------------
#include"udf.h"
DEFINE_CG_MOTION(rot_cg, dt, velocity, omega, time, dtime)
{
if(time < 2){
omega[2]=75*time;
}
else{
omega[2]=150;
}
}
------------------------------
Thank you again!

Tobard
Tobard is offline   Reply With Quote

Old   May 18, 2011, 15:19
Default
  #26
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Hi,
I have suggestion; consider a point on the boundary and export results during different time steps and check whether it obeys UDF or not.
Amir is offline   Reply With Quote

Old   May 18, 2011, 15:46
Default
  #27
New Member
 
Join Date: Mar 2011
Posts: 28
Rep Power: 15
Tobard is on a distinguished road
Hi,

I tried this and this is all right. Points on the boundary are the only ones that have a correct velocity at each time step... That's why it seems really weird to have an inaccurate velocity inside the zone...

Thanks!
Tobard is offline   Reply With Quote

Old   May 19, 2011, 02:01
Default
  #28
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Hey,
double check your boundary conditions, i.e. in fluid zone, you have to set stationary in motion type and in wall zones, set stationary wall (relative to adjacent cell zones)
Amir is offline   Reply With Quote

Old   May 19, 2011, 15:31
Default
  #29
New Member
 
Join Date: Mar 2011
Posts: 28
Rep Power: 15
Tobard is on a distinguished road
Dear Amir,

Everything is already stationary... Does it work for you? I don't see what is wrong...
Tobard is offline   Reply With Quote

Old   May 19, 2011, 15:56
Default
  #30
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Have you ever checked that with DEFINE_GRID_MOTION macro?
Amir is offline   Reply With Quote

Old   May 19, 2011, 17:11
Default
  #31
New Member
 
Join Date: Mar 2011
Posts: 28
Rep Power: 15
Tobard is on a distinguished road
Yes, that was my initial try. And that's because it didn't work that I decided to use DEFINE_CG_MOTION... (Yeah, not really logical process order, I know...). So I have encountered the same problem with both methods!
Tobard is offline   Reply With Quote

Old   December 6, 2011, 15:10
Default what is meant by movingWallVelocity?
  #32
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
Can anyone please tell me what the keyword movingWallVelocity does in OpenFoam? My question pertains to its use in the U file in sloshingTank2D in the OpenFOAM tutorial. The walls of the tank are defined as patch type walls and the front and back walls are defined as empty. IN the velocity (U) file, all the walls are defined as movingWallVelocity. Does this mean that the walls are moving with the velocity or the mesh?
musahossein is offline   Reply With Quote

Old   December 6, 2011, 15:17
Default
  #33
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Quote:
Originally Posted by musahossein View Post
Can anyone please tell me what the keyword movingWallVelocity does in OpenFoam? My question pertains to its use in the U file in sloshingTank2D in the OpenFOAM tutorial. The walls of the tank are defined as patch type walls and the front and back walls are defined as empty. IN the velocity (U) file, all the walls are defined as movingWallVelocity. Does this mean that the walls are moving with the velocity or the mesh?
Dear friend,

As you know, this not OpenFOAM forum!!! but I've had experiences with this. You can move your boundaries via dynamic mesh technique with this BC.

Bests,
__________________
Amir
Amir is offline   Reply With Quote

Old   December 6, 2011, 16:11
Default
  #34
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
Quote:
Originally Posted by Amir View Post
Dear friend,

As you know, this not OpenFOAM forum!!! but I've had experiences with this. You can move your boundaries via dynamic mesh technique with this BC.

Bests,
Thanks and sorry for not paying attention to where it was being posted.
musahossein is offline   Reply With Quote

Old   June 3, 2013, 08:37
Talking udf question...
  #35
New Member
 
angelicapeygo
Join Date: May 2013
Posts: 7
Rep Power: 12
angelicapeygo is on a distinguished road
Dear Friends;
I want to ask you about my problematic UDF
I want to write a UDF in order to define the temperature distribution on a side wall.
I am very ne about UDF writing and can not create what I really want.
My aim is to define just;
T=938+40*y
it is the temperature change on the wall. there is no other BC for my case.
could you please help me??*Thank you very much.
angelicapeygo is offline   Reply With Quote

Old   June 3, 2013, 09:45
Default
  #36
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Quote:
Originally Posted by angelicapeygo View Post
Dear Friends;
I want to ask you about my problematic UDF
I want to write a UDF in order to define the temperature distribution on a side wall.
I am very ne about UDF writing and can not create what I really want.
My aim is to define just;
T=938+40*y
it is the temperature change on the wall. there is no other BC for my case.
could you please help me??*Thank you very much.
Hi,

Refer to the "DEFINE_PROFILE" macro in the UDF manual.

Bests,
__________________
Amir
Amir is offline   Reply With Quote

Old   January 30, 2015, 12:22
Default
  #37
New Member
 
Mahdi
Join Date: Jan 2015
Posts: 1
Rep Power: 0
Mahdiabt is on a distinguished road
Hi guys

I want to simulate an oscillating wall in a cylinder in a tangential direction of the wall just could any one help me to figure out how can I do this?? Do I need to use dynamic mesh for this problem??

Best Regards
Mahdi
Mahdiabt is offline   Reply With Quote

Old   April 9, 2015, 09:54
Default
  #38
Member
 
sanjeet Limbu
Join Date: Mar 2015
Posts: 91
Rep Power: 11
sanjeetlimbu is on a distinguished road
I am trying to simulate compression stroke in 2D axisymetric mode. using rigid motion.
I tried using the profile- in cylinder, i took data point for time vs velocity at y and notepad write in profile defone. the piston boundary moves but is not 254mm distance i needed (even though i got 254 in matlab with that points)

I used the udf option but i am geting warning error.

Can you please tell what is wrong in either profile or udf i attached.
#include "udf.h"
DEFINE_CG_MOTION(oscillate, dt, vel, omega, time, dtime)
{
Thread *t;
face_t f; /* define the variables */

t = DT_THREAD(dt); /* get the thread pointer for which the motion is defined */

/* if (!Data_Valid_P())
/* return; /* check if the values of the variables are accessible before you compute the function */

begin_f_loop(f, t) /* loop over each face in the zone to create an array of data */
{
if (time <= 0.012)
vel[0] = (637* time); /* define the velocity of the moving zone---*/
else if (0.012 < time < 0.019)
vel[0] = vel[0] + (2.4* time);
else if (0.019 < time < 0.027)
vel[0] = 14;
else if (0.027 < time < 0.03)
vel[0] = vel[0] - (6.5*time);
else if (0.03 < time)
vel[0] = 0;
}
end_f_loop(f, t)
}


thanks
sanjeet
Attached Images
File Type: jpg velocity and distance vs time(milisec).jpg (19.6 KB, 8 views)
Attached Files
File Type: txt FFF.2-Setup-Output.set - Copy.txt (55.0 KB, 6 views)
File Type: c VELOCITY.c (882 Bytes, 10 views)
sanjeetlimbu is offline   Reply With Quote

Reply

Tags
fluent, rotating wall, transient, velocity profile


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
UDF for slip and moving wall lichun Dong FLUENT 3 March 26, 2014 04:37
calculated velocity profile as new wall boundary wouter OpenFOAM 0 March 4, 2011 18:55
The velocity of wall boundary condtion Dhb FLUENT 1 January 14, 2010 13:00
Prescribed inflow velocity profile - how to? Alan Main CFD Forum 10 October 28, 2005 12:14
Variables Definition in CFX Solver 5.6 R P CFX 2 October 26, 2004 02:13


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