Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

User Defined Function not working as Intended

    • Ben.McCuen
      Subscriber

      Shown below is contour plot of the mole fraction of a gas traveling from left to right. 

      I am attempting to simulate the gas in question permeating into the circular holes (gas 1). A second gas is also permeating out on a 1:1 molar basis, 'swapping' with the first gas (gas 2). 3 user defined functions have been made to mimic this behavior. One handles gas 1 permeating into the circles, the second handles gas 2 permeating out from the circles and the third is applied to the mass source term to handle the difference in molecular masses. 

      I have run this simulation numerous times and get reasonable results until my fluid flows beyond my last row of circles. Both gas 1 and gas 2 sharply decrease at this point even though there is no surface that has the udf applied to it. I created multiple vertical planes at various points along the flow and used "Surface Report - Mass Weighted Average" to find mass percent’s of both gas 1 and gas 2. 

      I would appreciate any guidance on what could be causing my issue. 

      Thank You 

    • Rob
      Forum Moderator

      What are the backflow conditions and are you seeing any warnings?

    • Ben.McCuen
      Subscriber

      Below are my outlet conditions. The thermal tab is set to the same temperature as the inlet. Species are set to 0 for every mole fraction. The inlet and outlet would be farily large and we would not expect any backflow. 

      I got no warnings during initialization or running the simulation. 

Viewing 2 reply threads
  • The topic ‘User Defined Function not working as Intended’ is closed to new replies.