|
[Sponsors] |
August 3, 2016, 11:09 |
SIGSEGV error
|
#1 |
Member
ERMACORA Florian
Join Date: May 2016
Posts: 39
Rep Power: 10 |
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; } 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); } Thanks for your help |
|
|
|
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 01:21 |
[blockMesh] blockMesh with double grading. | spwater | OpenFOAM Meshing & Mesh Conversion | 92 | January 12, 2019 10:00 |
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh | gschaider | OpenFOAM Community Contributions | 300 | October 29, 2014 19:00 |
OpenFOAM without MPI | kokizzu | OpenFOAM Installation | 4 | May 26, 2014 10:17 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |