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

SIGSEGV error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 3, 2016, 10:09
Default SIGSEGV error
  #1
Member
 
ERMACORA Florian
Join Date: May 2016
Posts: 39
Rep Power: 9
flo90000 is on a distinguished road
Hello,

I have read this appear when there is not enough memory location. I have 4 UDF in my case and I put 6 UDM location. I tested with 30 but I have always this error. I run it in parallel on a cluster.

Code:
#include "udf.h"
#define X_MAX_1 0.0275
#define X_MIN_1 0.0222
#define Y_MAX_1 0.0200
#define Y_MIN_1 0.005
#define Z_MAX_1 0.055
#define Z_MIN_1 0.0546
#define C2_1 50000.0

DEFINE_SOURCE(xmom_source_1, c, t, dS, eqn)
{
  static real pos[ND_ND];
  static real con, source, x, y, z;
  static int i;
  C_CENTROID(pos, c, t);
  x = pos[0];
  y = pos[1];
  z = pos[2];
  i = 0;
  if (x > X_MIN_1) i++;
  if (x < X_MAX_1) i++;
  if (y > Y_MIN_1) i++;
  if (y < Y_MAX_1) i++;
  if (z > Z_MIN_1) i++;
  if (z < Z_MAX_1) i++;
  if(i == 6)
    {
      con = C2_1*0.5*C_R(c,t);
      source = -con*fabs(C_U(c,t))*C_U(c,t);
      dS[eqn] = -2*con*fabs(C_U(c,t));
    }
  else
    {
      source = 0;
    }
  C_UDMI(c,t,0) = source;
  return source;
}
DEFINE_SOURCE(ymom_source_1, c, t, dS, eqn)   
{
  static real pos[ND_ND];
  static real con, source, x, y, z;
  static int i;
  C_CENTROID(pos, c, t);
  x = pos[0];
  y = pos[1];
  z = pos[2];
  i = 0;
  if (x > X_MIN_1) i++;
  if (x < X_MAX_1) i++;
  if (y > Y_MIN_1) i++;
  if (y < Y_MAX_1) i++;
  if (z > Z_MIN_1) i++;
  if (z < Z_MAX_1) i++;
  if(i == 6)
    {
      con = C2_1*0.5*C_R(c,t);
      source = -con*fabs(C_V(c,t))*C_V(c,t);
      dS[eqn] = -2*con*fabs(C_V(c,t));
    }
  else
    {
      source = 0;
    }
  C_UDMI(c,t,1) = source;
  return source;
}
DEFINE_SOURCE(zmom_source_1, c, t, dS, eqn)
{
  static real pos[ND_ND];
  static real con, source, x, y, z;
  static int i;
  C_CENTROID(pos, c, t);
  x = pos[0];
  y = pos[1];
  z = pos[2];
  i = 0;
  if (x > X_MIN_1) i++;
  if (x < X_MAX_1) i++;
  if (y > Y_MIN_1) i++;
  if (y < Y_MAX_1) i++;
  if (z > Z_MIN_1) i++;
  if (z < Z_MAX_1) i++;
  if (i == 6)
    {
      con = C2_1*0.5*C_R(c, t);
      source = -con*fabs(C_W(c,t))*C_W(c,t);
      dS[eqn] = -2*con*fabs(C_W(c,t));
    }
  else
    {
      source = 0;
    }
  C_UDMI(c,t,2) = source;
  return source;
}
another one is the same in replacing 1 by 2

Code:
#include "udf.h"

DEFINE_SDOF_PROPERTIES(sdof_prop_1, prop, dt, time, dtime)
{
  Domain *domain = Get_Domain(10);
  Thread *thread_a = Lookup_Thread(domain,20);
  static real x_cg_a[ND_ND], f_glob_a[ND_ND], m_glob_a[ND_ND];
  static float netmoment;

  Compute_Force_And_Moment(domain, thread_a, x_cg_a, f_glob_a, m_glob_b, TRUE);

  prop[SDOF_MASS] = 0.001624241;
  prop[SDOF_IXX] =  0.00000623;
  prop[SDOF_IYY] = 0.00000703;
  prop[SDOF_IZZ] =  0.00000219;

  prop[SDOF_ZERO_TRANS_X] = TRUE;
  prop[SDOF_ZERO_TRANS_Y] = TRUE;
  prop[SDOF_ZERO_TRANS_Z] = TRUE;

  prop[SDOF_ZERO_ROT_X] = TRUE;
  prop[SDOF_ZERO_ROT_Y] = FALSE;
  prop[SDOF_ZERO_ROT_Z] = TRUE;

  prop[SDOF_LOAD_M_Y] = -9.81*prop[SDOF_MASS]*sin(DT_THETA (dt)[1])*0.045;

  netmoment = m_glob_a[1] + prop[SDOF_LOAD_M_Y];

  printf("\n Udated 6DOF propperties : DT_THETA_Y = %e, Added Torque = %e, Net Torque = %e", DT_THETA (dt)[1], prop[SDOF_LOAD_M_Y], netmoment);
}
another one is the same in replacing 1 by 2, a by b and the domain and the thread are changed

Thanks for your help
flo90000 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
[OpenFOAM.org] compile error in dynamicMesh and thermophysicalModels libraries NickG OpenFOAM Installation 3 December 30, 2019 00:21
[blockMesh] blockMesh with double grading. spwater OpenFOAM Meshing & Mesh Conversion 92 January 12, 2019 09:00
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh gschaider OpenFOAM Community Contributions 300 October 29, 2014 18:00
OpenFOAM without MPI kokizzu OpenFOAM Installation 4 May 26, 2014 09:17
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


All times are GMT -4. The time now is 03:01.