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

help with dynamic mesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 25, 2014, 14:31
Unhappy help with dynamic mesh
  #1
New Member
 
hilla tor
Join Date: Nov 2012
Posts: 22
Rep Power: 13
hillat is on a distinguished road
I wrote the following UDF code:

Code:
 
/**********************************************************
node motion based on simple beam deflection equation
compiled UDF
**********************************************************/
#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 * 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 */
 
/* indicate that node position has been update
so that it's not updated more than once */
NODE_POS_UPDATED(v);
omega[1] = 0.001*sin(6.28*NODE_X(v)-sign);
NV_VV(rvec, =, NODE_COORD(v), -, origin);
NV_CROSS(dx, omega, rvec);
NV_S(dx, *=, dtime);
NV_V(NODE_COORD(v), +=, dx);
}
}
 
end_f_loop(f,tf);
}
when I run it's written to me the following error: received a fatal signal (Segmentation fault)


thanks for the help
hillat 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
Dynamic Mesh on Pintle type injector. herntan FLUENT 16 September 4, 2020 08:27
pls help. mesh collapsed with dynamic mesh. wlt_1985 FLUENT 2 May 7, 2020 10:42
Dynamic Mesh "Shadow Wall" thezack FLUENT 0 June 4, 2013 22:09
dynamic mesh for drop interface IndrajitW FLUENT 0 March 30, 2013 08:03
dynamic mesh on a hexa grid Manoj Kumar FLUENT 0 August 21, 2007 07:41


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