Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Droplet Evaporation Mass as Source UDF

    • alikuyuk
      Subscriber

      Hello All,

      I am trying to simulate a large scale bulk spray cooling system. In my case:

      • There is a primary phase accounting for air + vapor (mixture).
      • There is a secondary phase accounting for condensed water.
      • The saturation is controlled according to Antoine Eqn. and mass transfer between phases is according to Lee's model.
      • There is a DPM phase (water) sprayed as injections.
      • I am using steady state, mixture model with DPM on.

      Here is the catch, when droplets evaporate the model diverges at some point.

      When I limit the vaporization and go inert, I get the steady state results fine by dropping the dew point down, condensing vapor as I want but, I would like to capture the droplet evaporation at the same time. In our discussions we thought that this might be due to the 'source problem' as the eulerian continuity won't recognize the mass source from DPM unless we state it in the cell zone conditions. (Is this a correct point? You may interrupt here and think the problem could be elsewhere, please let me know if so.)

      Accordingly, I have tried to write a UDF code to extract the evaporated mass information so that I would feed that as the mass source to my continuous phase. I am thinking:

      • Getting a list of injections
      • Looping over particles of that injection for the current solution
      • Summing an overall mass flow of the remaining DPM mass
      • Subtracting that value from my initial injection mass and find out evaporated mass.
      • Then return that mass to the DEFINE_SOURCE macro so it is visible under Fluent.

      However, so far, I couldn't make it work.

      Following code compiles but gives an error message saying 'empty value'.

      I know you guys won't debug codes but, I would definitely appreciate some support here.. If there is another way to do this, I am open for that option too.

      Thank you very much!

      Here is my UDF:


      #include "udf.h"

      #include "dpm.h"

      #define injectionmass 10 // initial total injection mass in kg per second

      DEFINE_SOURCE(vaporization_mass,c,t,dS,eqn)

      {

      real mpdot;

      real mass;

      Particle *p;

      Injection *I;

      Injection *Ilist = Get_dpm_injections();

      loop(I, Ilist)

      {

      loop(p, I->p)

      {

      c = P_CELL(p);

      t = P_CELL_THREAD(p);

      C_UDMI(c,t,0) += P_FLOW_RATE(p);

      }

      }

      mass = C_UDMI(c,t,0);

      mpdot = injectionmass - mass;

      return mpdot;

      }

    • alikuyuk
      Subscriber
      ...Or could this be simply tweaked via Lee's coeff's without any need for UDF?
Viewing 1 reply thread
  • The topic ‘Droplet Evaporation Mass as Source UDF’ is closed to new replies.