Error: received a fatal signal (Segmentation fault).
UDF 代码:
#include "udf.h"
#include <math.h>
DEFINE_MASS_TRANSFER(liq_gas_source, cell, thread, from_index, from_species_index, to_index, to_species_index)
{
real m_lg, K, R;
real YI_SAT = 1.5e-6;
Thread *gas, *liq;
gas = THREAD_SUB_THREAD(thread, from_index);
liq = THREAD_SUB_THREAD(thread, to_index);
m_lg = 0.0;
if((C_YI(cell,liq,1)>YI_SAT)&&(C_VOF(cell,liq)>0.)&&(C_VOF(cell,gas)<=1))
{
R=45.833e-6*sqrt(CURRENT_TIME-30.0)+0.833e-6;
K= 7.38e-9*(1/(R)+1/sqrt(3.14157.38e-9(CURRENT_TIME-30.0)));
m_lg =-1000K(C_YI(cell,liq,1)- YI_SAT);
}
return (m_lg);
}