Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Porous Media – Fluid Interface (with Air as the single/only fluid) Issues

    • RyMor
      Subscriber

      Hello,

      I am hoping that someone can help me understand how to set up a simulation with a porous - fluid "interface".

      My simulation is relatively simplistic. Air enters the bottom of the domain through a velocity inlet, moves through a porous zone, exits the porous zone and enters a "free" air space (i.e. at a porous-fluid "interface"), and the exits the domain at a 0 pa gauge pressure outlet. The image below tries to illustrate the gist of this simulation. Please note that the blue section in this image is the "free" air space and the red section is the porous zone. Also, the temperature difference between these regions was set purposefully.

    • Rob
      Forum Moderator
      Interior is correct, and that is unlikely to be causing the problem. nWhenever a model fails with UDFs the first step is to remove the UDF. Patch a temperature in and use a fixed time step. You also need to review the error in Fluent as that'll be more diagnostic. Once we know the mesh & solver settings are OK use the UDF patch function and run and finally reapply the time stepping method you've designed. nFor info, a UDF can return no errors as it's grammatically correct but still cause the solver to fail either through omission (data is missing) or by producing values that cause instability in the code. n
    • RyMor
      Subscriber

      Interior is correct, and that is unlikely to be causing the problem. Whenever a model fails with UDFs the first step is to remove the UDF. Patch a temperature in and use a fixed time step. You also need to review the error in Fluent as that'll be more diagnostic. Once we know the mesh & solver settings are OK use the UDF patch function and run and finally reapply the time stepping method you've designed. For info, a UDF can return no errors as it's grammatically correct but still cause the solver to fail either through omission (data is missing) or by producing values that cause instability in the code./forum/discussion/comment/101937#Comment_101937

      Hi Rob, nI completed the debugging tips that you mentioned and was able to identify what I believe to be the main cause of the issues with my simulation. nI had been using user-defined properties for the air within the domain. As such, I tried using the Fluent-defined properties of air and my simulation progressed as intended (i.e. including with the use my UDF for temperature initialization and time-step control). nHowever, in my user-defined properties of air, I set the air to be modelled as an incompressible-ideal-gas . So, for trial, I altered only the density of air given by Fluent-defined properties (i.e. constant) and set it to incompressible-ideal-gas. After this change (and with all other settings and properties the same from the simulation run that worked), the simulation failed. nTherefore, I think the primary issue with my simulation was modelling air as an incompressible-ideal-gas. nWould you happen to know why this might be? Or what adjustments can I consider make such that air can be modelled as an incompressible-ideal-gas as opposed to having a constant density?nThanks, nRyann
    • Rob
      Forum Moderator
      Now you've run the model with fixed density look at the temperature field as that's the only thing that influences the density in the incompressible ideal gas. How does that look? In the original image you've got a blue strip around the porous media that could indicate an odd boundary condition setup. n
    • RyMor
      Subscriber
      Hi Rob, nThe temperature field looks the same as picture in my previous image. nThe blue strip that is shown, I believe is due to the presence of inlet flow at 298.15K (bottom boundary) and a constant temperature boundary also at 298.15K (lower, right-side, vertical boundary). nThe large blue area above the red porous zone, is the free air space that I have purposefully set to be at ambient temperature. While the red porous zone is purposefully set to the stated temperature.nAs stated the setup works when using a constant density, but fails when I use the incompressible-ideal-gas. Given the temperature fields are the same initially, is there anything else I should look into? n
    • Rob
      Forum Moderator
      How have you set the porous zone temperature? The cause of the solver failing is likely the temperature effect on the air density, either due to the boundary set up or gradients within the model. n
    • RyMor
      Subscriber
      I have set the initial porous zone temperature by hooking a UDF function to apply the temperature field on simulation initialization.nThe code for this UDF is seen below:nWhere the porous region is 4.65 m wide (x) and 2 m tall (y), and the initial temperature within this region is set to 773K.nIn terms of the boundary conditions, aside from the ones I have mentioned above, the upper portion of the right side wall (i.e. the wall adjacent to the air spaces as opposed to the porous space) is a zero heat flux wall. Is it an irregular setup to have heat losses through one portion of a wall and not another?nAlso, if the gradient between the hot zone and the cool zone might be an issue, what might be the correct approach to remedy this situation? While still retaining a similar temperature distribution as to what is picture above.nFor context, I am trying to model the convective cooling of an enclosed porous medium (sand) that has just been through a high temperature process, and record the temperature of the air exiting the sand pile in an air space above. nPlease let me know if there is any issue with my temperature initialization UDF or the way in which I am applying it. nThanks. n
Viewing 6 reply threads
  • The topic ‘Porous Media – Fluid Interface (with Air as the single/only fluid) Issues’ is closed to new replies.