|
[Sponsors] |
June 30, 2018, 12:25 |
grid motion
|
#1 |
Member
Join Date: Nov 2017
Posts: 54
Rep Power: 8 |
hello dear
Does anyone have tutorial about dynamic mesh grid motion? |
|
June 30, 2018, 12:29 |
example
|
#2 |
Member
Join Date: Nov 2017
Posts: 54
Rep Power: 8 |
this is a example from Ansys fluent udf manual but I don;t understand some of commands like:
1- SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf)); 2- NODE_POS_UPDATED(v); 3- NV_V(NODE_COORD(v), +=, dx); 4- real NV_VEC(omega), NV_VEC(axis), NV_VEC(dx);real NV_VEC(origin), NV_VEC(rvec); can u explain me? #include "udf.h" DEFINE_GRID_MOTION(beam,domain,dt,time,dtime) { Thread *tf = DT_THREAD(dt); face_t f; Node *v; real NV_VEC(omega), NV_VEC(axis), NV_VEC(dx); real NV_VEC(origin), NV_VEC(rvec); real sign; int n; /* set deforming flag on adjacent cell zone */ SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf)); sign = -5.0 * sin (26.178 * time); Message ("time = %f, omega = %f\n", time, sign); NV_S(omega, =, 0.0); NV_D(axis, =, 0.0, 1.0, 0.0); NV_D(origin, =, 0.0, 0.0, 0.152); begin_f_loop(f,tf) { f_node_loop(f,tf,n) { v = F_NODE(f,tf,n); /* update node if x position is greater than 0.02 and that the current node has not been previously visited when looping through previous faces */ if (NODE_X(v) > 0.020 && NODE_POS_NEED_UPDATE (v)) { /* indicate that node position has been update so that it’s not updated more than once */ NODE_POS_UPDATED(v); omega[1] = sign * pow (NODE_X(v)/0.230, 0.5); NV_VV(rvec, =, NODE_COORD(v), -, origin); NV_CROSS(dx, omega, rvec); NV_S(dx, *=, dtime); NV_V(NODE_COORD(v), +=, dx); 187 Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates. Dynamic Mesh DEFINEMacros } } } end_f_loop(f,tf); } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 07:38 |
Grid motion | amin.z | Fluent UDF and Scheme Programming | 18 | September 1, 2015 06:47 |
Grid motion | amin.z | FLUENT | 1 | August 17, 2015 06:16 |
Help me with the grid motion of udf | yuanyeyzygo | Fluent UDF and Scheme Programming | 0 | May 13, 2012 13:49 |
MapFields to New Grid For Extreme Grid Deformations due to Body Motion | albcem | OpenFOAM | 0 | May 5, 2009 14:17 |