Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

How to work with DPM UDF in steady state?

    • Gloria
      Subscriber

      I am working with DPM and I am trying to simulate in steady state. My system includes UDF that induces changes in the fluid and particle composition as a consequence of the contact between them. However, running the model in steady state, the loss of a certain quantity in one phase does not equal the gain in the other (the mass balance is not met). This is not happening while working in transient mode. Could anyone give me a piece of advice on how to sort this out? Thank you in advance!

    • Rob
      Forum Moderator

      If you're using fluid sink/source terms how are you defining the "time" taken for material being added to the cell? The source is something/m3/s so if the particle time step is small you not be adding enough on the fluid side. 

    • Gloria
      Subscriber

      Hi Rob, Thank you very much for your reply! I am using DPM source terms. I have checked the customization manual and it seems that these terms have units of something/s, and that the volume unit is derived from the cell volume. I am trying to work in steady state for both phases (steady tracking). Also, my problem is the inverse, the composition in the particles is too small compared to what disappears from the fluid. My model is intended to track the transfer of a species from the fluid to the particles. The amount that disappears from the fluid is expected to be in the particles, but the overall concentration is lower than it should be. I don't think the problem is in the formulation of both source terms, because they are described in the same way. In that term the time unit is derived from a matter transfer coefficient.

    • Rob
      Forum Moderator

      What are you measuring on the particle side? DPM concentration is kg per cell volume, so you may want a custom field function to find that. 

    • Gloria
      Subscriber

      I am measuring the concentration of the species. I am finding out this value by resorting to Results>Reports>Volume Integrals and getting the volume-weighted average value (kg/m3) of the Discrete Phase Variable DPM Conc of "species". Is this one a valid option?

    • Rob
      Forum Moderator

      Check the DPM Concentration definition: I'm not sure if you're returning kg/m3 rather than kg.  

      This might be a better option but you'd need transient particles. Otherwise, how much DPM mass escapes?

    • Gloria
      Subscriber

      I need to know the concentration of the species of interest in the disperse phase. I think the proposed option (DPM Report Definition) returns variables referred to the total mass in the discrete phase. I am attaching an image of the option I was considering so far. 
      I am trying to find out what can be influencing this imbalance, taking into account that both source terms have the same definition.  I am especially interested in a steady-state model. Is there any numerical aspect I should be taking into account for this? Thank you!

    • Rob
      Forum Moderator

      How far off are you if you multiply the above by the model volume? 

    • Gloria
      Subscriber

      Making a surface injection, the liquid losses 6.48e-13 kg of "species" (supposedly transferred to the discrete phase), while the DPM gained mass of "species" is 2.28e-14 kg. The differences are always over the order of magnitude. The differences are sensitive to the type of injection.

    • Rob
      Forum Moderator

      At those values you're in the convergence accuracy tolerance. Can you check on a single core. 

    • Gloria
      Subscriber

      Running the same model in serial processing the liquid losses 6.49e-13 kg of "species", while the DPM gained mass of "species" is 2.39e-14 kg.

    • Rob
      Forum Moderator

      OK, I assume that did a few DPM updates. How does the convergence plot look? If you monitor those two values over some iterations (a few hundred) how stable are they? Values at e-13 or so may be numerical - are you running double precision? 

    • Gloria
      Subscriber

      I am attaching an image of the residuals. Before I turn into steady-state, I have to initialise the problem running it on steady-state (if I do not do it, changes induced by the presence of particles are not registered in the fluid).

    • Rob
      Forum Moderator

      You mean steady or transient? The bit you need for the evaporating droplets is to have the DPM running with interaction on. 

    • Gloria
      Subscriber

       

      I do have the interaction with the continuous phase activated. I want to run the model in steady state. However, I need a few iterations in transient state before I turn into steady state (if not the particles are injected, they escape, but the UDF does not act over the fluid). In brief, I aim to work in steady state (iteration 325 and onwards in the image attached to my last post). 

       

    • Rob
      Forum Moderator

      If you run transient and then switch the transient particles should be removed. If that's the case what's retained by the solver to trigger the UDF in steady? 

    • Gloria
      Subscriber

      Hi again Rob, sorry for the delay in my answer. I have been diving into the basis of the Euler-Lagrange model. The conservation equations referred to the particles (Lagragian framework) do not include terms with their derivative with respect to the position (nabla operator), they only include terms with their derivative with respect to time. When trying to work in steady state, the value of these last terms will be 0. I have been checking other works that go over Euler-Lagrange, and in some of them it is specified that they work with steady state flow (no specification is made about the particles). My question is whether I can work with particles in steady state. Is there some way to do so? If I want to consider the mass transfer, do I have to simulate in transient state for the particles? Thank you in advance. 

    • Rob
      Forum Moderator

      Steady is fine - we usually run steady whenever possible. Your issue then is stability. The problem there tends to come from DPM source terms, so the averaging and linearisation terms can help. Depending on the coupling effect increasing the DPM update to 20-30 or decreasing to 3-5 can help: it depends what the DPM sources do to the calculation. 

      As mentioned earlier if the mass exchange is very low you may find there is an imbalance as you'll be running out of significant figures in the solver. 

       

    • Gloria
      Subscriber

      Thank you, Rob. When checking Reports>Discrete Phase Sources>DPM Mass Source (Sum) the given value is 0 kg/s. When checking this variable for DPM “species” Source, there is an output (negative, leaving the fluid). Do you have any idea why this first variable hasn’t the same value as the second (only one species is exchanged)? How can I fix that the source term to the conservation equation is the same as the one for “species”?

    • Rob
      Forum Moderator

      Is it 0.00000000 kg? I ask as previously you were looking at values at 1e-13kg, so I wonder if it's rounding error somewhere. 

    • Gloria
      Subscriber

      It is 0 kg/s, no decimal figures. That's why I was wondering whether there might be an additional cause of error.

    • Rob
      Forum Moderator

      Not sure, I'd expect some decimal places, does volume average or similar return any values? 

    • Gloria
      Subscriber

      The output for all the report types (except mass and volume) is 0, no decimal figures. 

    • Rob
      Forum Moderator

      That sounds like there's no data/no value rather than a problem with the report. 

    • Gloria
      Subscriber

      Could you give me any hint on how to act over the mass source and not only the source related to a certain species, please?

    • Rob
      Forum Moderator

      I think you said it worked in transient mode? If that's the case there's something off in the UDF or mass transfer macros. Common one to check is TP & PP for particle states (covered in the UDF manual). 

      Do transient particles on steady flow give sensible results? 

Viewing 25 reply threads
  • The topic ‘How to work with DPM UDF in steady state?’ is closed to new replies.