CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   udf initliazing (https://www.cfd-online.com/Forums/fluent-udf/147042-udf-initliazing.html)

santu January 12, 2015 06:45

udf initliazing
 
Dear friends

I have a problem in udf initializing problem in serial/parallel running in my PC.
when i running the udf in parallel the following error coming

C:\PROGRA~1\ANSYSI~1\v145\fluent\fluent14.5.0
tx86\3ddp\fl1450s.exe received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: #f

when i running the udf in parallel the following error coming

99999 (..\src\mpsystem.c@1172): mpt_read: failed: errno = 10054

999999: mpt_read: error: read failed trying to read 4 bytes: No such file or directory
MPI Application rank 0 exited before MPI_Finalize() with status -1073741819
The fl process could not be started.

so anybody help me regarding the above problem


I also posted my udf

#include "udf.h"
#include "sg.h"
#include "sg_mphase.h"
#include "flow.h"
#include "mem.h"
#include "materials.h"
#include "storage.h"
#define T_SAT 247.15

DEFINE_MASS_TRANSFER(liq_gas_src, cell, mix_liq, from_index, from_species_index, to_index, to_species_index)
{
real m_lg;
Thread *liq = THREAD_SUB_THREAD(mix_liq, (3, 1)); /* liq phase species no 1*/
Thread *gas = THREAD_SUB_THREAD(liq, 2); /*liq phase 2*/
Material *mat = THREAD_MATERIAL(liq);
time = CURRENT_TIME;
real yi = C_YI(cell, liq, 3);
real vof_l = C_VOF(cell,liq);
real vof_v = C_VOF(cell, gas);
real T_l = C_T(cell, liq);
real T_v = C_T(cell, gas);
real rho_l = C_R(cell, liq);
real rho_v = C_R(cell, gas);
if (NULL != THREAD_STORAGE(thread,SV_T_G))
C_STORAGE_G(cell, thread, SV_T_G)
if (T_l >= T_SAT)
{
m_lg = -0.1*vof_l*rho_l*fabs(T_l-T_SAT)*time/T_SAT;
}
if ((m_lg == 0. ) && (T_v <= T_SAT))
{
m_lg = 0.1*vof_v*rho_v*fabs(T_SAT-T_v)*time/T_SAT;
}
return m_lg;
}


All times are GMT -4. The time now is 01:25.