Fluids

Fluids

Topics relate to Fluent, CFX, Turbogrid and more

DEFINE_MASS_TRANSFER steady-state

    • prebenjs
      Subscriber

      Hi,

      I'm trying to implement a DEFINE_MASS_TRANSFER UDF in a steady-state simulation. It shows a clear mass-trasnfer occuring when running transient, but does not show anything when running in steady-state (although looking at a contour of the mass-transfer rate is should). Has anybody any tips to why this is happening and how to solve this?

    • Rob
      Ansys Employee
      If you look at the phases do you still have both/all phases to transfer to and from?
    • YasserSelima
      Subscriber
      Use
      CURRENT_TIMESTEP
      It is always = 1 in the steady state and it increases in the transient. So, your UDF can know if this is a transient or SS simulation.
    • prebenjs
      Subscriber
      The phase is pathched with one phase, that will be transferred to the other phase. So on the volume fraction contour the one phase that is patched is only present, although the mass--transfer contour indicates that there is a mass transfer rate that should be happening. Really weird. Do you have any clue about this?
    • prebenjs
      Subscriber
      How do I Implement this to make the make the mass-transfer occur while running steady-state?
    • Rob
      Ansys Employee
      Can you post some images?
    • prebenjs
      Subscriber
      Ain't really that much to show. All is explained above, however it could be mentioned that the volume-fraction residual does not show a line in the steady-state (although contour showing mass-transfer rate at service. When it comes to the UDF it is really simple where i patch UDM with mixture = 1, the i use the condition:
      if (C_UDMI==1) --> set a mass-transfer rate as for my specifications.
      This works perfectly in transient simulation, but doesn't seem to produce a mass transfer (as nobody can't be seen from volume-fraction contour). I've tried with mass transfer up to 1E+10 to simply see if there was some reaction going but can't see anything.
    • DrAmine
      Ansys Employee
      If your phase transfer rate is non zero then there is an issue: please reduce any VOF cut off and try again. Also make use of pseudo transient solver.
    • prebenjs
      Subscriber

      My VOF cut off is already at 1e-8, shouldn't this be low enough? I know that you do not really debug UDF's but do you see anything wrong in using this:
      IF (C_UDMI(c,t,0) ==1):
      mass_transfer_rate =12345
      I can't really find why this is not working in steady-state simualtion but in transient. Note i pathc the C_UDMI with mixture value of =1 before calculation. Shouldn't this give me a mass transfer at the patched cells with the given rate ? (works in transient, thus really weird)
      In addition, I checked using pseudo-transient solver but this didn't seem to solve anything.
      One curiosity that i can mention is that i have not parallelized this UDF, however it still runs when using parallel mode.
    • prebenjs
      Subscriber
      Might this be related to utilizing coupled level-set + VOF ? Because i can see that it it shows a produced face on the volume-fraction contour when this is turned off. However, it seems like the mass-transfer almost hits an equilibrium where it only happens on the face (and not allowing the transformed phase to flow to other fields in the domain). This does not happen in transient simulation where it is clear that the transformed phase spreads out in the domain (due to accumulation of the phase produced of course). Do you have any suggestions on why this is happening?
    • DrAmine
      Ansys Employee
      Please do not use level set.
    • prebenjs
      Subscriber
      The problem is that i have to capture the surface tension. When not using level set, the steady-state diverges. Do you have any tips towards stabilizing solutions where surface tension in complex geometry needs to be captured? Is there possible to e.g. set this surface tension in another way that may be more stable ?
    • DrAmine
      Ansys Employee
      Running unsteady and having a refined mesh where surface tension is important (AMR can be helpful)
      What you can try: You might use Optimzed settings and stabilizing features.
      Level Set is more strict on mesh and time scales. Moreover is of limited use in Ansys Fluent. That is why reku on pure VOF.
    • prebenjs
      Subscriber
      Yes unsteady is a good tip, but i suspect that the time-step size is too small for the rate of mass-transfer. When running for quite some time i still can't seem to see any difference in the volume-fraction plot. Thus I wanted to try out steady-state, but it does not look the phenoma changes. Is there a lower limit of how low the mass transfer rate can be to be picked up by the solvers ?
      I actually tried with adaptive mesh refinement on the walls, but it still diverged. So I'm getting quite low on ideas on how to make this converge (the steady-state).
    • Rob
      Ansys Employee
      There may not be a steady solution. The mass transfer rate may not be the issue. With VOF if you don't create much of the other phase you may find the extra mass isn't sufficient to alter the solution, and if it's not accurate then that mass could easily be lost in the numerical errors.
    • prebenjs
      Subscriber
      Okay, but lets just assume that there is something approximate to a steady-state (I've gotten steady-state solution for similar problem but with velocity inlets which account for a much higher flow velocity than what i really want with the mass-transfer).
      Regarding the phenomena where the mass produces isn't sufficient to alter the solution and if it's not accurate this can be lost. Is there any way to check this ? or any workaround here? So an increase in mass transfer rate would not help here ?
      Regarding accuracy, it might be that this fits my case. However, I do not understand what parameter to look at to evaluate this accuracy? (residual of phase 2 volume fraction around 1e-01). Any tips here?
    • Rob
      Ansys Employee
      You have a mass transfer rate, you have flux data on the boundaries for in & out and you can monitor the zone mass for each phase. In steady state you'd expect to see a (mostly) single value for each of those fields. However, if you're not well converged and the fluid densities are fairly dissimilar you don't need much of an error (convergence or mesh resolution) to lose the mass that's being transferred.
    • prebenjs
      Subscriber

      Okay so I extreact the net results regarding mass flux / mass flow rate (reported by Fluent, does not take into account the interior), and the mass in the interior, and compare these? I couldn't quite follow what you meant here.
      The volume integral of the mass transfer rate is really small (order 1e-14), and I can see that the mass flow rate of water, in the interior, fluctuates irregularly between being positive and negative.
    • Rob
      Ansys Employee
      So you're tracking a mass transfer of 1e-14 kg/s give or take on a domain that contains some kg of material. Water in/out of the domain will fluctuate by 0.1%-ish of the boundary value normally, more with VOF and as the domain mass fluctuations.
      So, looking at the model. Do you want to find the mass transfer rate (requires you to model the phase change) or to maximise the mass transfer rate (calculate the rate but may not need to make it happen)?
    • prebenjs
      Subscriber

      I already have a UDF with mass transfer. What i want to know is if the mass transfer rate (or mass of phase produced by mass transfer) is large enough to not be neglected / ignored by the solver in the simulation, as you mentioned above.
    • Rob
      Ansys Employee
      I don't think it's being ignored, it's more likely lost in the numerical error. If you switch to transient and get a really good convergence it'll probably show up in the fluxes.
    • DrAmine
      Ansys Employee
      Cut-off is something you need to consider
    • prebenjs
      Subscriber
      How should one consider the cut-off ? Should this be considered in terms of how large the mass transfer rate?
    • prebenjs
      Subscriber
      So what is the approach here to evaluate this ? Further, when evaluating mass flux with different phases, should one take into account the density of the other phase ? (since mass flow rate is really dependent on the density of the phase)
    • Rob
      Ansys Employee
      Density is covered in the mass transfer: you're transferring mass, you'll see the effect of the volume in the flow field.
    • DrAmine
      Ansys Employee
      Cut-off to be set in the panel. But even if you lower it up it might happen that the total mass transfer rate in the cell is still small to create an amount of the related phase: especially in condensation cases where density ratio is almost by 1000 and condensate VOF is very small: actually here where one start thinking about mesh resolution if one is using VOF like approach.

    • prebenjs
      Subscriber
      Yes this is similar to a condensation case where the density raito is almost 1000. So in these cases, where very small mass transfer rates are present, one have to opt for very fine mesh for the mass in the cell (related to the mass-transfer) to be related to the phase ?
      This seems very similar to my case since It is not showing any signs increasing changing the volume fractions, althouhg mass transfer is present. Would this also be the case running in steady-state ?


    • Rob
      Ansys Employee
      You need to resolve the flow. As you're using VOF this also means resolving the free surface.
    • DrAmine
      Ansys Employee
      I will rather use first unsteady and check if you are getting what you are expecting.
    • prebenjs
      Subscriber
      By runnning unsteady I get the results what I'm expecting, but the thing is with steady-state it would be possible to speed up this simulation quite significantly. That's the reason for the questions around this.
    • DrAmine
      Ansys Employee
      Perhaps it needs accumulation which does only work unsteady. Is hard without looking deep into the case and UDF or model to fix the reasons you are now experiencing.
Viewing 30 reply threads
  • You must be logged in to reply to this topic.