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

Dynamic mesh udf for oscillating wall

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 14, 2013, 13:00
Default Dynamic mesh udf for oscillating wall
  #1
New Member
 
Sad Debbahi
Join Date: Oct 2010
Posts: 23
Rep Power: 6
QBeast is on a distinguished road
Send a message via Yahoo to QBeast
Dear forum users,

I'm working on a case involving flow in a rectangular channel (3D geometry) with the bottom wall oscillating in the normal direction according to a law of the form: dz0=amp*sin(omega*time). After reading the udf manual section on dynamic mesh, I browsed the threads for a while and I picked up a DEFINE_GRID_MOTION udf that I modified:

Code:
#include "udf.h" 

DEFINE_GRID_MOTION(eye,domain,dt,time,dtime) 
{ 
Thread *tf = DT_THREAD(dt); 
face_t f; 
Node *v; 
real amp,dz0,omega; 
amp=0.005; /*amplitude of the oscillatory motion 5mm*/
omega=5; /*oscillations frequency*/
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); 
dz0=amp*sin(omega*time); /*the displacement of the bottom wall in the Z direction*/
NODE_Z(v)=NODE_Z(v)+dz0; 
} 
} 
} 
end_f_loop(f,tf); 
}
this udf compiles and loads with no errors, but when clicking on draw to preview the motion nothing happens.

Is it a problem with the code or the hooking ?

I noticed when accessing /dynamic mesh/zones panel the availability of all the geometric entities (walls, inlet, outlet, default interior, fluid continuum entity) does this mean that all of the entities affected by the oscillation of the bottom wall needs to be explicitly set?

In /dynamic mesh/zones there is cell height values to set. Could you, please, explain what it is exactly about?

Help greatly appreciated, thanks in advance.

best regards

Last edited by QBeast; December 14, 2013 at 18:03.
QBeast is offline   Reply With Quote

Old   December 14, 2013, 18:08
Default update
  #2
New Member
 
Sad Debbahi
Join Date: Oct 2010
Posts: 23
Rep Power: 6
QBeast is on a distinguished road
Send a message via Yahoo to QBeast
since I posted the issue, I decided to move to tet/tri elements, I meshed a new 3d rectangular channel using triangular elements with no boundary layer refinement (to get things simpler).

when I try to preview mesh motion under solve menu I get systematically negative volumes even contours cells volume show no negative value.

help please

here is a sample output from fluent TUI:



Updating mesh to time 1.10000e-02 (step = 00011)...
Dynamic Mesh Statistics:
Minimum Volume = 2.04203e-11
Maximum Volume = 4.24008e-10
Maximum Cell Skew = 8.75574e-01 (cell zone 2)
Maximum Face Skew = 5.45587e-01 (face zone 5)
done.
Updating mesh to time 1.20000e-02 (step = 00012)...
Dynamic Mesh Statistics:
Minimum Volume = 1.96455e-11
Maximum Volume = 4.24008e-10
Maximum Cell Skew = 9.49990e-01 (cell zone 2)
Maximum Face Skew = 6.84857e-01 (face zone 5)
done.
Updating mesh to time 1.30000e-02 (step = 00013)...
Dynamic Mesh Statistics:
Minimum Volume = 1.50486e-11
Maximum Volume = 4.24008e-10
Maximum Cell Skew = 9.89213e-01 (cell zone 2)
Warning: maximum cell skewness exceeds 0.95.
Maximum Face Skew = 8.24055e-01 (face zone 5)
done.
Updating mesh to time 1.40000e-02 (step = 00014)...
Dynamic Mesh Statistics:
Minimum Volume = 8.05291e-12
Maximum Volume = 4.24008e-10
Maximum Cell Skew = 9.99583e-01 (cell zone 2)
Warning: maximum cell skewness exceeds 0.95.
Maximum Face Skew = 9.35066e-01 (face zone 5)
done.
Updating mesh to time 1.50000e-02 (step = 00015)...

WARNING: non-positive volumes exist.

Dynamic Mesh Statistics:
Minimum Volume =-3.28737e-12
Maximum Volume = 4.24008e-10
Maximum Cell Skew = 1.00113e+00 (cell zone 2)
Warning: maximum cell skewness exceeds 0.95.
Maximum Face Skew = 9.91551e-01 (face zone 5)
Warning: maximum face skewness exceeds 0.95.
Warning: negative cell volume detected!
Error: Update dynamic mesh failed. Negative cell volume detected.
Error Object: #f
QBeast is offline   Reply With Quote

Old   May 7, 2014, 17:49
Default
  #3
New Member
 
Nevada
Join Date: Apr 2014
Posts: 12
Rep Power: 3
razi.me05 is on a distinguished road
Hi, I've attached the figure I'm getting after few steps of mesh preview. I don't know why the surfaces are shrinking and expanding at top and bottom. Can someone please help me with this.
Attached Images
File Type: jpg Capture.jpg (98.5 KB, 32 views)
razi.me05 is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Update of the variables after dynamic mesh motion. gtg258f OpenFOAM Programming & Development 9 January 18, 2014 11:08
UDF for Dynamic Mesh vasava Fluent UDF and Scheme Programming 2 September 25, 2013 00:54
udf dynamic mesh hillat Fluent UDF and Scheme Programming 1 February 10, 2013 20:00
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
UDF & Dynamic Mesh Tutorail Problem Qureshi FLUENT 6 February 6, 2004 04:52


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