Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

UDF wall velocity trouble

    • ansysuser
      Subscriber

      UPDATE: the initial question has been answered, but another problem arose.  See further down.  Thanks.

      I was going off of this example: 


      I have a very simple geometry, as shown below:



       


      I wanted the wall to move forward, which would push the fluid out the top,which is an outlet. So I used a UDF like this:



      To accomplish this, I set the wall to a Rigid Body Dynamic Mesh with that UDF.  It worked, but not like I naively expected, as shown below:



      After the first time step it error with:


      Error: Update-Dynamic-Mesh failed. Negative cell volume detected.


      Error Object: #f


      I understand that I needed to have the adjacent wall shrink along with the movement of the moving wall so that the corner stays the same.


      Questions:  How do I do that?  Another UDF?  Which macro to use and how?  My ultimate goal is to have the bottom wall and the two adjacent walls all move towards the center of the fluid domain to create the pressure that drives the fluid out the top, for a much more complex geometry.  Is this possible and am I on the right track? 


      Thanks

    • learn13
      Subscriber

      Have you incorporated the dynamic mesh tool Layering? This will collapse or split hex elements as the boundary moves.


      I don't have experience with layering, but with other remeshing tools your time steps are an important factor to preventing negative cell volume errors. i.e. your time steps need to be small enough to allow the elements to appropriately remesh.


      This might help if you haven't seen it already:


      https://www.youtube.com/watch?v=aTIwmEyp3_8

    • ansysuser
      Subscriber

      Hello Learn13,


       


      Yes, I found that once layering was enabled the side walls shrank with each movement upwards of the base.  But now I face a new problem.  When I tried to make both the bottom edge and the sides move towards the center, I found that the bottom edge does NOT shrink in response to the side edges movement.So, both edges moved towards the center as desired, inducing a flow, but even with layering enabled the bottom edge never changes length.  So I end up with a strange sharp point as shown in the second picture.


       


       



       



       


      Question:  Is it possible to, instead of moving both walls towards the center, create two geometries for the problem.  One that is the beginning size and one that is the end size and have Fluent interpolate between them as it solves?  I looked at using the Event setting and noticed there was a replace mesh.  Could that work for this?  How?  Once again, my ultimate goal is to shrink the volume to drive fluid out the opening.  I have gotten fluid motion with the above method, but it seems troublesome.


       


       

    • Rob
      Forum Moderator

      Check the moving wall settings: layering should remove the whole cell but I suspect you've missed something. There are a couple of tutorials on YouTube (thanks learn13) and I'm fairly sure there's one in the R19 & 2019 documentation that comes with the Student software (click on Help and navigate to the "top" menu). 

    • ansysuser
      Subscriber

      Hello Rwoolhou,


       


      Do you mean the Moving Wall settings in the boundary conditions under "Wall Motion"?  I had the three walls set as stationary because I was moving them through a UDF in the Dynamic Mesh settings just like in the tutorial shown by learn13 (he uses a profile - I use a UDF).  In that tutorial, he has the leftmost vertical wall moving to the right as a rigid body.  The two adjacent walls shrink as the moving wall moves right.  I can get this to happen in my simulation if I only move one wall - through layering. 

      The problem is that I need to move 3 walls towards the center during the simulation. During the simulation, all three walls do move towards the center, but they do not all shrink as they need to.  The two vertical walls do shrink in response to the horizontal wall moving upwards, but the horizontal wall does not shrink in response to the vertical walls moving.  This results in the strange triangle shown in the pictures. 

      I tried to set the Moving Wall through the boundary conditions even though I am controlling them through a UDF, and the result is very much the same.  You can see that I both vertical walls moved towards the center and became shorter over the 10 timesteps.  The horizontal moving wall moved towards the center but did not become shorter.




      Here are my settings for the dynamic mesh for the horizontal wall.  The settings for the two vertical walls are identical.





      And here is the UDF for the horizontal wall.  The UDF for the vertical walls is practically the same except I update the NODE_X value.


    • Rob
      Forum Moderator

      I think you're going to have to move all of the nodes in much the same way as we use for biological modelling. The "normal" approach will tend to leave the corners behind: those nodes need to move in both x & y to avoid the issue you're seeing. 

    • mohkh
      Subscriber
      Dear AllnI need to simulate wall artery which moves as a sinewave motion . I can not apply it probely . is there any idea to do it.nBest regtrads nmohkh77@gmail.comnnn
    • Amine Ben Hadj Ali
      Ansys Employee
      what about defining the side walls as deforming along the plane/line?n
    • YasserSelima
      Subscriber
      make a post explaining your problem in more details. ... and post pictures, don't attach them as Ansys employees like are not allowed to download pictures.n
Viewing 8 reply threads
  • The topic ‘UDF wall velocity trouble’ is closed to new replies.