Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Modelling a cup of water, implementation of boundary conditions

    • Jord
      Subscriber

      I am modelling a (rigid) cup partially filled with water, that is excited by a horizontal forced sinusoidal motion. (Think of it as a cup of water on a table, where you move the cup back and forth) as a result the water inside the cup will start to move.


      In Ansys Fluent:


      1) I managed to draw my 2D (this is sufficient for now) representation of the cup in Design modeller.


      2) I used a basic  square mesh for the whole domain (multiphase: air and water).


      3) What do I need to do to let Ansys move my "2D cup" from left to right? Such that the water in the cup is excited by the motion of the walls?


      Please may I request some guidance where to start? I am fairly new to Ansys and made serval attempts but all remains unsuccessful

    • Kalyan Goparaju
      Ansys Employee

      Hello, 


      Can you please insert the photo into the post instead of adding it as an attachment? 


      You will need to use the VOF solver to simulate the movement of the air-water interface. To make the cup move, you need to write a UDF to setup the motion of the zone. 


      Thanks,


      Kalyan

    • Jord
      Subscriber

      Hi Kalyan,


      Thank you for your response. Please see below a sketch of what I am trying to create.



      Could you elaborate a bit further on creating a UDF and which (DEFINE) function would be best to use for that? I made a couple of attempts. However, I am not sure how I should apply this to my model. Via:



      • Cell zone conditions?

      • Boundary conditions?

      • Dynamic mesh: this seems illogical because the mesh with respect to the container should remain unchanged.  


       

    • Amine Ben Hadj Ali
      Ansys Employee

      Two way:


       


      1/Non Inertial Frame and you interpret the force acting or the motion as negative acceleration and you provide as source term for momentum or you misuse the gravity vector


       


      2/Inertial Frame: you define the motion to whole thing (now taking the positive velocity) and use CG Motion UDF.

    • Jord
      Subscriber

       


      I tried to write a UDF to translate the "cup" with a horizontal sinusoidal motion. This is what is looks like: MovingTank.c


       


       


      Then I put this file in the my working directory under....  dp0/FFF/Fluent. And then use the interpret function in setup. 


       


      These are two issue that I am experiencing:


       


      1) My cup has dimensions 20m wide and 30m height and I want it be filled with water up to 20 meter. How do I do that, I tried setting the value "water Volume Fraction" in the initialization tab to 0.6667 but this doesn't seem to work? 


       


      2) To use the UDF where should I call it, in the boundary conditions and define "Wall Motion"--> "Moving Wall" or somewhere else?


       


      Please help me out.


       


       


       

    • Amine Ben Hadj Ali
      Ansys Employee

      You crate a cell register with up to 20 m height and fill that register with water.


      The UDF will be called in the Dynamic Mesh Panel whenever you define the whole body as rigid body


       


      All above is documented and there are tutorials showing what to do.

Viewing 5 reply threads
  • The topic ‘Modelling a cup of water, implementation of boundary conditions’ is closed to new replies.