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

Fluent dynamic mesh for moving diaphragm

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 22, 2014, 10:50
Default Fluent dynamic mesh for moving diaphragm
  #1
Member
 
sanjay's Avatar
 
aerosapien
Join Date: Sep 2010
Posts: 59
Rep Power: 15
sanjay is on a distinguished road
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.
Attached Images
File Type: jpg CFD online.jpg (61.0 KB, 58 views)
sanjay is offline   Reply With Quote

Old   April 23, 2014, 02:56
Default
  #2
New Member
 
Sadegh Tafakor
Join Date: May 2012
Location: Tehran
Posts: 14
Rep Power: 13
sadegh1068 is on a distinguished road
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);
use "user define" in the dynamic mesh panel.
Note that this is a 2-D UDF code.
sadegh1068 is offline   Reply With Quote

Old   April 23, 2014, 13:22
Default
  #3
Member
 
sanjay's Avatar
 
aerosapien
Join Date: Sep 2010
Posts: 59
Rep Power: 15
sanjay is on a distinguished road
Hi,
Thanks a lot for the code. I will compile it.
sanjay is offline   Reply With Quote

Old   May 5, 2014, 15:58
Default
  #4
Disabled
 
Join Date: Nov 2013
Posts: 16
Rep Power: 12
anon_m is on a distinguished road
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.
anon_m is offline   Reply With Quote

Old   May 9, 2014, 13:29
Default
  #5
Member
 
sanjay's Avatar
 
aerosapien
Join Date: Sep 2010
Posts: 59
Rep Power: 15
sanjay is on a distinguished road
Hi,
am facing the problem of negative cells.
sanjay is offline   Reply With Quote

Old   October 1, 2020, 03:08
Default
  #6
iec
New Member
 
iec
Join Date: Mar 2020
Posts: 1
Rep Power: 0
iec is on a distinguished road
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
iec is offline   Reply With Quote

Reply


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
[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


All times are GMT -4. The time now is 04:20.