|
[Sponsors] |
July 25, 2017, 06:34 |
Segmentation fault::Execute_at_end
|
#1 |
New Member
Mat
Join Date: Jan 2017
Posts: 23
Rep Power: 9 |
Hai CFD user
I would like to add energy source term to my problem. I wrote UDF and compiled it.(no issues) but I am getting an error at the end of 20 iterations. This error always occurs at the max number iteration step, for example, if I increase max iteration to 50 error occurs at 50th iteration at the first-time step. udf code DEFINE_ON_DEMAND(solid) { Domain *d=Get_Domain(1); int zone_id=11; Thread *t = Lookup_Thread(d,zone_id); cell_t c; begin_c_loop(c,t) { C_UDMI(c,t,0) = 0.1; } end_c_loop(c,t) } DEFINE_EXECUTE_AT_END(source_calculation) { Domain *d; Thread *t; cell_t c; real dt=CURRENT_TIMESTEP; int zone_id=11; thread_loop_c(t,d) { begin_c_loop(c,t) { C_UDMI(c,t,1)=C_T(c,t)/some constant; C_UDMI(c,t,2)=0.01; C_UDMI(c,t,0)=C_UDMI(c,t,0)+(C_UDMI(c,t,2)*dt); } end_c_loop(c,t) } } DEFINE_SOURCE(energy, c, t, dS, eqn) { real x[ND_ND]; real source; source = some constant* C_UDMI(c,t,2); dS[eqn] = 0; return source; } |
|
July 25, 2017, 06:48 |
|
#2 |
Senior Member
Kal-El
Join Date: Apr 2017
Location: Finland
Posts: 150
Rep Power: 9 |
= Error at the end of timestep
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sigSegv error, segmentation error? | ollebapur | OpenFOAM Running, Solving & CFD | 1 | June 11, 2018 07:54 |
Segmentation fault when running dieselFoam or dieselEngineFoam in parallel | francesco | OpenFOAM Bugs | 4 | May 2, 2017 21:59 |
Segmentation fault in SU2 V5.0 | ygd | SU2 | 2 | March 1, 2017 04:38 |
Segmentation fault when running in parallel | Pj. | OpenFOAM Running, Solving & CFD | 3 | April 8, 2015 08:12 |
segmentation fault when installing OF-2.1.1 on a cluster | Rebecca513 | OpenFOAM Installation | 9 | July 31, 2012 15:06 |