CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Q on the sign of Phi at a coupled patch

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 10, 2016, 23:29
Exclamation Q on the sign of Phi at a coupled patch
  #1
Member
 
Jack
Join Date: Dec 2011
Posts: 94
Rep Power: 14
ripperjack is on a distinguished road
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
ripperjack is offline   Reply With Quote

Old   October 11, 2016, 17:34
Default
  #2
Member
 
Jack
Join Date: Dec 2011
Posts: 94
Rep Power: 14
ripperjack is on a distinguished road
Quote:
Originally Posted by ripperjack View Post
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
ripperjack is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Near wall treatment in k-omega SST Arnoldinho OpenFOAM Running, Solving & CFD 38 March 8, 2017 13:48
createPatch Segmentation Fault (CORE DUMPED) sam.ho OpenFOAM Pre-Processing 2 April 21, 2014 02:01
[Commercial meshers] Using starToFoam clo OpenFOAM Meshing & Mesh Conversion 33 September 26, 2012 04:04
Using snGard (T) on coupled patch for conjugateHeatFoam solver!!! kamkari OpenFOAM 11 May 30, 2011 12:50
[Other] StarToFoam error Kart OpenFOAM Meshing & Mesh Conversion 1 February 4, 2010 04:38


All times are GMT -4. The time now is 08:17.