|
[Sponsors] |
September 9, 2019, 10:21 |
Porosity as function of position
|
#1 |
New Member
Robin
Join Date: Sep 2019
Posts: 4
Rep Power: 7 |
Hello,
I would like to create a UDF which sets the porosity value at a fixed value at a given position. I have been struggling with this for the last couple of days but I am still not succesful . That is why I ask you guys, as I hope you might help me a bit further. So the problem, I have the following UDF written: #include "udf.h" DEFINE_PROFILE(PROF_Pm_Zeta,thread,i) { cell_t cell; real x[ND_ND]; real a; begin_c_loop(cell,thread) { if (x[0] > 0.2) { a = 0.0; } else { a = 1.0; } C_PROFILE(cell,thread,i) = a; } end_c_loop(cell,thread) } I call this UDF in Fluent as: Cell zone conditions -> Porous Zone -> Fluid porosity Its goal is to set the porosity equal to 0, when the x-value is larger than 0.2m. However, after implementing this in a rather simple test case (1 inlet + 3 outlet boundaries), it seems to not work. The velocity is not affected what so ever. Does any one have an idea why the porosity is not changed as I intended it to do? Robin |
|
September 13, 2019, 02:52 |
Solved
|
#2 |
New Member
Robin
Join Date: Sep 2019
Posts: 4
Rep Power: 7 |
No need to comment anymore, I managed to fix the problem.
For those wondering, if you want to create a pressure drop in a certain location use the same UDF mentioned above, but change the value of a=1.0 to 1e9 (or something high). After interpreting this code in Fluent, you should go to: Cell Zone Condition -> Porous zone -> Inertia and viscous losses. This will result in an artificial solid or a seal of some sort which blocks the fluid. If you want to influence the heat transfer, than use the above mentioned UDF for the porosity. If you want to know more, I suggest checking out the ANSYS Fluent User Guide. Hope this will help some of you struggling with the same , Robin |
|
November 6, 2020, 04:00 |
|
#3 | |
New Member
Aref
Join Date: Feb 2018
Posts: 5
Rep Power: 8 |
Quote:
I appreciate your guidance. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 18:22 |
[Other] refineWallLayer Error | Yuby | OpenFOAM Meshing & Mesh Conversion | 2 | November 11, 2021 12:04 |
[snappyHexMesh] How to define to right point for locationInMesh | Mirage12 | OpenFOAM Meshing & Mesh Conversion | 7 | March 13, 2016 15:07 |
UDF for writing porosity as a function of distance from the wall | rohinibc | Fluent UDF and Scheme Programming | 5 | August 8, 2012 09:16 |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 07:42 |