|
[Sponsors] |
Assigning values for outlet boundary from its adjacent cell |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 11, 2013, 13:08 |
Assigning values for outlet boundary from its adjacent cell
|
#1 |
New Member
Ali nabavi
Join Date: Jul 2012
Posts: 10
Rep Power: 14 |
Hello,
I am very new to the world of UDF ( Mostly 3 days!). I want to write a UDF for my outlet boundary condition (pressure outlet) to get its value from its neighbor (adjacent cell). Actually I am struggling to how can I get the info from the adjacent cell and then assign it to the boundary cell. I know it is very was but I am struggling for a couple of days and still no result. |
|
July 11, 2013, 23:05 |
|
#3 |
New Member
Nara Shikamaru
Join Date: Apr 2012
Posts: 22
Rep Power: 14 |
I was looking a way to fix velocities in adjacent cells of a boundary (which is not the right thing to do by the way). Take a look at this macros, you might be able to do what you want to do with these.
1. Use Lookup_Thread to find the face thread pointer to the boundary. 2. Use begin_f_loop to loop over the faces of the face thread 3. Use F_C0 and F_C1 to find the cell threads of the adjacent cells of the face 4. F_C0_THREAD and F_C1_THREAD will give you the thread pointer to the adjacent cells 5. use the cell the thread pointer to copy the values from those cells ---do what ever you want after that with those. Hope it helps. |
|
July 11, 2013, 23:05 |
|
#4 |
New Member
Ali nabavi
Join Date: Jul 2012
Posts: 10
Rep Power: 14 |
Thank you for your fast reply...
Actually i want to use it for pressure outlet B.C. |
|
July 11, 2013, 23:19 |
|
#5 | |
New Member
Ali nabavi
Join Date: Jul 2012
Posts: 10
Rep Power: 14 |
Quote:
You mean in fluent find the zone ID and using Lookup_thread to find t of boundary faces. So until here I will have the t of boundary faces. Then using begin_f_loop start my loop. Next with F_c0 and F_c1 what will I get? Imagine I have a horizontal pipe which the fluid is flowing from the left to the right. If I use those F_c0 and F_c1 what will I get as the face is on outlet boundary so there is no C1 then? |
||
July 12, 2013, 02:06 |
|
#6 |
New Member
Nara Shikamaru
Join Date: Apr 2012
Posts: 22
Rep Power: 14 |
Read the UDF Manual: Chapter 3: Additional Macros for Writing UDFs and look for this macros
in V13, page 220 will clarify what you want to know. Out of Curiosity, why do you want to look at the pressure of the adjacent cells of the outlet? |
|
July 12, 2013, 06:09 |
|
#7 | |
New Member
Ali nabavi
Join Date: Jul 2012
Posts: 10
Rep Power: 14 |
Quote:
Hope you have some alternative remedy... |
||
July 12, 2013, 16:11 |
|
#8 |
New Member
Nara Shikamaru
Join Date: Apr 2012
Posts: 22
Rep Power: 14 |
I am doing something similar for multiphase flow. I am using VOF, check msg.
|
|
Tags |
adjacent cell, outlet boundary condition, udf and programming |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FvMatrix coefficients | shrina | OpenFOAM Running, Solving & CFD | 10 | October 3, 2013 15:38 |
Question about heat transfer coefficient setting for CFX | Anna Tian | CFX | 1 | June 16, 2013 07:28 |
Immersed Boundary Ghost Cell Method | thehexman | Main CFD Forum | 1 | February 5, 2010 07:10 |
RPM in Wind Turbine | Pankaj | CFX | 9 | November 23, 2009 05:05 |
Retrieving boundary patch values adjacent to a given cell | brooksmoses | OpenFOAM Post-Processing | 2 | December 8, 2008 11:00 |