|
[Sponsors] |
UDF for Oscillating Membrane/Diaphragm of a Synthetic Jet |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 8, 2014, 09:20 |
UDF for Oscillating Membrane/Diaphragm of a Synthetic Jet
|
#1 |
New Member
cuan
Join Date: Aug 2014
Posts: 1
Rep Power: 0 |
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); } 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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
parse error while interpreting udf | Kristin | Fluent UDF and Scheme Programming | 3 | March 15, 2012 07:43 |
Synthetic Jet Boundary Condition | Karthikeyan D. | Main CFD Forum | 1 | August 18, 2010 08:17 |
I need UDF help. | S.Whitney | FLUENT | 0 | October 15, 2007 12:29 |
method to determine jet front | Fred | Main CFD Forum | 0 | February 8, 2007 14:15 |
IMPINGING JET ........... HELP!!!!!!!! | Amir Omoumi | Main CFD Forum | 10 | August 30, 1999 23:11 |