Fluids

Fluids

UDF for time varying layer hight for dynamic meshes with layering

    • ankbecker
      Subscriber

      Hello,

      I would like to create a case with a moving mesh with layering on two boundaries. Unfortunately, my cell height varies very much within the moving domain, so that I need to define a time varying ideal layer height with a UDF. My question would be if there is a way to specify this function in a generic way and not with concrete values or equations. For example, I would like to set the ideal height to the height of the cell next to the one that is split or collapsed (see layer i in the attached picture). Something like that: h_ideal = h(layer_i (t) )

      Thanks for the help.

      Anna

    • Kishan Konannavar
      Ansys Employee
      Hello
      Could you please refer the following link on Dynamic Mesh Macro for variable cell layering height.
      2.6.2. DEFINE_DYNAMIC_ZONE_PROPERTY (ansys.com)
      Hope it helps.
      Regards
      Kishan
    • ankbecker
      Subscriber
      Hi thanks a lot for the answere. I have already checked this macro but I have only found a definition for the cell height as an equation. I could not find exactly what I need in the guide. Since I can not formulate an equation I would like to formulate a more generic way. Therefor I have to know the cell hightt for the second last layer (layer i) at each time step. Is there a macro or a easy way to excess this information within the DEFINE_DYNAMIC_ZONE_PROPERTY macro? I thought about solving this via the node coordinates, but that would meen, that I have to loop over all nodes in my mesh (about 3.5 mio or more) every timestep to find the layer height of layer i. I think that this will slow down my simulation drastically.
      Regards,
      Anna
    • Rob
      Ansys Employee
      Have a look at THREAD_T1 in https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v221/en/flu_udf/flu_udf_ConnectivityMacros.html%23flu_udf_macros_thr_t0_t1
      I don't think you need to loop over the whole model, but you will need to loop over all the cells next to the wall: I used the above to try and model sand dunes in about 2009.
      Not sure what you're doing, but it's common to keep the mesh near the wall fixed and collapse cells that aren't in the interesting areas of the model.
Viewing 3 reply threads
  • You must be logged in to reply to this topic.