CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Validation case for rhoSimplecFoam

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

Like Tree6Likes
  • 2 Post By hannes
  • 4 Post By hannes

Reply
 
LinkBack Thread Tools Display Modes
Old   January 28, 2013, 17:04
Default Validation case for rhoSimplecFoam
  #1
Member
 
Hannes Kröger
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 96
Rep Power: 10
hannes is on a distinguished road
Hello all,

I've tried for some time now to set up a steady compressible flow simulation with rhoSimplecFoam (tried rhoSimpleFoam at first, but the SIMPLEC variant seems to be more stable).

I have chosen the converging channel validation case for the compressible SIMPLE algorithm from the Ferziger&Peric Book pp. 323 (You can find the case attached to this message).
Prescribing the flowrate seemed to be quite shaky, so I prescribed the pressure ratio, which resulted in a better convergence. The inlet mach number is then a bit higher than in the case presented in the book.

According to the literature, there should be some shocks originating at the throat, but they do not appear although the case converges (see attached picture).
The picture does not change qualitatively if I use higher order schemes instead of upwind for convection-like terms.

Since there are pretty nice looking results presented in the Ferziger&Peric Book for a compressible SIMPLE solver, I expected to see something similar with the OpenFOAM solver. Do I expect too much?
Are there any suggestions on the scheme selection for this type of flows?
Any hints are welcome.

Thanks in advance, Hannes
Attached Images
File Type: png mason.png (82.8 KB, 79 views)
Attached Files
File Type: gz masonChannel.tar.gz (6.1 KB, 19 views)
hannes is offline   Reply With Quote

Old   February 25, 2013, 18:34
Default
  #2
Member
 
Hannes Kröger
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 96
Rep Power: 10
hannes is on a distinguished road
Dear all,

in case someone is interested: I finally managed to get some improvement in this case after some trying, have a look at the figure below.
The shocks only appear, if "vanLeer" is used for "div(phid,p)" and "vanLeerV" (*not* "vanLeer" without "V"!) for "div(phi,U)". For example, "limitedLinear" or "Gamma" are unstable.
It seems to be better, if the domain is not elongated towards the outlet.

Unfortunately, there still appear some kind of reflection of the shocks. I'm not sure yet, how to avoid that.

The mismatch in the angle of the shock might be because the pressure ratio is prescribed and the mass flow rate is not exactly met...

Regards, Hannes
Attached Images
File Type: jpg comparison.jpg (49.8 KB, 60 views)
markusrehm and immortality like this.
hannes is offline   Reply With Quote

Old   March 11, 2013, 17:39
Default
  #3
Senior Member
 
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 182
Rep Power: 9
markusrehm is on a distinguished road
Hi Hannes,

thanks for the information and for sharing your case!

What is your strategy to get a stable solution?
I am facing problems during the start up and am still struggling with a similar case.

Can you send your final case again?

Regards, Markus.
markusrehm is offline   Reply With Quote

Old   April 1, 2013, 07:47
Default
  #4
Member
 
Hannes Kröger
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 96
Rep Power: 10
hannes is on a distinguished road
Hello again,

sorry for the late reply, but work on this case is more a hobby so I am not progressing very fast...
When OF2.2.x came out, I took up the activity again.

Some experiences so far:
* I could not get the case to run with a prescribed mass flow rate, a prescribed pressure ratio worked better
* Setting the full pressure from the start was not stable as well, instead I ramped it up over 100 iterations or so (uniformTotalPressure-BC with "tableFile" option for the pressure value)
* Even that was not enough: I did a (yet very) dirty hack to the "uniformTotalPressure"-BC:

diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField
index c3b3538..db11268 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C
@@ -173,7 +173,12 @@ void Foam::uniformTotalPressureFvPatchScalarField::upda teCoeffs
}
else
{
- operator==(p0/(1.0 + 0.5*psip*(1.0 - pos(phip))*magSqr(Up)));
+Info<<"patched"<<endl;
+scalar alpha=0.7;
+scalarField oldv=*this;
+scalarField newv=(p0/(1.0 + 0.5*psip*(1.0 - pos(phip))*magSqr(Up)));
+operator==(oldv*(1.-alpha)+newv*alpha);
+// operator==(p0/(1.0 + 0.5*psip*(1.0 - pos(phip))*magSqr(Up)));
}
}
else if (psiName_ == "none")

This introduced some underrelaxation to the pressure-velocity dependency on the boundary and helped a lot in my case. Not sure, if this is advisable in general.

* I started with the tutorial setup of rhoSimplecFoam (all upwind schemes), the result is as shown above in the first post. Everything smoothed out, no shocks.
* Better: TVD schemes. As I reported earlier, vanLeer worked and others not. For the current case, Gamma worked and not vanLeer (I'm confused).

The current setup is attached to this post (OF2.2.x). Just unpack, run "blockMesh" and then "rhoSimplecFoam". The grid resolution is comparable to the finest grid presented in Ferziger&Peric textbook.

Below, there are also some figures with results. They look ok.
Although I have to admit that the convergence is not very good. The residual continuity error is way to big for my taste, e.g.:
time step continuity errors : sum local = 10.956, global = 1.51792, cumulative = 10260.7
after 4700 iterations

So far from me. Any feedback is welcome.

Regards, Hannes
Attached Images
File Type: jpg comparison_2.jpg (55.0 KB, 50 views)
File Type: png pressure_along_wall.png (6.5 KB, 33 views)
Attached Files
File Type: gz masonChannel.tar.gz (8.1 KB, 33 views)
hannes 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
CFX problem in ubuntu (linux) Vigneshramaero CFX 0 July 13, 2012 10:22
CFX-Pre problem, pls help!!! cth_yao CFX 0 February 17, 2012 01:52
Validation Case Ruben Main CFD Forum 0 November 1, 2005 11:50
Validation case for turbulent flow Ratan Main CFD Forum 0 October 4, 2005 03:03
Validation case for turbulent flow Ratan Main CFD Forum 0 October 4, 2005 03:02


All times are GMT -4. The time now is 03:41.