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

Cell Zone Conditions initialization Problem

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

Like Tree1Likes
  • 1 Post By ansys_matt

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 21, 2014, 11:24
Default Cell Zone Conditions initialization Problem
  #1
Member
 
Join Date: Feb 2013
Posts: 60
Rep Power: 13
ansys_matt is on a distinguished road
Hello,

I am trying to simulate methane combustion in a tank. To start, I set the model to species transport with an inlet bringing in a mixture of methane-air (the fluent database mixture) from one inlet. The tank is open on the other end which I set as an outlet.

My question is this: I set the Cell Zone Conditions to the methane-air mixture (a fluid). But after the solution is calculated and I check in cfd-post at the first time step, the concentration of both methane and O2 (in fact all species) are zero everywhere inside the tank until it starts coming in from the inlet!

Why is the concentration of all species zero when I set the cell zone conditions to be the methane-air mixture? It appears that the only methane (and the only 02) is coming in from the inlet as the solution moves forward in time. How can I begin the simulation with the methane-air mixture already inside the tank (and thus a non-zero species concentration from the start)?

I thought that is what the Cell Zone Conditions setting did??

Thanks.

Last edited by ansys_matt; August 21, 2014 at 14:20.
ansys_matt is offline   Reply With Quote

Old   August 21, 2014, 14:38
Default Edited question
  #2
Member
 
Join Date: Feb 2013
Posts: 60
Rep Power: 13
ansys_matt is on a distinguished road
I edited my question so hopefully it is clearer.
Please help!
ansys_matt is offline   Reply With Quote

Old   August 22, 2014, 16:47
Default Solved
  #3
Member
 
Join Date: Feb 2013
Posts: 60
Rep Power: 13
ansys_matt is on a distinguished road
Hello,

I solved this by using a UDF to initialize before solving. Here is the contents of the UDF, for future reference. This is run only once before the solution starts, so it simply sets the correct values in all the cells.


Code:
/***********************************************************************
   UDF for initializing species mass fraction.  
   Uses C_YI(cell_t,Thread,Spec. num)

   This UDF should be run before solution initialization.

      Species 0 is Methane (Mass Fraction)
      Species 1 is O2 
      Species 2 is H2O
      Species 3 is CO2
      Species 4 is N2
 ************************************************************************/
 
 #include "udf.h"
 
 DEFINE_INIT(my_init_func,d)
 {
    cell_t c;
    Thread *t;
    real xc[ND_ND];
    /* loop over all cell threads in the domain */
    thread_loop_c(t,d)
      {
         /* loop over all cells */
         begin_c_loop_all(c,t)
           {
              C_CENTROID(xc,c,t);

                C_YI(c,t,0) = 0.056;
                C_YI(c,t,1) = 0.22;
                C_YI(c,t,2) = 0.0;
                C_YI(c,t,3) = 0.0;
                C_YI(c,t,4) = 0.724;
           }
         end_c_loop_all(c,t)
      }
 }
saeed110 likes this.
ansys_matt is offline   Reply With Quote

Old   October 13, 2014, 05:45
Default matt
  #4
New Member
 
university
Join Date: Oct 2014
Posts: 1
Rep Power: 0
saeed110 is on a distinguished road
hi matt
thanks for your comment
how should i verify for fluent to know that, what is the species 1 or species 2?
thanks
saeed110 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
[CGNS] CGNS converters available mbeaudoin OpenFOAM Meshing & Mesh Conversion 137 December 14, 2018 05:20
Export boundary setting in Fluent 14.0 asal FLUENT 4 September 28, 2017 10:40
Porosity profile, dividing a zone, or getting zone location from zone khoopes FLUENT 0 June 2, 2012 20:39
Problem in IMPORT of ICEM input file in FLUENT csvirume FLUENT 2 September 9, 2009 02:08
A problem about setting boundary conditions lyang Main CFD Forum 0 September 19, 1999 19:29


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