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

moving wall by UDF

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

Like Tree1Likes
  • 1 Post By almostafa67

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 15, 2004, 04:27
Default moving wall by UDF
  #1
lyf
Guest
 
Posts: n/a
I want to let a wall moving in the flow field by using the UDF macro DEFINE_GIRD_MOTION not using the DEFING_CG_MOTION, can everybody help me how to realize it ?

thanks a lot

lyf
  Reply With Quote

Old   October 15, 2004, 12:09
Default Re: moving wall by UDF
  #2
stk
Guest
 
Posts: n/a
I have used it. Grid motion makes sense, since you want to describe the motion of each node independently (deforming wall), otherwise use cg motion (same speed for all nodes during time motion). I t is not difficult, look at the udf manual 6.1, the example for grid motion and you will understand. good luck!
  Reply With Quote

Old   October 17, 2004, 23:30
Default Re: moving wall by UDF
  #3
lyf
Guest
 
Posts: n/a
Thank you stk. I have used the cg motion many times, but now I want to use the grid motion to relaize both the rigid motion and deform motion. I have studied the udf manual 6.1, but I can't understand it well, can you give me a simple case about the grid motion udf?

thanks a lot.

lyf
  Reply With Quote

Old   October 18, 2004, 11:37
Default Re: moving wall by UDF
  #4
Aravind
Guest
 
Posts: n/a
Hi,

I have a question regarding this topic. there are two options available to compile a UDF in Fluent viz. intrepret or compiled. In which of these cases do you require a 'C' compiler?

Thanks
  Reply With Quote

Old   October 18, 2004, 22:36
Default Re: moving wall by UDF
  #5
lyf
Guest
 
Posts: n/a
Hi

Aravind, for most of my cases, i choose the last one

lyf
  Reply With Quote

Old   July 30, 2010, 13:01
Default rotation about z axis
  #6
Member
 
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 15
almostafa67 is on a distinguished road
hi everybody...
i am trying to simulate peristaltic pump and for this i need to write an udf file to rotate on of edges about z axis,i will be thanfull if u could help me with this problem.
thank you in advance..
almostafa67 is offline   Reply With Quote

Old   August 1, 2010, 04:45
Default rotation about z axis
  #7
New Member
 
Naveed Raza
Join Date: Aug 2010
Posts: 2
Rep Power: 0
navee05 is on a distinguished road
hi almostafa67, you should use the udf "define_CG_motion, and in this use use omega[2] instead of vel[2], you have to modify the udf.
navee05 is offline   Reply With Quote

Old   August 1, 2010, 05:34
Default rotation about z axis
  #8
Member
 
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 15
almostafa67 is on a distinguished road
salamon alaikom dear naveed...
thank you for a very quick response;a friend helped me to write an udf file but when i compile it, fluent shows me this error massage

Deleted old libudf\ntx86\2ddp\libudf.dll
1 file(s) copied.
(system "copy "C:\PROGRA~1\ANSYSI~1\v120\fluent"\fluent12.0.16\s rc\makefile_nt.udf libudf\ntx86\2ddp\makefile")
1 file(s) copied.
(chdir "libudf")()
(chdir "ntx86\2ddp")()
# Generating ud_io1.h
test.c
# Generating udf_names.c because of makefile test.obj
udf_names.c
udf_names.c(7) : error C2059: syntax error : '}'
udf_names.c(8) : warning C4034: sizeof returns 0
Cannot change directory to z
Done.

i dont know what is '}' for!?
dear naveed let me explain the case that i'm working on it maybe you have an easier solution for it: i'm trying to simulate peristaltic pump,in the images that a sent u (i simulated them in gambit), i want to rotate two/one small cylinder about center of bigger circle and for this used bellow udf:

# include "udf.h"
# include "dynamesh_tools.h"

DEFINE_CG_MOTION(peristaltic,dt,cg_vel,cg_omega,ti me,dtime)
{
real omega;
NV_S(cg_vel,=,0.0);
NV_S(cg_omega,=,0.0);
if (!Data_Valid_P())
return;

omega = 4.0;
cg_vel [0] = 0.0;
cg_vel [1] = 0.0;
cg_vel [2] = 0.0;
cg_omega [0] = 0.0;
cg_omega [1] = 0.0;
cg_omega [2] = omega;
}

and faced error that mentioned befor. if u have any idea please let me know;i'm looking forward to ur help AKHI
Attached Images
File Type: jpg 1.JPG (68.2 KB, 64 views)
File Type: jpg 2.JPG (79.1 KB, 42 views)
almostafa67 is offline   Reply With Quote

