# Assigning values for outlet boundary from its adjacent cell

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 11, 2013, 12:08 Assigning values for outlet boundary from its adjacent cell #1 New Member   Ali nabavi Join Date: Jul 2012 Posts: 10 Rep Power: 6 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, 21:54 #2 Senior Member   Join Date: Aug 2011 Posts: 315 Rep Power: 13 Technically it is not hard to do this. But physically are you seeking for the far field or outflow b.c.? Ali.nabavi likes this.

 July 11, 2013, 22:05 #4 New Member   Ali nabavi Join Date: Jul 2012 Posts: 10 Rep Power: 6 Thank you for your fast reply... Actually i want to use it for pressure outlet B.C.

July 11, 2013, 22:19
#5
New Member

Ali nabavi
Join Date: Jul 2012
Posts: 10
Rep Power: 6
Quote:
 Originally Posted by shikamaru 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 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.

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, 01:06 #6 New Member   Nara Shikamaru Join Date: Apr 2012 Posts: 22 Rep Power: 6 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, 05:09
#7
New Member

Ali nabavi
Join Date: Jul 2012
Posts: 10
Rep Power: 6
Quote:
 Originally Posted by shikamaru 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?
Thank you very much. I will take a look and will let you know about the result. I am modelling multiphase flow at the outlet boundary when all three phases are exiting the domain because our consider pressure outlet with a constant pressure as a default, there will be some disorders in my flow and it does not allow my phases to exist as easily as they were passing through the micro channel I tried outflow boundary but got worst result in this way to adjust on minimised the difference of outlet pressure with those three phases I want to condier the adjacent cell pressure for outlet and make my mesh super fine.

Hope you have some alternative remedy...

 July 12, 2013, 15:11 #8 New Member   Nara Shikamaru Join Date: Apr 2012 Posts: 22 Rep Power: 6 I am doing something similar for multiphase flow. I am using VOF, check msg.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post shrina OpenFOAM Running, Solving & CFD 10 October 3, 2013 14:38 Anna Tian CFX 1 June 16, 2013 06:28 thehexman Main CFD Forum 1 February 5, 2010 07:10 Pankaj CFX 9 November 23, 2009 05:05 brooksmoses OpenFOAM Post-Processing 2 December 8, 2008 11:00

All times are GMT -4. The time now is 22:00.