CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

Segmentation fault::Execute_at_end

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 25, 2017, 06:34
Default Segmentation fault::Execute_at_end
  #1
New Member
 
Mat
Join Date: Jan 2017
Posts: 13
Rep Power: 2
mataus is on a distinguished road
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;
}
mataus is offline   Reply With Quote

Old   July 25, 2017, 06:48
Default
  #2
Senior Member
 
KaLium's Avatar
 
Kal-El
Join Date: Apr 2017
Location: Finland
Posts: 150
Rep Power: 2
KaLium is on a distinguished road
= Error at the end of timestep
KaLium is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
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 05:38
Segmentation fault when running in parallel Pj. OpenFOAM Running, Solving & CFD 3 April 8, 2015 08:12
sigSegv error, segmentation error? ollebapur OpenFOAM Running, Solving & CFD 0 August 18, 2014 05:20
segmentation fault when installing OF-2.1.1 on a cluster Rebecca513 OpenFOAM Installation 9 July 31, 2012 15:06


All times are GMT -4. The time now is 18:20.