
[Sponsors] 
July 4, 2005, 05:59 
Is there a reflecting boundary

#1 
Member
Marco Kupiainen
Join Date: Mar 2009
Posts: 31
Rep Power: 10 
Is there a reflecting boundary condition in OpenFoam?


July 4, 2005, 06:08 
fixedValue, zeroGradient, symm

#2 
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 15 
fixedValue, zeroGradient, symmetryPlane and slip boundary conditions are all reflecting.


July 4, 2005, 06:12 
I do not mean reflecting as in

#3 
Member
Marco Kupiainen
Join Date: Mar 2009
Posts: 31
Rep Power: 10 
I do not mean reflecting as in not nonreflecting, but as in reflecting everything i.e. (F,n) = 0,
where F is the flux and n is the normal. 

July 4, 2005, 06:18 
Isn't that a symmetryPlane?

#4 
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 15 
Isn't that a symmetryPlane?


July 4, 2005, 06:32 
Well I don't know what a symme

#5 
Member
Marco Kupiainen
Join Date: Mar 2009
Posts: 31
Rep Power: 10 
Well I don't know what a symmetryPlane is mathematically, but it seems that it doesn't reflect everything. I run the Woodward, Colella (JCP 54, 1984) forwardfacing step testcase, and the top and bottom boundaries should be set to reflecting. I run on a very fine mesh O(1e5 cells) and I expect to see a contact discontinuity near the top boundary, but it is not there. I believe that the contact discontinuity is due to the reflecting b.c. Right now I am using symmetryPlanes as boundary conditions.
BTW the OpenFoam manual could be little more specific about what the b.c. really mean. 

July 4, 2005, 07:24 
I run with symmetryPlanes and

#6 
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 15 
I run with symmetryPlanes and the shocks reflect perfectly well.
The OpenFOAM manual will be more specific about lots of things as soon as we obtain funding in the form of donations/sponsorship to cover the cost of writing it. So far we have received ~$300 in donations and none in sponsorship so we are not in a position to continue writing documentation. 

July 4, 2005, 08:52 
Do you resolve the contact dis

#7 
Member
Marco Kupiainen
Join Date: Mar 2009
Posts: 31
Rep Power: 10 
Do you resolve the contact discontinuity near the top boundary to the left of the bowshock?


July 4, 2005, 08:58 
I haven't studied the results

#8 
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 15 
I haven't studied the results in detail for the old sonicsolver. I have developed a new version of rhopSonicFoam for the 1.2 release which is undergoing extensive testing at the moment as part of a research project, it might be interesting for you to test it on your case.


July 4, 2005, 09:08 
I am looking forward to the 1.

#9 
Member
Marco Kupiainen
Join Date: Mar 2009
Posts: 31
Rep Power: 10 
I am looking forward to the 1.2 release.


July 4, 2005, 10:09 
Another thing with this testpr

#10 
Member
Marco Kupiainen
Join Date: Mar 2009
Posts: 31
Rep Power: 10 
Another thing with this testproblem is that the shock is moving with the wrong speed compared to the results of Colella and Woodward. The shock eventually propagates out of the domain to the left.
I now seem to resolve the contact discontinuity, although it requires a lot of cells. Any ideas with the incorrect shock speeds? 

July 4, 2005, 10:17 
Which code are you running?

#11 
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 15 
Which code are you running?


July 4, 2005, 10:29 
I do an Euler step in time (ca

#12 
Member
Marco Kupiainen
Join Date: Mar 2009
Posts: 31
Rep Power: 10 
I do an Euler step in time (can be extended to a TVD RungeKutta 2:nd order) and use central differences in space with Jameson artificial dissipation.
The laplacian is discretized using Gauss linear correction and divergence terms using Gauss linear This is the problably the most classical way of solving this problem, however I am not sure about the reflecting b.c.. 

July 4, 2005, 10:36 
I was assuming you were runnin

#13 
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 15 
I was assuming you were running one of the standard OpenFOAM sonicsolvers; I have no idea why your code produces the incorrect shockspeed.


July 4, 2005, 11:30 
The reason can be twofold, eit

#14 
Member
Marco Kupiainen
Join Date: Mar 2009
Posts: 31
Rep Power: 10 
The reason can be twofold, either the symmetryPlane is not equivalent to a reflecting b.c. or there is some bug in the div, laplacian etc. operators in forms of conservation. If the operators are not discretized in the correct way, errors of this type might show. For solutions not involving discontinuities these errors will not show. It is my belief that the errors are not due to the operators though, but I will continue searching for answers. So if anybody has some good and constructive ideas I am more than welcome to try them.


July 5, 2005, 09:58 
I have run the rhoSonicFoam co

#15 
Member
Marco Kupiainen
Join Date: Mar 2009
Posts: 31
Rep Power: 10 
I have run the rhoSonicFoam code now. In order to run this problem, I had to modify the pressure, since the gas is a gammalaw gas. So
p = (gamma1)*(rhoE0.5*rho*magSqr(rhoU/rho)); and the temperature is not needed (and not defined in this setting). The pressure is set to 0 everywhere and velocity is = (3 0 0) everywhere and the density is set to 1.4 everywhere. These are also the inlet b.c. for this problem. At the outflow zeroGradient is used for all components, since it is a supersonic outlet. On all other physical boundaries I use symmetryPlanes, since these are the reflecting b.c. as described in the article by Colella and Woodward. The code is stable for CFLnumber 0.6 at least, but the resuls are puzzeling. At the dimensionless time 4 the results from output from rhoSonicfoam and Colella et. al. are compared. I have refined the grid ad absurdum (up to 500 000 cells) and made grid convergence studies and found that rhoSonicfoam produces extra and new shockwaves, which are not present in the Colella et. al. paper. The main shock seems to move with the right speed, but the smooth part of the solution is very wiggly. The new structures seen in the solution are due to numerical errors and should not be there. As I understand OpenFoam the variable phi = linearInterpolate(rho*U & mesh.Sf()); is used to find the upwind direction. When the flow is supersonic the information does not however move only with the flow speed. This is wellknown from hyperbolic conservation laws. One would rather need to use a tensorvalued variable for the upwind direction, since it is different for the different components of the e.g. div operator. The basic fact is that one misses the characteristics related to mag(U)SoundSpeed. One possible way to circumvent this problem, which is not so elegant in my view, is to use the PISO coupling. Here the pressure iterations make the problem globally coupled. This procedure is natively developed for incompressible flows, where this is natural, since the soundspeed is infinity and no numerical method used for hyperbolic problems works well (characteristics are finite in hyperbolic problems). Does anybody have another explanation for this? Comments? I am happy to discuss these issues, since I want to solve this problem. 

July 13, 2005, 08:00 
Problem solved:
The artificia

#16 
Member
Marco Kupiainen
Join Date: Mar 2009
Posts: 31
Rep Power: 10 
Problem solved:
The artificial viscosity was not implemented in conservation form. Marco 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
TVD nonreflecting boundary  shuo  Main CFD Forum  1  October 29, 2008 10:06 
Non Reflecting B.C.  Alshroof  CFX  2  July 31, 2007 20:34 
NonReflecting BC  Bounecer  Main CFD Forum  1  December 26, 2006 17:52 
reflecting the geometry  isidro  CDadapco  1  July 5, 2004 14:01 
NonReflecting B.C. in NSC2KE  Zou Chu  Main CFD Forum  2  May 27, 1999 21:26 