|
[Sponsors] |
September 9, 2019, 09:21 |
Porosity as function of position
|
#1 |
New Member
Robin
Join Date: Sep 2019
Posts: 4
Rep Power: 6 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 17:22 |
[Other] refineWallLayer Error | Yuby | OpenFOAM Meshing & Mesh Conversion | 2 | November 11, 2021 11:04 |
[snappyHexMesh] How to define to right point for locationInMesh | Mirage12 | OpenFOAM Meshing & Mesh Conversion | 7 | March 13, 2016 14:07 |
UDF for writing porosity as a function of distance from the wall | rohinibc | Fluent UDF and Scheme Programming | 5 | August 8, 2012 08:16 |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 06:42 |