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

UDF for Oscillating Membrane/Diaphragm of a Synthetic Jet

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 8, 2014, 08:20
Default UDF for Oscillating Membrane/Diaphragm of a Synthetic Jet
  #1
New Member
 
cuan
Join Date: Aug 2014
Posts: 1
Rep Power: 0
cuan1029 is on a distinguished road
Greetings,

I tried to simulate synthetic jet and wanted to study the flow velocity and heat transfer of it.

However, I'm stuck with the UDF for the oscillating membrane.
I have go through one of the UDF tutorial,Using a UDF to Control the Dynamic Mesh of a Flexible Oscillating Membrane, which related to my topic.

For my case, I do not have the rotating butterfly but only the oscillating membrane which located at the bottom of the geometry

Attachment for my geometry



I tried to use the grid motion part in the UDF and do some minor modification according to my case, but I am not fully understand the UDF provided in the tutorial which causing me hard time.

The following is my UDF:

Code:
#include "udf.h"

#define  omega      1           /* rotational speed, rad/sec        */
#define  R          0.375        	/* radius of the arc, meters        */

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     = yfull * sin(theta);
			  NODE_Y (node_p) = y;
            }
        }
    }
  end_f_loop (f, tf);
}
Here is what I get after I previewed the dynamic motion in Fluent


In my case, do I have to use "theta" as written in the UDF above?
How to apply the UDF in tutorial for my case?

Thank you in advance for any help and advice.
cuan1029 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
parse error while interpreting udf Kristin Fluent UDF and Scheme Programming 3 March 15, 2012 06:43
Synthetic Jet Boundary Condition Karthikeyan D. Main CFD Forum 1 August 18, 2010 07:17
I need UDF help. S.Whitney FLUENT 0 October 15, 2007 11:29
method to determine jet front Fred Main CFD Forum 0 February 8, 2007 13:15
IMPINGING JET ........... HELP!!!!!!!! Amir Omoumi Main CFD Forum 10 August 30, 1999 22:11


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