|
[Sponsors] |
August 16, 2012, 14:44 |
Using Dynamic Mesh with UDF
|
#1 |
New Member
Abhinav
Join Date: Mar 2011
Posts: 17
Rep Power: 15 |
I have a 2D Geometry which has Piston on two sides and Top and Bottom are walls. I wanna move the Two Pistons Simultaneously using the UDF. For motion I am using Sine Function. I am using Fluent. Please Help
|
|
August 17, 2012, 00:24 |
|
#2 | |
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18 |
Quote:
If you are newbie in udf, take a deep look at fluent udf manual. It can help you more than anyone else. (search for define_cg_motion) Good luck. |
||
August 22, 2012, 15:14 |
Dynamic Wall UDF
|
#3 |
New Member
Abhinav
Join Date: Mar 2011
Posts: 17
Rep Power: 15 |
I have gone through the Manual. I am able to compile my UDF and Hook it to the walls. But I can see both the walls moving in the same direction. I am using the following UDF:
#include "udf.h" #include "dynamesh_tools.h" /************************************************** ********************/ /***** UDF for displacer motiion *****/ /************************************************** ********************/ DEFINE_CG_MOTION(displacer_func, dt, vel, omega, time, dtime) { Thread *t; face_t f; real a = 1.58712757; real pai = 3.141592654; /* reset velocities */ NV_S (vel, =, 0.0); NV_S (omega, =, 0.0); if (!Data_Valid_P ()) return; t=DT_THREAD (dt); if(time<=8.0) vel[0] = ( a * ( cos(2*pai*75*time)) ) ; else vel[0] = -( a * ( cos(2*pai*75*time)) ) ; } I appreciate if anyone can help. |
|
August 22, 2012, 16:07 |
|
#4 | |
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18 |
Quote:
1.separate two pistons in two distinct zones (if not already.) 2.make a copy of your define cg motion with a different name and a minus sign in velocity. Now assign each cg motion into one of pistons. Good luck. |
||
August 22, 2012, 16:21 |
|
#5 |
New Member
Abhinav
Join Date: Mar 2011
Posts: 17
Rep Power: 15 |
Thank You for the Reply. You mean to say Separate Two pistons in two distinct zones, in Gambit. I understand what you wrote but I am little confused with first step.
|
|
August 22, 2012, 22:13 |
|
#6 | |
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18 |
Quote:
1-Return to Gambit and separate two walls as you know. 2-Do this in Fluent at Grid-->Separate by region. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
Dynamic mesh UDF problem | Peter | FLUENT | 2 | November 12, 2007 03:10 |
writing a dynamic mesh udf | ALPER ALBAYRAQ | FLUENT | 0 | October 24, 2005 09:41 |
Problem related with UDF for dynamic mesh | Ryan | FLUENT | 6 | April 29, 2004 10:29 |
UDF problem for dynamic mesh??? | lyf | FLUENT | 1 | April 19, 2004 07:43 |