Old   August 4, 2010, 07:39
Default
  #9
mas
New Member
 
Mas
Join Date: Jan 2010
Location: Japan
Posts: 24
Rep Power: 16
mas is on a distinguished road
Hi almostafa67,

I think the error was cause by 2d 3d conflict.
Your case is 2d but your udf is for 3d.
Try this:

DEFINE_CG_MOTION(peristaltic,dt,cg_vel,cg_omega,ti me,dtime)
{
real omega;
NV_S(cg_vel,=,0.0);
NV_S(cg_omega,=,0.0);
if (!Data_Valid_P())
return;

omega = 4.0;
cg_vel [0] = 0.0;
cg_vel [1] = 0.0;
cg_omega [0] = 0.0;
cg_omega [1] = omega;
}
__________________
<Mas>
mas is offline   Reply With Quote

Old   August 4, 2010, 13:07
Default rotation about z axis
  #10
Member
 
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 15
almostafa67 is on a distinguished road
dear mas thank you for ur reply
i solved the problem,and now i can rotate small circle for a short distance but i faced a new problem would u think about it and help me out?
the problem is: the end points of the small circle has been locked and does not move(as u see it in the image) do u know how can i solve it?and how move small circle a larger distance?
thank u in advance....
Attached Images
File Type: jpg problem.JPG (22.7 KB, 61 views)
MANUNAYAK likes this.
almostafa67 is offline   Reply With Quote

Old   August 4, 2010, 20:53
Default
  #11
mas
New Member
 
Mas
Join Date: Jan 2010
Location: Japan
Posts: 24
Rep Power: 16
mas is on a distinguished road
So, you moved the small circle. Good.
I think while moving the small circle, you also need to update the geometry of the inner diameter of the large circle.
__________________
<Mas>
mas is offline   Reply With Quote

Old   August 5, 2010, 02:39
Default
  #12
Member
 
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 15
almostafa67 is on a distinguished road
how?
could u explain it more,plz...
almostafa67 is offline   Reply With Quote

Old   August 5, 2010, 04:48
Default
  #13
mas
New Member
 
Mas
Join Date: Jan 2010
Location: Japan
Posts: 24
Rep Power: 16
mas is on a distinguished road
The inner boundary of the large circle should be define as "deforming" type in the dynamic mesh zones panel. Faceted type might do the trick. Please refer to dynamic mesh tutorial for meshing options.
__________________
<Mas>
mas is offline   Reply With Quote

Old   August 5, 2010, 04:56
Default
  #14
Member
 
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 15
almostafa67 is on a distinguished road
Quote:
Originally Posted by mas View Post
The inner boundary of the large circle should be define as "deforming" type in the dynamic mesh zones panel. Faceted type might do the trick. Please refer to dynamic mesh tutorial for meshing options.

tnx dear mas
almostafa67 is offline   Reply With Quote

Old   December 25, 2010, 11:27
Default
  #15
New Member
 
Join Date: Nov 2010
Posts: 22
Rep Power: 15
gi12 is on a distinguished road
Dear all
I would really appreciate your help as I’m new to UDF and moving mesh
Considering a simple cylinder with flexible walls and the elasticity of the wall is given. What is the best UDF function to go with in order to simulatae such example?
Cheers
gi12 is offline   Reply With Quote

Old   August 17, 2017, 08:24
Default 2D Dynamic mesh problem
  #16
New Member
 
Mr. Nayak
Join Date: May 2016
Location: BANGALORE
Posts: 2
Rep Power: 0
MANUNAYAK is on a distinguished road
Dear Almostafa67,

I was simulating 2D model of peristaltic pump using dynamic mesh approach in Fluent 16.1. I wrote a simple profile for angular velocity. After few degrees of motion, small circle edges get distorted and creates negative volume.

I'm facing the same issue what you have faced. Please help me to resolve this issue.

With many thanks...


https://www.cfd-online.com/Forums/at...df-problem.jpg
MANUNAYAK is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Commercial meshers] Fluent3DMeshToFoam simvun OpenFOAM Meshing & Mesh Conversion 50 January 19, 2020 16:33
How to use UDF to define a moving wall lingo FLUENT 9 August 19, 2014 10:14
stationary wall vs. moving wall user0314 FLUENT 0 August 26, 2011 10:42
udf variable for wall temperature Kiran FLUENT 0 July 31, 2008 09:31
Multicomponent fluid Andrea CFX 2 October 11, 2004 06:12


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