|
[Sponsors] |
April 25, 2016, 08:01 |
received a fatal signal(segmentation fault)
|
#1 |
New Member
kihoon lim
Join Date: Apr 2016
Posts: 1
Rep Power: 0 |
I'm now simulating the porous media flow (adsorption). I have written UDF including adjust function and mass source. But the simulation is stop by error message(=segmentation fault).
This message was shown when I do initialization and Run calculation 1.only hook adjust function =>Initialization: No error Run calculation: error 2. hook adjust function and apply mass source =>Initialization: error Run calculation: error This is my code #include "udf.h" #include "mem.h" /* k = 0.15;e = 0.37; q = 730;*/ /* q=density-kg/m^3 */ /* e=porosity */ /* ldf model constant(k) is assume as 0.15(need to change) */ enum { ads, X, Sm, source, }; DEFINE_ADJUST(adsorption,domain) { Thread *t; cell_t c; /*real A; real P; real tem;*/ thread_loop_c (t, domain) { begin_c_loop(c,t) { /*tem=C_T(c,t); P=C_P(c,t)+RP_Get_Real("operating-pressure"); A=tem*log(2339.3/P); /* Psat=fix */ C_UDSI(c,t,ads) = 0.15; /*0.35/0.01801534*exp(-0.000006*(pow(A,1.7)));*/ } end_c_loop(c,t) } } /* da equation included*/ /*P=C_P(c,t);*/ /*Psat, P is constant(25,20)*/ /*x_m=0.35, D=0.000006,n=1.7*/ /*0.01801534*/ DEFINE_ADJUST(X_ads,domain) { Thread *t; cell_t c; real dt; thread_loop_c(t, domain) { begin_c_loop(c, t) { dt = RP_Get_Real("physical-time-step"); C_UDSI(c, t, X) = C_UDSI_M1(c, t, X) + 0.15*dt*(C_UDSI_M1(c, t, ads) - C_UDSI_M1(c, t, X)); } end_c_loop(c, t) } } DEFINE_ADJUST(masssource,domain) { Thread *t; cell_t c; thread_loop_c(t, domain) { begin_c_loop(c, t) { C_UDSI(c, t, Sm) = -0.63*730*0.01801534*0.15*(C_UDSI(c, t, ads) - C_UDSI(c,t,X)); } end_c_loop(c, t) } } DEFINE_SOURCE(m_source,c,t,dS,eqn) { dS[eqn] = 0.0; return C_UDSI_M1(c,t,Sm); } I do not know about solution of the error message. please help me. #I applied porous zone thank you |
|
April 28, 2016, 09:26 |
|
#2 |
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23 |
How about if you initialize first and then hook the UDF? Also if you initialize and run for few time-steps (at-least 2) and then hook UDF?
Since the error is too general it is difficult to judge just on basis of UDF. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
fluentError: received a fatal signal (Segmentation fault). | thomaszhangjing | Fluent UDF and Scheme Programming | 11 | January 13, 2021 10:37 |
Fluent udf Error: received a fatal signal (Segmentation fault) | syble | FLUENT | 3 | December 9, 2016 17:28 |
Error: receive a fatal signal(Segmentation fault) | SNeCu | Fluent UDF and Scheme Programming | 3 | March 15, 2016 23:16 |
received a fatal signal (segmention fault) | fs10224 | Fluent UDF and Scheme Programming | 0 | June 30, 2014 03:20 |
error while compiling the USER Sub routine | CFD user | CFX | 3 | November 25, 2002 16:16 |