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

RyMorRyMor Member

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.

My question is related to the "interface" between the LTE porous zone and the air fluid zone above it. This "interface" is currently set as an interior zone. From my understanding, this is the correct condition for this "interface". I would simply like for the air to flow out of the porous zone and into the air zone.

However, when I run this simulation I keep getting the following errors:

*Error: < (less-than): invalid argument [1]: wrong type [not a number]

Error Object: inf.*

*Error: WorkBench Error: Could not handle event: SolutionStatusUpdate

Error Object: #f*

Please note that I use a UDF to initialize the temperature field at the start of this simulation and also to use a custom time setting/time advancement method. However, I am confident that this UDF is error free and does not influence the occurrence of this error.

Also, the purpose of this simulation is to "measure" the volume-averaged temperature of the "free" air space as the higher temperature porous zone cools convectively due to the injected air.

If someone could help get my on the right track/let me know what I am missing, I would appreciate it.

If anything is unclear from my problem description, please let me know, I am happy to clarify.

Thanks,

Ryan

Comments

  • RobRob UKForum Coordinator

    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.

  • RyMorRyMor Member

    Hi Rob,

    I 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.

    I 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).

    However, 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.

    Therefore, I think the primary issue with my simulation was modelling air as an incompressible-ideal-gas.

    Would 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?

    Thanks,

    Ryan

  • RobRob UKForum Coordinator

    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.

  • RyMorRyMor Member

    Hi Rob,

    The temperature field looks the same as picture in my previous image.

    The "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).

    The 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.

    As 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?

  • RobRob UKForum Coordinator

    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.

  • RyMorRyMor Member

    I have set the initial porous zone temperature by hooking a UDF function to apply the temperature field on simulation initialization.

    The code for this UDF is seen below:

    Where 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.

    In 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?

    Also, 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.

    For 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.

    Please let me know if there is any issue with my temperature initialization UDF or the way in which I am applying it.

    Thanks.

Sign In or Register to comment.