|
[Sponsors] |
Segmentation Error during solution initialization using F_FLUX(f,t) Command |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 7, 2017, 01:52 |
Segmentation Error during solution initialization using F_FLUX(f,t) Command
|
#1 |
New Member
Navier Stoke
Join Date: Aug 2017
Location: USA
Posts: 2
Rep Power: 0 |
Hi, I am trying to write UDF regarding diameter distribution of secondary phase in multiphase Simulation. I have two phases in my case. Primary phase is gas and secondary phase is liquid. The relation used needs mass flow rate of both liquid and gas phase to calculate the diameter of liquid droplet in each cell. Fluent successfully compiles the UDF. Also, UDF successfully hooks to the secondary phase diameter. But it gives following error whenever I initialized solution.
"received a fatal signal (Segmentation fault).Error Object: #f" I have checked each line of code by commenting others. The problem I found is with C_FLUX(f,t). Below is the code for refrence: Code:
#include "udf.h" #include "math.h" #define SIGMA 0.07286 /*surface tension coefficient */ DEFINE_PROPERTY(liq_dia,cell,liq) { Thread *mix, *gas; mix = THREAD_SUPER_THREAD(liq); /*getting mixture thread*/ gas = THREAD_SUB_THREAD(mix,0); /*primary(gas) thread using mixture thread*/ /*----------------------------------------------------------------------------------------------------*/ double dia=0,v_fg=0,v_f=0,v_g=0,mass_gas=0,mass_liq=0; double NV_VEC(v); /*A vector*/ double ro_f=C_R(cell,liq); /*Density of liquid phase in the cell*/ double mu_f=C_MU_EFF(cell,liq); /*Effective viscosity of liquid in a cell*/ /*C_MU_L(cell,liq) */ double ro_g=C_R(cell,gas); /*Density of gas phase in the cell*/ /*----------------------------------------------------------------------------------------------------*/ NV_DD(v,=,C_U(cell,gas),C_V(cell,gas),C_W(cell,gas),-,C_U(cell,liq),C_V(cell,liq),C_W(cell,liq)); /*relative velocity vector*/ v_fg = NV_MAG(v); /*relative velocity magnitude*/ v_f=sqrt(C_U(cell,liq)*C_U(cell,liq)+C_V(cell,liq)*C_V(cell,liq)+C_W(cell,liq)*C_W(cell,liq)); /*liquid velocity magnitude*/ v_g=sqrt(C_U(cell,gas)*C_U(cell,gas)+C_V(cell,gas)*C_V(cell,gas)+C_W(cell,gas)*C_W(cell,gas)); /*Gas velocity magnitude*/ /*----------------------------------------------------------------------------------------------------*/ int ng,nl; face_t fg; face_t fl; Thread *tg; Thread *tl; c_face_loop(cell,gas,ng) { fg=C_FACE(cell,gas,ng); tg=C_FACE_THREAD(cell,gas,ng); mass_gas +=F_FLUX(fg,tg); /*Gas flow rate calculation loop over all the faces*/ } c_face_loop(cell,liq,nl) { fl=C_FACE(cell,liq,nl); tl=C_FACE_THREAD(cell,liq,nl); mass_liq +=F_FLUX(fl,tl); /*Liquid flow rate calculation loop over all the faces*/ } dia; /*Here comes the relation for droplet diameter calculation*/ return(dia); } Last edited by Navier Stoke; August 8, 2017 at 01:09. |
|
September 17, 2019, 16:23 |
|
#2 |
New Member
zhou
Join Date: Feb 2012
Posts: 1
Rep Power: 0 |
I have the same problem, it doesnot work
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Working directory via command line | Luiz | CFX | 4 | March 6, 2011 21:02 |
initialization using command line | rohit | CFX | 2 | October 16, 2008 12:02 |
Problem of compilation OF 14Allwmake command not found | erik_d | OpenFOAM Bugs | 13 | September 13, 2008 22:45 |
error during solution initialization | Muhammad Usman Qureshi | FLUENT | 7 | March 31, 2008 08:26 |
Conduct initialization with a old mesh solution | Jianfeng Zou | FLUENT | 1 | September 12, 2007 07:06 |