# Boundary condition for alternating material inflow

 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 24, 2018, 10:50 Boundary condition for alternating material inflow #1 New Member   MAR Join Date: May 2018 Location: Germany Posts: 1 Rep Power: 0 Hello, I want to have an inflow of two materials through the same inlet however, alternately rather than simultaneously. The model being used is Multiphase - Volume of Fluid. The velocity of the mixture will be fixed while the volume fraction for each material would be continously and alternatingly switched from 1 to 0 and vice versa, so as to simulate slug flow with slugs of defined lengths. These lengths would obviously depend on the switching times, which in turn would be a function of the mixture velocity and the time step size. From what I have read, it seems that I need to write a User Defined Function to change the boundary condition continuously during the calculation. My first question is whether or not this approach would be correct. Additionally, I understand that I could use two inlets instead of a single inlet but, a changing boundary condition would certainly save me a lot of time. If UDF is the way to go, I believe that I would need to call the volume fraction, the mixture velocity, and the time step size in my UDF. I do not understand how to reference these variables in C. Would anyone be kind enough to point me in the right direction? I would like to thank you in advance. Best regards, MAR

 May 24, 2018, 12:56 #2 Member   zobekenobe Join Date: Mar 2009 Location: Dublin, Ireland Posts: 72 Rep Power: 17 Hi Mar, You can use the FLUENT udf manual You mainly have to use the defined the macros to interact with the conditions for your domain. the DEFINE_PROFILE macro should allow you to define the boundary conditions on whichever boundary you specify to apply it. CURRENT_TIME is the fluent special macro that would allow you use the flow time to give a periodic boundary condition for different inlet conditions. there are multiphase macros which you can then explore to access each phase and their volume fraction I hope this helps you get started cheers!!

 Tags boundary condition, fluent - udf, vof multiphase