# Q on the sign of Phi at a coupled patch

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Display Modes
 October 10, 2016, 23:29 Q on the sign of Phi at a coupled patch #1 Member   Jack Join Date: Dec 2011 Posts: 89 Rep Power: 7 Hi guys, I am developing a parallel solver using OpenFOAM and I have a question on the sign of Phis at a coupled (inter-processor) patch. For example, in serial case, if Phi=0.1 at a face centered at (0.5 0.5 0.5). In parallel (2 decomposed domains), if this face is at an inter-processor patch, there will be two Phis owned by each domain. However, if you check their signs, one will be Phi=0.1 and the other will be Phi=-0.1. I guess this is due to the different signs of outward normal direction for these 2 decomposed domains. How do I know which Phi changes its sign for the above case? This is very important for my solver since I need to change the magnitude of Phi at the coupled patch (consistently). Now I can't do PhiNew=Phi+0.01 since I will get PhiNew_proc1=0.1+0.01=0.11 (expected value), whereas PhiNew_proc2=-0.1+0.01=-0.09 (no! I need PhiNew_proc2=-0.1-0.01=-0.11 instead). Thanks very much in advance! Jack

October 11, 2016, 17:34
#2
Member

Jack
Join Date: Dec 2011
Posts: 89
Rep Power: 7
Quote:
 Originally Posted by ripperjack Hi guys, I am developing a parallel solver using OpenFOAM and I have a question on the sign of Phis at a coupled (inter-processor) patch. For example, in serial case, if Phi=0.1 at a face centered at (0.5 0.5 0.5). In parallel (2 decomposed domains), if this face is at an inter-processor patch, there will be two Phis owned by each domain. However, if you check their signs, one will be Phi=0.1 and the other will be Phi=-0.1. I guess this is due to the different signs of outward normal direction for these 2 decomposed domains. How do I know which Phi changes its sign for the above case? This is very important for my solver since I need to change the magnitude of Phi at the coupled patch (consistently). Now I can't do PhiNew=Phi+0.01 since I will get PhiNew_proc1=0.1+0.01=0.11 (expected value), whereas PhiNew_proc2=-0.1+0.01=-0.09 (no! I need PhiNew_proc2=-0.1-0.01=-0.11 instead). Thanks very much in advance! Jack
Guys,

This dirty fix may work. I need to output the face vectors and the corresponding face center coordinates to a file in serial. When I run parallel jobs, I need to read this file and directly compare the sign of face vector at a given location. If the signs agree, I will do PhiNew_proc1=Phi+0.01, otherwise PhiNew_proc1=Phi-0.01.

I believe there will be a much better and cleaner solution. Any ideas?

Thanks!
Jack

 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 Arnoldinho OpenFOAM Running, Solving & CFD 38 March 8, 2017 14:48 sam.ho OpenFOAM Pre-Processing 2 April 21, 2014 02:01 clo OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 33 September 26, 2012 04:04 kamkari OpenFOAM 11 May 30, 2011 12:50 Kart OpenFOAM Meshing & Mesh Conversion 1 February 4, 2010 05:38

All times are GMT -4. The time now is 13:01.

 Contact Us - CFD Online - Top