|
[Sponsors] |
June 11, 2021, 00:27 |
How to run my udf about the transient part?
|
#1 |
New Member
WANG LU
Join Date: Sep 2019
Posts: 22
Rep Power: 7 |
Hello everyone,
Nowadays I compile an udf about the change of the water latent thermal ,which I compiled successfully. But when I run the case, it showed "Node 27: Process 25448: Received signal SIGSEGV." I have no idea about what's wrong. I hope I can get help from you. The code as follow: #include "udf.h" #include "sg_mphase.h" #include "mem.h" #define L 2340000.0 DEFINE_SOURCE(energy_source,c,t,dS,eqn) { Thread *m_t,*v_t; m_t=THREAD_SUPER_THREAD(t); v_t=THREAD_SUB_THREAD(m_t,1); real a; real rho_mixture,rho_mixture_last; real fv,fv_last; real delta; rho_mixture=C_R(c,m_t); rho_mixture_last=C_R_M1(c,m_t); fv=C_VOF(c,v_t)*C_R(c,v_t)/rho_mixture; fv_last=C_VOF_M1(c,v_t)*C_R_M1(c,v_t)/rho_mixture_last; delta = RP_Get_Real("physical-time-step"); a=(rho_mixture_last*fv_last*L-rho_mixture*fv*L)/delta; dS[eqn]=0.0; return a; } Thanks for your help! Best wish! |
|
June 11, 2021, 04:22 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
as far as I understand, you are using macros to get value from previous timestep:
C_R_M1 C_VOF_M1 others. on the initial time step these values are not specified.
__________________
best regards ****************************** press LIKE if this message was helpful |
|
June 11, 2021, 23:44 |
|
#3 |
New Member
WANG LU
Join Date: Sep 2019
Posts: 22
Rep Power: 7 |
Thank you so much!
I think you are right.So,how can I fix the problem? Best wish! |
|
Tags |
udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Transient simulations: how to tell its converged (I've read the FAQ & user guides!) | JuPa | CFX | 12 | March 27, 2020 18:24 |
UDF for transient conduction. | Ravindra123 | Fluent UDF and Scheme Programming | 2 | October 20, 2013 10:45 |
execute udf in ss & transient simulation | hosseinhgf | FLUENT | 0 | December 1, 2010 09:41 |
parse error in transient udf | spring | FLUENT | 1 | July 6, 2010 07:26 |
CFL criterion in transient run | prabhu | CFX | 2 | July 5, 2007 18:30 |