Ansys Products

Ansys Products

Discuss installation & licensing of our Ansys Teaching and Research products.

Expression for droplet location monitoring

    • Amir
      Subscriber

      Hi there,

      for tracking a droplet on a flat surface, I am going to write an expression for each direction (x, y, z) then using three different monitors

      this is the top view of the problem, a flat solid surface and an initial blue droplet on that

      first defined three separate monitors based on this expression, only ask about one of them as the others would be likewise if I can solve the problem

      Average(IF(Volumefraction(phase='liquid')==0.5, x, x), ['int_fluid'])

      the coordinate system origin is in the middle of the domain set at 0, 0, 0

      1)what should I do for the false condition of the above expression? I do not want to have the postions of the non-interface positions in the point pools that the averaging would be done on all of them,

      now if I am not mistaken this expression, does average over all of the domain location cells as the pools of positions are filled with the droplet interface and the other points, even if I use mass weight still this is not a true expression, as includes the positions of the air (surrounded points)

      2) I thought maybe I can shift the domain as below

      and use this expression

      Average(IF(Volumefraction(phase='liquid')==0.5, x, 0 [mm]), ['int_fluid'])

      still not true,

      I wonder if somebody help me about this problem.

       

      Regards,

      Amir

    • Rohan Gulavani
      Ansys Employee

      Hello Amir,

      Appologies since I am unable to understand your requirement. However I would like to give some clarity on expression. Expression Average is used to average any variable. e.g. if you want to average pressure over surface then expression would be Average(pressure, [Surface name, Fluid zone], Weight = Area).

      And If statement is conditional statement, So if condition is satisfied it execute first statement or else looks for second statement. 

      If you want to take avg pressure on surface if Volume Fraction == 0.5

      then,

      IF(Volumefraction(phase='liquid')==0.5, Average(pressure, ['int_fluid'], Weight = 'Volume')

      In above expression, It will average pressure over volume if condition is satisfied, else it will do nothing.

      Hope you get clarity with this answer.

       

      • Amir
        Subscriber

        Hello Rohan,

        thanks for your reply.

        All I am looking for is writing three independent expressions that separately can monitor the location of a droplet (one expression for x, one is for y, one expression for z).

        the droplet's existence is represented by volume that has a volume fraction >0.5 this is why I am using a conditional sentence IF(Volumefraction(phase='liquid')==0.5,....    in my expression

        the result of this condition when is true would be point clouds of liquid which is what I am looking for

        but this condition also reports the vof<0.5 in the else (not true part) as well

        I should use an average only on the true section of this conditional sentence which is the point cloud of the liquid phase but as this conditional sentence output would be the summation of the two satisfied and unsatisfied sections (the liquid and air), when I do average on those points, the result is not the average location of the droplet (liquid), i.e.,

        Average(IF(Volumefraction(phase='liquid')>0.5, x, 0 [m]), ['int_fluid'])

        so would you please help me to modify this expression or write a new one for my purpose, something the output of that can be used as the real location of the droplet and can be defined as a monitor on that, for real-time droplet tracking.

        thanks in advance,

        Amir

         

        • Rohan Gulavani
          Ansys Employee

           

          Hello Amir,

          Thanks for clarity.

          you can use operator ‘>=’ instead of ‘==’ to discard all volume fraction <1. 

           

      • Amir
        Subscriber

        Hi Rohan,

        this is not possible and not right expression using your expression 

        IF(Volumefraction(phase='liquid')==0.5, Average(pressure, ['int_fluid'], Weight = 'Volume'))

        It shows

        IF:Expected 3 argument(s) but for 2 arguments(s),

        the else condition should be set

        • Rohan Gulavani
          Ansys Employee

          Hi Amir,

          You are absolutely right since Fluent Expression needs 3 statement. We need to provide else condition as well. It wont work as in other languages.

          Thanks for correcting me and appologies for incorrect information

Viewing 1 reply thread
  • The topic ‘Expression for droplet location monitoring’ is closed to new replies.