CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Segmentation Violation (

peatmac February 20, 2012 12:56

Segmentation Violation
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 -

/* this function defines velocity of center of gravity for pure plunging motion*/
/* Plunging motion equation is z(t)=h*sin(2*pi*f*t) */
/*reset velocities */
/* Get the thread pointer for which this motion is defined */
/* 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.



peatmac February 21, 2012 11:20

Anyone have any ideas?

Thanks again.

cdf_user March 16, 2012 01:41

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:
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.

All times are GMT -4. The time now is 16:23.