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

Erron: FLUENT received fatal signal (ACCESS_VIOLATION) in DPM Heat and Mass Transfer

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 9, 2016, 05:14
Default Erron: FLUENT received fatal signal (ACCESS_VIOLATION) in DPM Heat and Mass Transfer
  #1
New Member
 
meljuntak
Join Date: Nov 2016
Posts: 7
Rep Power: 9
Melvin is on a distinguished road
Hi everyone..

I am a Ph.D. Student with research about simulation of coal drying and newbie in Ansys fluent. In my simulation I use UDF based on DPM multicomponent model as shown in UDF Guide for DPM_Heat_and_Mass_Transfer to dry coal lignite, I use Ansys Fluent 12 version with the transient model, injection of particle occur on 60 to 61 second, as much as 600 gr. After I compile my UDF there are occur error as shown below. Whether this UDF can use in the transient model or only in steady case. what the different in UDF between steady and unsteady.??? Thankyou

Error:
FLUENT 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

Did someone know how to solve this problem?? my UDF as listed below

#include "udf.h"
DEFINE_DPM_HEAT_MASS(multivap,p,Cp,hgas,hvap,cvap_ bulk,cvap_surf,dydt,dzdt)
{
int ns ; /*declaring variable i as an integer*/
int nc = TP_N_COMPONENTS( p ); /* number of particle component */
real dens_total = 0.0; /*total vapor density*/
real P_total = 0.0; /*vapor pressure*/
cell_t c0 = RP_CELL( &(p->cCell) ); /* cell and thread */
Thread *t0 = RP_THREAD( &(p->cCell) ); /* where the particle is in */
Material *gas_mix = THREAD_MATERIAL( t0 ); /* gas mixture material */
Material *cond_mix = p->injection->material; /* particle mixture material */
cphase_state_t *c =&(p->cphase); /*cell info of particle location */
real molwt[MAX_SPE_EQNS]; /* molecular weightf gas species */
real Tp = P_T(p); /* particle temperature */
real mp = P_MASS(p); /* particle mass */
real molwt_bulk = 0.; /* average molecular weight in the bulk gas */
real Dp = DPM_DIAM_FROM_VOL( mp / P_RHO(p) ); /* particle diameter */
real Ap = DPM_AREA(Dp); /* particle surface */
real Pr = c->sHeat * c->mu / c->tCond; /* Prandtl number */
real Nu = 2.0 + 0.6 * sqrt( p->Re ) * pow( Pr, 1./3. ); /* Nusselt number */
real h = Nu * c->tCond / Dp; /* Heat transfer coefficient */
real dh_dt = h * ( c->temp - Tp ) * Ap; /* heat source term */
dydt[0] += dh_dt / ( mp * Cp );
dzdt->energy -= dh_dt;
{
Material *sp;
mixture_species_loop(gas_mix,sp,ns)
{
molwt[ns] = MATERIAL_PROP(sp,PROP_mwi); /* molecular weight of gas species */
molwt_bulk += C_YI(c0,t0,ns) / molwt[ns]; /* average molecular weight */
}
}
/* prevent division by zero */
molwt_bulk = MAX(molwt_bulk,DPM_SMALL);

for( ns = 0; ns < nc; ns++ );
{
/* gas species index of vaporization */
int gas_index = TP_COMPONENT_INDEX_I(p,ns);
if ( gas_index >= 0 )
{
Material * cond_c = MIXTURE_COMPONENT(cond_mix, ns); /*condensed material*/
real vap_temp = MATERIAL_PROP(cond_c,PROP_vap_temp); /* vaporization temperature */
real D = MATERIAL_PROP_POLYNOMIAL(cond_c,PROP_binary_diffus ivity,c->temp); /* diffusion coefficient */
real Sc = c->mu / ( c->rho * D ); /* Schmidt number */
real k = ( 2.0 + 0.6 * sqrt(p->Re) * pow( Sc, 1./3. ) ) * D /Dp; /* mass transfer coefficient */
real cvap_bulk = c->pressure / UNIVERSAL_GAS_CONSTANT / c->temp
* c->yi[gas_index] / molwt_bulk / solver_par.molWeight[gas_index]; /* bulk gas concentration */
real vap_rate = k * molwt[gas_index] * Ap * ( cvap_surf - cvap_bulk ); /* vaporization rate */
if( 0. < vap_rate && Tp < vap_temp )
vap_rate = 0.;
dydt[1+ns] -= vap_rate;
dzdt->species[gas_index] +=vap_rate;
dydt[0] -= hvap[gas_index] * vap_rate / ( mp * Cp ); /* dT/dt = dh/dt / (m Cp) */
dzdt->energy += hgas[gas_index] * vap_rate; /* gas enthalpy source term */
P_total += cvap_surf; /*vapor pressure = vapor equilibrium concentration of vaporizing components*/
dens_total += cvap_surf * molwt[gas_index]; /*Total vapor density = mol/m3 *kg/mol*/
}
}
}
Melvin is offline   Reply With Quote

Old   November 13, 2016, 22:35
Default
  #2
Senior Member
 
Join Date: Jun 2014
Location: Taiwan
Posts: 100
Rep Power: 11
SJSW is on a distinguished road
1. It looks like that this model doesn't need the macro "DEFINE_DPM_INJECTION_INIT".
2. Why do you use "RP_CELL" and "cCell" in this line "cell_t c0 = RP_CELL( &(p->cCell) )"?? @@
I think that you could first modify the example macro provided in "DEFINE_DPM_HEAT_MASS", instead of mixing the codes of "DEFINE_DPM_INJECTION_INIT" and "DEFINE_DPM_HEAT_MASS".
SJSW is offline   Reply With Quote

Old   November 17, 2016, 01:06
Default
  #3
New Member
 
meljuntak
Join Date: Nov 2016
Posts: 7
Rep Power: 9
Melvin is on a distinguished road
Quote:
Originally Posted by SJSW View Post
1. It looks like that this model doesn't need the macro "DEFINE_DPM_INJECTION_INIT".
2. Why do you use "RP_CELL" and "cCell" in this line "cell_t c0 = RP_CELL( &(p->cCell) )"?? @@
I think that you could first modify the example macro provided in "DEFINE_DPM_HEAT_MASS", instead of mixing the codes of "DEFINE_DPM_INJECTION_INIT" and "DEFINE_DPM_HEAT_MASS".
Hi SJSW.
After I deleting that line... The simulation also gets the error. If I use the UDF as written in UDF guide fluent 12.. it can not be compiled.
Can you tell me wich part must be modified from the UDF as listed above?? Are the injection particles must be written in separate UDF??. The injection particle actually was setting in Define > injection>set> point properties for start and stop time
thanks
Melvin is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error - Solar absorber - Solar Thermal Radiation MichaelK CFX 12 September 1, 2016 05:15
error: FLUENT received fatal signal (ACCESS_VIOLATION) fatima ezzahra Fluent UDF and Scheme Programming 18 May 11, 2016 15:52
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 06:28
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00
Water subcooled boiling Attesz CFX 7 January 5, 2013 03:32


All times are GMT -4. The time now is 10:12.