CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Species mass fraction in each cell (https://www.cfd-online.com/Forums/fluent/37909-species-mass-fraction-each-cell.html)

Mohan R September 15, 2005 10:21

Species mass fraction in each cell
 
Dear all, I am solving gas-liquid phase (two-fluid model) in bubble column reactor.Liquid is continuum phase and i added a tracer(species) in the liquid phase itself. I want to calculate mass fraction of tracer in all the individual cells.So written a DEFINE ADJUST udf to calculate the mass fraction in the individual cell using C_YI(c,t,i)

mp_thread_loop_c(cell_threads, mixture_domain, pt) {

begin_c_loop(cell,cell_threads)

{

tcr= C_YI(cell,cell_threads,0)

............

.............

}end_c_loop(cell,cell_threads) }

After i hook the UDF i get an error: Error: FLUENT received fatal signal (ACCESS_VIOLATION)

Please help me to workaround for the problem. Mohan


Giordano Bruno September 16, 2005 06:47

Re: Species mass fraction in each cell
 
Maybe in your Fluent's version you can't use species transport option and two-phase model...which is your version???I'm working with 6.1.22 and when I try to use a two-phase model the Species Transport Option is not available...

Regards,

Giordano Bruno

Mohan R September 16, 2005 06:52

Re: Species mass fraction in each cell
 
I am using Fluent 6.2.16 version, which has the facility for the species transport in multiphase system.

any workaround for me, thanking you in advance

Mohan

RoM September 29, 2005 10:21

Re: Species mass fraction in each cell
 
Access violations often indicate that you are trying to access data, where no data exist. Looking at your udf we will find the error in you second loop. From fluents point of view, a cell with mutiple phases holds 2 kind of data. Data that are shared by all phases are stored at the main cell level and can be accessed with the cell_threads pointer. Other data are phase specific and therefore NOT stored at the main cell level. They are stored in sub level threads with one thread for each phase. Sub level threads can be accessed with the pt pointer array, e.g. pt[2] would return then pointer to the sub level thread for the phase with index 2. Lets assume your liquid phase index is 2 then your udf should look like this

mp_thread_loop_c(cell_threads, mixture_domain, pt) {

begin_c_loop(cell,pt[2])

{

tcr= C_YI(cell,pt[2],0)

............

.............

}end_c_loop(cell,pt[2]) }

Good luck

RoM

Mohan R October 4, 2005 01:50

Re: Species mass fraction in each cell
 
Thanx a lot RoM, the solution suggested by you is working.

With regards, Mohan



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