CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

Segmentation Violation

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 20, 2012, 12:56
Thumbs down Segmentation Violation
  #1
New Member
 
Peter
Join Date: Jan 2012
Posts: 29
Rep Power: 5
peatmac is on a distinguished road
Hello all,

I am currently trying to run a simple simulation on Fluent - a cylinder oscillating in constant velocity field. The udf I am using is -

#include"udf.h"
/* this function defines velocity of center of gravity for pure plunging motion*/
/* Plunging motion equation is z(t)=h*sin(2*pi*f*t) */
DEFINE_CG_MOTION(plung,dt,vel,omega,time,dtime)
{
Thread*t;
face_t*f;
/*reset velocities */
NV_S(vel,=,0.0);
NV_S(omega,=,0.0);
if(!Data_Valid_P())
return;
/* Get the thread pointer for which this motion is defined */
t=DT_THREAD(dt);
/* vel[1] is the vertical plunging velocity */
vel[1] = 0.5*sin(time);
}

The cylinder is of frontal area 1m.
The fluid medium is of density 150kg/m3
Viscosity 1kg/m-s

I have checked mesh, it runs with the cylinder oscillating and produces no errors.

When I run the code, with the cylinder in constant velocity I get the following error -

Updating solution at time level N... done.

Updating mesh at time level N... done.
iter continuity x-velocity y-velocity time/iter

No error handler available

Error: FLUENT received a fatal signal (SEGMENTATION VIOLATION).
Error Object: ()


If anyone can advise of a solution or something for me to try I would be extremely grateful.

Regards,

Peter
peatmac is offline   Reply With Quote

Old   February 21, 2012, 11:20
Default
  #2
New Member
 
Peter
Join Date: Jan 2012
Posts: 29
Rep Power: 5
peatmac is on a distinguished road
Anyone have any ideas?

Thanks again.
peatmac is offline   Reply With Quote

Old   March 16, 2012, 01:41
Default
  #3
Member
 
Join Date: Mar 2011
Posts: 50
Rep Power: 6
cdf_user is on a distinguished road
there are several problems in this udf. I will address one critical one. You are using a grid motion udf and you have written equation in terms of the nodes of the mesh.


if 2d:
begin_f_loop(f,thread,n)
f_node_loop(f,thread,n);
if(NODE_POS_NEED_UPDATE(v)
NODE_POS_UPDATED(v);
vel[0] = NODE_Y(v)*sin(2*pi*time);

for time you need to get flow time. there is a macro for that.

If your thread were a straight line of nodes, I am moving the nodes in sinusoidal form .

Therr are other problems in udf. I am busy. Hope this helps.
cdf_user is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Segmentation violation louiza FLUENT 15 January 9, 2014 13:57
Segmentation Violation Corentin FLUENT 1 February 13, 2011 02:07
Defining Multiphase by text and by gui = different result and Segmentation Violation RPJones FLUENT 0 June 9, 2009 16:24
segmentation violation wasan FLUENT 0 December 23, 2008 12:37
C_UDMI - SEGMENTATION VIOLATION CC FLUENT 4 July 2, 2005 04:16


All times are GMT -4. The time now is 19:57.