Fluids

Fluids

Defining effective diffusivity in porous zone and non-porous zone.

    • Anshul
      Subscriber
      Hi all,nI am working on methanol steam reforming using packed bed. nIn reference paper, they mentioned that effective mass diffusivity will:nD_eff= (porosity^tortousity)*Diffusion coefficientnnthis is valid for porous zone only, for other zone:nD_eff= Diffusion coefficientnnHow can we accomodate this in FLUENT as we can give diffusivity only once in mixture tab ?nIf there is any UDF format for this, please let me know.nPlease help me with this.nn
    • Surya Deb
      Ansys Employee
      Hello, nIf I understand your problem correctly, you want to modify or vary your mass diffusivity based on the cell zone conditions.nYou can achieve this by using DEFINE_DIFFUSIVITY UDF. Inside the UDF, you can use THREAD_ID() macro to fetch the integer id of the zone and then use it to check and modify your diffusivity values accordingly. nYou will find more information about DEFINE_DIFFUSIVITY UDF here:nnYou will find more information about the zone specific macros here:nnI hope this helps.nRegards,nSuryann
    • Anshul
      Subscriber
      Hi!nThanks for the information.nI am not able to open up the links, please see if you can share some accessible links that I can use for making UDF.nnAnshuln
    • Rob
      Ansys Employee
      Click on help in the software, that'll open up a browser. Then click on the link provided. Our documentation isn't public domain, but is available to licenced users of the software. n
    • Anshul
      Subscriber
      Okay, Thanks for the information. I'll do that.nAnshuln
    • Anshul
      Subscriber
      Hi!nIn my case there are three zones as shown in the attached figure. Mass diffusivity value for ZONE 1 & ZONE 3 is 6.8e-05, whereas for ZONE 2 is 2.404e-05 m^2/s.nI have made the UDF as suggested here in forum. Please see if I am doing it correctly:nn#include udf.hn#define ZONE1_ID 8n#define ZONE2_ID 9n#define ZONE2_ID 10nDEFINE_DIFFUSIVITY(uds_diff, c, t, i)n{n  real diff;n  if(THREAD_ID(t) == ZONE2_ID)n    diff = 2.404e-05;n  elsen    diff = 6.8e-05;n  return diff;n}nnAnshuln
    • Karthik R
      Administrator
      This looks about right! Have you tried to compile and hook the UDF?nKarthikn
    • Anshul
      Subscriber
      Yes, I have used it and now my simulation is running by hooking up the UDF.nThanks for letting me know about it.nAnshuln
Viewing 7 reply threads
  • You must be logged in to reply to this topic.