Fluids

Fluids

Reaction ID and species ID

    • Weiqiang Liu
      Subscriber

      Hello, everyone,


       


      I am trying to simulate surface reaction with a micro-combustor by importing chemkin mechanisms into fluent. however, I met two problems.


       


      First, I need to know the species ID of some particular species. Since I have both gas phase species and surface site species. I wonder what is the sequence of species in the species mixture panel, gas phase species first or site species first?


       


      Second, I want to use UDF to define the surface reaction rate of some surface reactions. Since I have 50 surface reactions to define, I want to use a 'for' structure to loop over all the reactions I want to define according to their ID. How can I do that in ANSYS fluent?


       


      Thanks very much!


       


       


      weiqiang

    • DrAmine
      Ansys Employee

      Can you check the customization manual after DEFINE_SR_RATE if it does answer your question? The gas species are always listed first the others later telling you the site density. 

    • Weiqiang Liu
      Subscriber

      thanks very much.


      So the gas phase species first and then site species. The customization manual after DEFINE_SR_RATE only tells me how to define surface reaction one by one.  Like ‘if (STREQ(r->name,”reaction-1&rdquo)  *rr=100’


      this tells me how to define reaction rate according to reaction name. But how can I define reaction rate by reaction ID. By doing so, I can just use a ‘for’ struction to loop over all reactions very easily. Otherwise, I have to define the reaction rate one by one.


      best.


      weiqiang

    • Weiqiang Liu
      Subscriber

      Can you check the customization manual after DEFINE_SR_RATE if it does answer your question? The gas species are always listed first the others later telling you the site density. 


       


      thanks very much.


      So the gas phase species first and then site species. The customization manual after DEFINE_SR_RATE only tells me how to define surface reaction one by one.  Like ‘if (STREQ(r->name,”reaction-1&rdquo)  *rr=100’


      this tells me how to define reaction rate according to reaction name. But how can I define reaction rate by reaction ID. By doing so, I can just use a ‘for’ struction to loop over all reactions very easily. Otherwise, I have to define the reaction rate one by one.


      best.


      weiqiang


    • DrAmine
      Ansys Employee

      Reactions can be identified by their name through the r->name statement and I think this might help here:


      if (!strcmp(r->name, "reaction-1"))


        {


           .... /* r->name is identical to "reaction-1" ... */


        } 


       


      I am not aware about accessing the reaction's ID's as it is not a part of the reaction structure.

    • Weiqiang Liu
      Subscriber

      Thanks very much!


      another question, I defined some surface reactions in material panel and I loaded my surface rate UDF normally. Then do I need to hook the UDF or something to make my UDF effective? or  I just need to run the model directly.


      Best.


      Amine

    • DrAmine
      Ansys Employee

      You need to hook the UDF as described under DEFINE_SR_RATE. If everything is complied and loaded properly then just run the case.

    • Weiqiang Liu
      Subscriber

      Yes, everything is compiled and loaded properly. So I just need to run the case without any other manipulation?


      I mean DEFINE_SR_RATE is no like DEFINE PROFILE ,by which I need to hook in inlet BC panel .


      for DEFINE_SR_RATE, I just need to build and load?


       


      thanks so much!


       


      weiqiang

    • DrAmine
      Ansys Employee

      You need to hook it under user defined function hooks. 

    • Weiqiang Liu
      Subscriber

      Thanks very much. I am totally a new user of ANSYS fluent. Thanks for your patience !!!!


       

    • DrAmine
      Ansys Employee

      You are welcome. I recommend that you carry out some Tutorials to get familiar with a lot of Fluent panels. The tutorials are available within the online Help. 

    • Weiqiang Liu
      Subscriber

      That’s very nice of you!! I’ll go through the tutorials.

Viewing 11 reply threads
  • You must be logged in to reply to this topic.