|
[Sponsors] |
August 21, 2011, 08:59 |
Udf for moving circular edge
|
#1 |
Member
anonymous
Join Date: Feb 2011
Posts: 50
Rep Power: 15 |
I have a 2D channel that its edge is circular. I am moving the walls in y direction and this working. However, when I am not able to move the circular edge. This is the UDF I am using...
#include "udf.h" #include "mem.h" #include "dynamesh_tools.h" /* Constants */ #define b 1.5e-3 #define T 20 #define a 0.0e-3 #define a1 10e-3 #define b1 0.5e-3 #define R 0.5e-3 #define phi 3.1415926535897932384626433832795 #define L 50 #define EdgeHeight 1.0e-3 /************************************************** ***/ DEFINE_GEOM(outlet,domain,dt,position) { Thread *tf = DT_THREAD (dt); face_t f; Node *node_p; real x, y; int n; SET_DEFORMING_THREAD_FLAG (THREAD_T0 (tf)); begin_f_loop (f, tf) { f_node_loop (f, tf, n) { node_p = F_NODE (f, tf, n); if (NODE_POS_NEED_UPDATE (node_p)) { NODE_POS_UPDATED (node_p); x = NODE_X (node_p); y[0]=sqrt(fabs(pow(R,2)-pow((x-a1),2)))+(b1+CURRENT_TIME/T); y[1]=-sqrt(fabs(pow(R,2)-pow((x-a1),2)))+(b1+CURRENT_TIME/T); NODE_Y (node_p) = y; } } } end_f_loop (f, tf); } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF Compilation Error - Loading Library - COMMON Problem! Help! | robtheslob | Fluent UDF and Scheme Programming | 8 | July 24, 2015 00:53 |
velocity profile UDF on porous jump edge | mani1455 | Fluent UDF and Scheme Programming | 5 | February 21, 2015 05:31 |
calculating cell edge length in 2D and call UDM into other udf code | pibea | Fluent UDF and Scheme Programming | 0 | November 30, 2014 05:27 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 11:55 |
[Commercial meshers] Star mesh import problem | chris1980 | OpenFOAM Meshing & Mesh Conversion | 20 | May 8, 2006 01:07 |