|
[Sponsors] |
April 22, 2014, 10:50 |
Fluent dynamic mesh for moving diaphragm
|
#1 |
Member
aerosapien
Join Date: Sep 2010
Posts: 59
Rep Power: 15 |
hi,
I am working on synthetic jet flow simulation. I am planning to compare the effect of moving wall (Dynamic mesh) with the sinusoidal velocity input. Can anyone help me with compiling the udf and running this case. This is a 2D case model. |
|
April 23, 2014, 02:56 |
|
#2 |
New Member
Sadegh Tafakor
Join Date: May 2012
Location: Tehran
Posts: 14
Rep Power: 13 |
Hi dear sanjay,
you can this UDF. this is a sample code for a diaphragm deformation. you can set it for your geometry. Code:
DEFINE_GRID_MOTION(moving_arc, domain, dt, time, dtime) { Thread *tf = DT_THREAD (dt); face_t f; Node *node_p; real alpha, theta, x, ymag, yfull, y; int n; /* Set/activate the deforming flag on adjacent cell zone, which */ /* means that the cells adjacent to the deforming wall will also be */ /* deformed, in order to avoid skewness. */ SET_DEFORMING_THREAD_FLAG (THREAD_T0 (tf)); /* Compute the angles: */ alpha = omega * CURRENT_TIME; theta = 2.0 * alpha + 3.0 * M_PI / 2.0; /* Loop over the deforming boundary zone's faces; */ /* inner loop loops over all nodes of a given face; */ /* Thus, since one node can belong to several faces, one must guard */ /* against operating on a given node more than once: */ begin_f_loop (f, tf) { f_node_loop (f, tf, n) { node_p = F_NODE (f, tf, n); /* Update the current node only if it has not been */ /* previously visited: */ if (NODE_POS_NEED_UPDATE (node_p)) { /* 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 (node_p); x = NODE_X (node_p); ymag = sqrt (R*R - x*x) + 0.03; yfull = ymag - 0.1; y = - 0.1 + yfull * sin(theta); NODE_Y (node_p) = y; } } } end_f_loop (f, tf); Note that this is a 2-D UDF code. |
|
April 23, 2014, 13:22 |
|
#3 |
Member
aerosapien
Join Date: Sep 2010
Posts: 59
Rep Power: 15 |
Hi,
Thanks a lot for the code. I will compile it. |
|
May 5, 2014, 15:58 |
|
#4 |
Disabled
Join Date: Nov 2013
Posts: 16
Rep Power: 12 |
Hello:
Regarding this post (I know it's from some time ago), I am wondering if you had any problems with negative cell volume and if so how you solved it. Thank you. |
|
May 9, 2014, 13:29 |
|
#5 |
Member
aerosapien
Join Date: Sep 2010
Posts: 59
Rep Power: 15 |
Hi,
am facing the problem of negative cells. |
|
October 1, 2020, 03:08 |
|
#6 |
New Member
iec
Join Date: Mar 2020
Posts: 1
Rep Power: 0 |
hi dear sanjay,
can you accomplish with this code. I have skimmed this code but no have a dimensions to moving arc. How do works this code |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] 2D Mesh Generation Tutorial for GMSH | aeroslacker | OpenFOAM Meshing & Mesh Conversion | 12 | January 19, 2012 03:52 |
Dynamic Mesh in Fluent | haris05 | Main CFD Forum | 2 | December 5, 2011 01:54 |
FLUENT dynamic mesh set-up question | ral007 | FLUENT | 0 | February 15, 2011 12:28 |
Dynamic mesh + apaption in Fluent 12 ? | klunker | FLUENT | 0 | September 23, 2009 08:19 |
How to control Minximum mesh space? | hung | FLUENT | 7 | April 18, 2005 09:38 |