Fluids

Fluids

UDF for Adjacent Cells

TAGGED: 

    • mctom0518
      Subscriber

      I am new to defining UDFs for adjacent cells. I am dealing with a system that requires transferring data from one boundary to the adjacent boundary along an internal-internal boundary. The problem is that I am dealing with 3 internal boundaries that are adjacent to one another (e.g. water internal boundary, equilibrium internal boundary as a thin surface, and gas internal boundary). I wish to collect adjacent cells of the "equilibrium boundary layer" but only in the "gas internal boundary layer." 

      Is there a way to select adjacent cells only from one domain (as opposed to adjacent cell)?

    • Rob
      Ansys Employee

      Please can you post an image? I'm not quite sure what you're trying to do. 

    • mctom0518
      Subscriber

      Hello Rob,

      Thank you for your time and help. Below is a picture.

      Basically, I wish to only retrieve adjacent polyhedral cells in the blue domain from the green boundary line.

    • Rob
      Ansys Employee

      Is that a mesh boundary or a liquid free surface? 

    • mctom0518
      Subscriber

      Hello Rob,

      This is a mesh boundary. 

    • Rob
      Ansys Employee

      If it's a wall & wall:shadow there should only be one cell for each surface facet. Where that surface contacts the external wall gets messy as the cell may not be common to both boundaries. 

    • mctom0518
      Subscriber

      Hello Rob,

      Thank you for your reply. Actually, all of these zones are internal, which is why I am confused about how to select the correct adjacent cells. 

      Is there a way that I can use an "IF" loop to only perform operations on cells for specific z-coordinate?

      e.g. IF z >= 1 do .... else z <= 1 do nothing

    • Rob
      Ansys Employee

      That could work. You're looking for the cell is a specific cell zone assuming you have two or three different fluid zones (labels). 

    • mctom0518
      Subscriber

      Yes, that is correct. Would I be able to use something like C_CENTROID for the z-axis only, while also using F_C0 and F_C1?

    • Rob
      Ansys Employee

      It could, but what happens when the surface moves due to the flow solution? 

Viewing 9 reply threads
  • You must be logged in to reply to this topic.