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

Q on the sign of Phi at a coupled patch

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

Reply
 
LinkBack Thread Tools 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: 89
Rep Power: 7
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: 89
Rep Power: 7
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

Thread Tools
Display Modes

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 On
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 14:48
createPatch Segmentation Fault (CORE DUMPED) sam.ho OpenFOAM Pre-Processing 2 April 21, 2014 02:01
Using starToFoam clo OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 33 September 26, 2012 04:04
Using snGard (T) on coupled patch for conjugateHeatFoam solver!!! kamkari OpenFOAM 11 May 30, 2011 12:50
StarToFoam error Kart OpenFOAM Meshing & Mesh Conversion 1 February 4, 2010 05:38


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