|
[Sponsors] |
May 30, 2010, 13:35 |
hi friend
|
#21 | |
New Member
euzinho
Join Date: May 2010
Posts: 15
Rep Power: 16 |
this is exactly what I want to resolve
a udf or any other way to get this movement in a transient study Quote:
|
||
May 31, 2010, 04:55 |
|
#22 |
Member
Join Date: Mar 2009
Posts: 49
Rep Power: 17 |
Well sliding mesh could be an option...
The idea would be to split the flow domain into two parts. Lets say one circle domain containing the valve and one for the rest of the domain, and the boundary between them could be defined as sliding mesh. But as far as I know you can only specify constant movement, or you have to use an udf... But the thing you want to do is quite easy to do with UDF... Here is a simple version of what I am using: #include <stdio.h> #include <math.h> #include "udf.h" DEFINE_CG_MOTION(move_body, dt, vel, omega, time, dtime) { real ampl,disp,omg,count; /* reset velocities */ NV_S (vel, =, 0.0); NV_S (omega, =, 0.0); /* motion */ ampl = 0.008726646 ; /* amplitude of rotation in radians (0.5deg) */ omg = 116.0219; /* angular frequency (18.465Hz) */ disp = ampl * sin(omg * time); /* resultant displacement */ omega[2] = ampl * omg * cos(omg * time); } So this is for a sinusoidal vibration with 0.5deg amplitude around the z-axis. for your case you could take another functional dependency on time or let it only work in a certain time period using an if condition. Then you need to hook this udf as rigid body motion and as center of gravity you just set the coordinates of the geometrical center point of your valve. let me know if it works. cheers |
|
May 31, 2010, 06:23 |
|
#23 | |
New Member
euzinho
Join Date: May 2010
Posts: 15
Rep Power: 16 |
wow! friend, thanks so much for taking your time and help me out.
finally it works! this is the certain code for sure, and actually this is what I did earlier but omega[2] coordenate didnīt work that time... I wonder why... it leads me to another problem, however... so two more question, please How can I define my CG "set the coordinates of the geometrical center point of your valve." and how can I resolve negative cell volume problems..? is that because a wrong definition of my mesh? thans again, Quote:
|
||
June 1, 2010, 04:38 |
|
#24 |
Member
Join Date: Mar 2009
Posts: 49
Rep Power: 17 |
Hi,
well you just set the center of gravity in the dynamic mesh module to the coordinates of the geometric center of the body thats supposed to rotate. the negative volumes may have different reasons. As you are using quad-elements you have to set /define/models/dynamic-mesh-controls/smoothing-parameter/spring-on-all-shapes? yes via TUI otherwise the smoothing only works for tri- and tet-elements. If you still have negative volumes you should think about making smaller displacement per time step (e.g. taking a smaller time step size). You can also vary the parameters for smoothing and use the remeshing technique additionally. good luck |
|
June 1, 2010, 08:29 |
|
#25 | |
New Member
euzinho
Join Date: May 2010
Posts: 15
Rep Power: 16 |
thanks so much for your response,
actually I am setting my CG when I design the project in Solidworks, and it works other question, where can I reset the "current mesh time" in order to start from the beginning? I mean, after the body moves, How can I put it back at its initial position? what I do is to shut fluent down and start it over.. and itīs suck! thanks Quote:
|
||
June 1, 2010, 08:35 |
|
#26 |
Member
Join Date: Mar 2009
Posts: 49
Rep Power: 17 |
good question, you could reset the current mesh time in the mesh motion module in former versions, but I guess in 6.3.26 and newer versions this isn't possible anymore... This time is saved in the *.dat file.
You could just substract this time from the time variable in the udf and compile again... I don't know about another way.. |
|
June 1, 2010, 10:07 |
|
#27 |
New Member
euzinho
Join Date: May 2010
Posts: 15
Rep Power: 16 |
I did it!
it is a simple armonic movement what I cannot get is to set certain movement in a given period of time. I mean, I have to open the valve in 2 seconds. thatīs all after that, the aim is to maintain the valve opened but If I cannot have a control of "time" I cannot control that.. I was thinking about something like: if (time=2) (guessing that Time in seconds) then omega[2] = 0 (because the valve will stop once reached that time) any suggestion? thanks Last edited by euzinho; June 1, 2010 at 10:57. |
|
June 2, 2010, 05:07 |
|
#28 |
Member
Join Date: Mar 2009
Posts: 49
Rep Power: 17 |
Why not, that should work....
|
|
June 2, 2010, 05:19 |
|
#29 |
New Member
euzinho
Join Date: May 2010
Posts: 15
Rep Power: 16 |
||
June 3, 2010, 09:56 |
|
#30 |
New Member
Christophe
Join Date: Apr 2010
Posts: 2
Rep Power: 0 |
Hi guys,
I'v read all your posts, I tried everything you've said, but (yes there is always a 'but') I always have the best answer in the world 'Update dynamic mesh failed. Negative cell volume detected' My project is blood simulation in artery, and what I want to do now is a simulation of the movement of the artery. First of all I'll try to do that with an easy one, that's mean with a pipe. Here is my UDF : # include "udf.h" # include "dynamesh_tools.h" # define D 0.2e-2 /* diameter of the pipe */ # define H 0.03e-2 /* amplitude of the wave */ # define L 1e-2 /* length of the wave */ # define l 2e-2 /* lenght of the pipe */ # define speed_wave 1 /* speed of the wave */ static real F(real x) { if (x>=0 && x<L) { return H*sin(2*M_PI/L*(x-0.25*L))+0.5*D+H; } else if(x>=L && x<=(L+l)) { return 0.5*D; } else { Message0("x = %12.4e Wrong range of x-aborting", x); exit(1); } } static real f_top(real x) { real x1; double tmp; x1 = modf(x/(L+l), &tmp); if (x1>=0) { return F(x1*(L+l)); } else { return F((1+x1)*(L+l)); } } static real f_bottom(real x) { return -f_top(x); } DEFINE_GRID_MOTION(grid_top, domain, dt, time, dtime) { face_t f; Thread *tf = DT_THREAD ((Dynamic_Thread *)dt); int n; Node *v; /* Activate the deforming flag on adjacent cell zone, which means that the cell adjacent to the deforming wall will also be deformed in order to avoid skewness. */ SET_DEFORMING_THREAD_FLAG (THREAD_T0(tf)); /* Loop over the deforming boundary zone's faces; inner loop loops over all nodes of a given face; */ begin_f_loop(f, tf) f_node_loop(f, tf, n) { v = F_NODE(f, tf, n); { /* Update the current node only if it has not been previously visited to avoid to visit the same nodes multiple times */ if (NODE_POS_NEED_UPDATE(v)) { /* Set flag to indicate that the current node's position has been updated, so that it will not be updated during a future pass through the loop */ NODE_POS_UPDATED(v); real x; x = NODE_X(v); /* f_top(x-ct) defines the wave equation */ NODE_Y(v) = f_top(x-speed_wave*time); } } Update_Face_Metrics (f, tf); } end_f_loop (f, tf); } /* Similar udf for the bottom wall */ DEFINE_GRID_MOTION(grid_bot, domain, dt, time, dtime) { face_t f; Thread *tf = DT_THREAD ((Dynamic_Thread *)dt); int n; Node *v; SET_DEFORMING_THREAD_FLAG (THREAD_T0(tf)); begin_f_loop(f, tf) { f_node_loop(f, tf, n) { v = F_NODE(f, tf, n); if (NODE_POS_NEED_UPDATE(v)) { NODE_POS_UPDATED(v); real x; x = NODE_X(v); NODE_Y(v) = f_bottom(x-speed_wave*time); } } Update_Face_Metrics (f, tf); } end_f_loop (f, tf); } I'm waiting for your possibilities and advices. Thanks a lot in advance. Christophe |
|
August 3, 2010, 03:22 |
rotation about z axis
|
#31 |
Member
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 16 |
hi everybody...
first please let me brief you my problem,these two image that i sent you were simulated in gambit, both of them are kind of peristaltic pump,i want to rotate two/one small cylinder about z axis,i should write an udf,for this simple movement i used following udf # include "udf.h" # include "dynamesh_tools.h" DEFINE_CG_MOTION(pump,dt,vel,omega,time,dtime) { Thread *t; real freq_t; NV_S(vel,=,0.0); NV_S(omega,=,0.0); if(!Data_Valid_P()) return; freq_t = 4.0; t= DT_THREAD((Dynamic_Thread*)dt); vel[0] = 0.0; vel[1] = 0.0; vel [2] = 0.0; omega [0] = 0.0; omega [1] = 0.0; omega [2] = freq_t; } but it does not work i will be thankful if you could help me out looking forward to ur help. |
|
August 5, 2010, 10:48 |
update-dynamic-mesh failed. negative cell volume detected.
|
#32 |
Member
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 16 |
hi dear all...
I was running fluent and waiting to get results but faced an error: update-dynamic-mesh failed. negative cell volume detected. i changed time step from 0.0001 to 0.00001 but again this error showed up,could you help me out plz? thank u in advanced for any help provided |
|
August 8, 2010, 09:13 |
How to activate"spring-all-shapes"?
|
#33 |
Member
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 16 |
hi dear all...
i faced an error message,negative cell volume detected,i think if i activate spring-on-all shapes this error does show again,but i do not know hoe to activate it in ansys 12.0, any help will be appreciated... |
|
September 22, 2010, 11:06 |
butterfly valve
|
#34 |
Member
andres
Join Date: Sep 2010
Posts: 44
Rep Power: 16 |
I O.D.Y how it is going?
I am in trouble one more time with butterfly valve move... I hope you can manage to help me out. Time ago you gave me the following code to resolve butterfly move and I have been changing some parameter to adapt your code to my requirements without success what I have to do is to stop this valve after 45š displacement. thatīs all. If you have any idea to do it, I would appreciate if you share this thoughs. regards DEFINE_CG_MOTION(rotating_body, dt, vel, omega, time, dtime) { real ampl,disp,omg,count; NV_S (vel, =, 0.0); NV_S (omega, =, 0.0); /* motion */ ampl = 0.785423 ; omg = 516.0219; disp = ampl * sin(omg * time); omega[2] = 0.785423*sin(time); |
|
June 28, 2011, 10:32 |
|
#35 |
Member
Alberto Pellegrino
Join Date: Jan 2011
Posts: 32
Rep Power: 15 |
Hi O.D.Y.,
you mentioned that negative volume problems can be solved tuning the smoothing or re-meshing parameters. But I have this problem even if I work with sliding mesh (circle inner quad-mesh oscillating, and outer tri-mesh steady), so without smoothing or re-meshing. Any idea about why I get negative volumes (when I run a preview mesh motion on Fluent) and how to solve it, please? Many thanks. Kind regards, Alberto |
|
June 27, 2012, 04:11 |
|
#36 |
Member
Satish Gupta
Join Date: Jun 2012
Posts: 30
Rep Power: 14 |
I am using dynamic mesh to simulate a 2d square cylinder.My problem is only the cells adjacent to boundary deforms.Can any1 tell me what I should do to deform more portion of the mesh?
|
|
December 16, 2012, 10:30 |
|
#37 |
Member
Vidit Sharma
Join Date: Aug 2012
Location: Delhi, India
Posts: 32
Rep Power: 14 |
Hi All..
Sir, I am trying to rotate a 2D box or a 2D cup structure in Fluent using smoothing and remeshing. I am using tri mesh and as mentioned in Fluent Manual I am using smoothing and remeshing and also set the remeshing parameters from mesh info tab given in the remeshing menu. But the problem is that when i start simulation and it goes to first time step Fluent display "Updating mesh at time level N..." and here it stops and it happened alot of time and even waiting after a whole day it didnt worked. I also tried time step size from 0.01 to 0.000001 but it still show this problem. Can you plz help in this case? Thank u in advance |
|
March 1, 2013, 00:57 |
2D airfoil O Grid- negative volume
|
#38 |
Member
samrat himvanth nanduri
Join Date: May 2012
Posts: 30
Rep Power: 14 |
Hi,
I'm carrying out a 2D pitching airfoil simulation using dynamic meshing with a "O" Grid. The dynamic conditions i have given were 1) airfoil - rigid body with UDF with pitching over X=0.25 2)interior - deforming with the min and max length scale from zone scale info 3) fluid -deforming with the min and max length scale from zone scale info. The spring constant i gave was 0.001 and convergence tolerance 0.0001 No of iterations 150. The time step tat i used is 0.001. After running the iterations and after about 500 time steps i'm getting the following error negative volume detected dynamic mesh update failed. i have worked around with the spring constant and also with the time step nothing worked. could someone help me out rectify this issue.. thanks in advance, sam |
|
February 17, 2016, 08:49 |
|
#39 |
New Member
Pradip
Join Date: Jan 2016
Location: Mumbai
Posts: 13
Rep Power: 10 |
Sam cfd
can you tell me what options of fluent you choose for doing airfoil pitching analysis, I am doing bird wing flapping analysis. My email id is pradip.c1000@gmail.com Thanks in advance. |
|
May 14, 2016, 04:03 |
|
#40 |
Senior Member
Arun raj.S
Join Date: Jul 2011
Posts: 207
Rep Power: 16 |
Hi everyone,
I am simulating flapping wing of aerofoil. I have created three zones, zone 1, 2 and 3. Zone 1 has aerofoil with structured mesh around the aerofoil. Zone 2 and 3 has unstructured gird. My problem is I have properly followed all the steps. But I am not able to achieve what I want. Because the shadow of the interface is taking as wall and is not moving along with the domain. Kindly someone help in sorting out this issue. I have attached my UDF alos. Please have a look. Thank you so much https://drive.google.com/file/d/0B7L...ew?usp=sharing https://drive.google.com/file/d/0B7L...ew?usp=sharing |
|
|
|
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 |