CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Reflecting bc

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 4, 2005, 06:59
Default Is there a reflecting boundary
  #1
Member
 
Marco Kupiainen
Join Date: Mar 2009
Posts: 31
Rep Power: 7
kupiainen is on a distinguished road
Is there a reflecting boundary condition in OpenFoam?
kupiainen is offline   Reply With Quote

Old   July 4, 2005, 07:08
Default fixedValue, zeroGradient, symm
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 12
henry is on a distinguished road
fixedValue, zeroGradient, symmetryPlane and slip boundary conditions are all reflecting.
henry is offline   Reply With Quote

Old   July 4, 2005, 07:12
Default I do not mean reflecting as in
  #3
Member
 
Marco Kupiainen
Join Date: Mar 2009
Posts: 31
Rep Power: 7
kupiainen is on a distinguished road
I do not mean reflecting as in not non-reflecting, but as in reflecting everything i.e. (F,n) = 0,
where F is the flux and n is the normal.
kupiainen is offline   Reply With Quote

Old   July 4, 2005, 07:18
Default Isn't that a symmetryPlane?
  #4
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 12
henry is on a distinguished road
Isn't that a symmetryPlane?
henry is offline   Reply With Quote

Old   July 4, 2005, 07:32
Default Well I don't know what a symme
  #5
Member
 
Marco Kupiainen
Join Date: Mar 2009
Posts: 31
Rep Power: 7
kupiainen is on a distinguished road
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.
kupiainen is offline   Reply With Quote

Old   July 4, 2005, 08:24
Default I run with symmetryPlanes and
  #6
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 12
henry is on a distinguished road
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.
henry is offline   Reply With Quote

Old   July 4, 2005, 09:52
Default Do you resolve the contact dis
  #7
Member
 
Marco Kupiainen
Join Date: Mar 2009
Posts: 31
Rep Power: 7
kupiainen is on a distinguished road
Do you resolve the contact discontinuity near the top boundary to the left of the bowshock?
kupiainen is offline   Reply With Quote

Old   July 4, 2005, 09:58
Default I haven't studied the results
  #8
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 12
henry is on a distinguished road
I haven't studied the results in detail for the old sonic-solver. 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.
henry is offline   Reply With Quote

Old   July 4, 2005, 10:08
Default I am looking forward to the 1.
  #9
Member
 
Marco Kupiainen
Join Date: Mar 2009
Posts: 31
Rep Power: 7
kupiainen is on a distinguished road
I am looking forward to the 1.2 release.
kupiainen is offline   Reply With Quote

Old   July 4, 2005, 11:09
Default Another thing with this testpr
  #10
Member
 
Marco Kupiainen
Join Date: Mar 2009
Posts: 31
Rep Power: 7
kupiainen is on a distinguished road
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?
kupiainen is offline   Reply With Quote

Old   July 4, 2005, 11:17
Default Which code are you running?
  #11
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 12
henry is on a distinguished road
Which code are you running?
henry is offline   Reply With Quote

Old   July 4, 2005, 11:29
Default I do an Euler step in time (ca
  #12
Member
 
Marco Kupiainen
Join Date: Mar 2009
Posts: 31
Rep Power: 7
kupiainen is on a distinguished road
I do an Euler step in time (can be extended to a TVD Runge-Kutta 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..
kupiainen is offline   Reply With Quote

Old   July 4, 2005, 11:36
Default I was assuming you were runnin
  #13
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 12
henry is on a distinguished road
I was assuming you were running one of the standard OpenFOAM sonic-solvers; I have no idea why your code produces the incorrect shock-speed.
henry is offline   Reply With Quote

Old   July 4, 2005, 12:30
Default The reason can be twofold, eit
  #14
Member
 
Marco Kupiainen
Join Date: Mar 2009
Posts: 31
Rep Power: 7
kupiainen is on a distinguished road
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.
kupiainen is offline   Reply With Quote

Old   July 5, 2005, 10:58
Default I have run the rhoSonicFoam co
  #15
Member
 
Marco Kupiainen
Join Date: Mar 2009
Posts: 31
Rep Power: 7
kupiainen is on a distinguished road
I have run the rhoSonicFoam code now. In order to run this problem, I had to modify the pressure, since the gas is a gamma-law gas. So
p = (gamma-1)*(rhoE-0.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 CFL-number 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 well-known 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.
kupiainen is offline   Reply With Quote

Old   July 13, 2005, 09:00
Default Problem solved: The artificia
  #16
Member
 
Marco Kupiainen
Join Date: Mar 2009
Posts: 31
Rep Power: 7
kupiainen is on a distinguished road
Problem solved:
The artificial viscosity was not implemented in conservation form.
Marco
kupiainen 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
TVD non-reflecting boundary shuo Main CFD Forum 1 October 29, 2008 11:06
Non Reflecting B.C. Alshroof CFX 2 July 31, 2007 21:34
Non-Reflecting BC Bounecer Main CFD Forum 1 December 26, 2006 17:52
reflecting the geometry isidro CD-adapco 1 July 5, 2004 15:01
Non-Reflecting B.C. in NSC2KE Zou Chu Main CFD Forum 2 May 27, 1999 22:26


All times are GMT -4. The time now is 02:44.