Possible to toggle wall adhesion on and off via UDF while simulation is running?

  • Last Post 01 February 2019
  • Topic Is Solved
tallred11 posted this 15 January 2019


I understand that I can use wall adhesion to set a specified contact angle and I can vary it with a UDF. However, I would like the contact angle to be able to change freely during some portions of my simulation (basically have wall adhesion disabled), but at other times I'd like to fix a specified contact angle. Is it possible to toggle the boundary condition on and off like this using a UDF? It seems like if I hook a UDF up to the contact angle BC and don't specify a contact angle (which I thought might essentially disable wall adhesion) it behaves strangely and assumes some arbitrary contact angle. 

Alternative, if there were a way for me to manually set the contact angle outside of the wall adhesion settings, that could potentially work too. I could just leave wall adhesion disabled and fix the contact angle manually when needed. However, I can't immediately think of a way to do that where it would actually fix the value like it does using the DEFINE_PROFILE macro.



Order By: Standard | Newest | Votes
abenhadj posted this 15 January 2019

1/Not providing a contact angle (or giving a default) while having wall adhesion on is not a solution as Fluent will affect the orientation of the interface in the near wall cell(s)

2/There is no documented way to switch off a model from UDF. You might however try use the "Automatic Initialization and Case Modification" where you let Fluent know that you want to run some steps without any adhesion and  some steps with UDF+adhesion


Best regards, Amine

  • Liked by
  • tallred11
tallred11 posted this 15 January 2019

Alright, thanks!

tallred11 posted this 01 February 2019

For anyone who references this, having wall adhesion off effectively behaves the same way as if you have a contact angle set to 90 degrees. Thus, it seems that setting the contact angle to 90 degrees is somewhat of a fake way to "toggle-off" wall adhesion.

abenhadj posted this 01 February 2019

Not always true depends on level of refinement mesh topology and spatial discretization

Best regards, Amine