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

udf dynamic mesh problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 30, 2011, 13:52
Smile udf dynamic mesh problem
  #1
New Member
 
hilla tor
Join Date: Jun 2009
Posts: 10
Rep Power: 17
hillator is on a distinguished road
I try to complie the flowing code at udf file:

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_t;
int n;
 
/* set deforming flag on adjacent cell zone */
SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf));
sign_t = (26.178 * time);
 
Message ("time = %f, omega = %f\n", time, sign_t);
 
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] =0.1*sin(NODE_X(v)*6.28-sing_t);
 
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);
}
it gives the following error message: "open_udf_library:no such file or directory"
i would like to get some help

i'm using fluent 6.3
thanks hilla
hillator is offline   Reply With Quote

Old   December 31, 2011, 07:40
Default
  #2
Senior Member
 
duri
Join Date: May 2010
Posts: 245
Rep Power: 17
duri is on a distinguished road
Your udf is from tutorial. Probably you might be having nmake issue. check this thread.

http://www.cfd-online.com/Forums/flu...iling-udf.html
duri is offline   Reply With Quote

Old   December 31, 2011, 07:51
Default i'm using fluent at unix
  #3
New Member
 
hilla tor
Join Date: Jun 2009
Posts: 10
Rep Power: 17
hillator is on a distinguished road
there is a problem compiling at unix?
hillator is offline   Reply With Quote

Old   January 2, 2012, 06:19
Default
  #4
Senior Member
 
duri
Join Date: May 2010
Posts: 245
Rep Power: 17
duri is on a distinguished road
post compiler error message to dig further
duri is offline   Reply With Quote

Old   January 14, 2012, 08:55
Unhappy here
  #5
New Member
 
hilla tor
Join Date: Jun 2009
Posts: 10
Rep Power: 17
hillator is on a distinguished road
the pic show the grid at t=0

i try to make the botton wall to move

when i compiled the udf file the error i get:
incorrect cg motion UDF beam::libudf on zone 10 (assuming no motion)
shell conduction zones,


here is my 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.1*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);
}
tanks for the help
hillator is offline   Reply With Quote

Old   January 14, 2012, 09:35
Default
  #6
Member
 
Join Date: Nov 2011
Location: Czech Republic
Posts: 97
Rep Power: 15
Sixkillers is on a distinguished road
Quote:
Originally Posted by hillator View Post
there is a problem compiling at unix?
I am able to compile it on my Linux machine (64 bit) without problem, gcc version 4.6.2., Fluent version 12.1.4
Sixkillers is offline   Reply With Quote

Old   January 14, 2012, 11:45
Default the pic at t=0
  #7
New Member
 
hilla tor
Join Date: Jun 2009
Posts: 10
Rep Power: 17
hillator is on a distinguished road
attached
--------
Attached Images
File Type: jpg grid_t_0.jpg (12.5 KB, 36 views)
hillator is offline   Reply With Quote

Old   January 3, 2015, 13:49
Default
  #8
New Member
 
Renato Venturatto Junior
Join Date: May 2014
Posts: 18
Rep Power: 12
renatovj is on a distinguished road
Quote:
Originally Posted by hillator View Post
the pic show the grid at t=0

i try to make the botton wall to move

when i compiled the udf file the error i get:
incorrect cg motion UDF beam::libudf on zone 10 (assuming no motion)
shell conduction zones,


here is my 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.1*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);
}
tanks for the help
Dear Hillator,

Have you solved the problem of "incorrect cg motion UDF beam::libudf on zone 10 (assuming no motion)" yet?

I'm facing the same problem and have now ideia how to fix it!

Thanks in advance!
renatovj 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 & Negative volume in 3D mahzironrazak FLUENT 97 December 28, 2020 23:09
dynamic mesh udf sample wlt_1985 FLUENT 0 April 11, 2011 00:36
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55
Problem related with UDF for dynamic mesh Ryan FLUENT 6 April 29, 2004 10:29
Problem related with UDF for dynamic mesh Ryan FLUENT 1 April 16, 2004 07:05


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