|
[Sponsors] |
January 28, 2013, 17:04 |
Validation case for rhoSimplecFoam
|
#1 |
Senior Member
Hannes Kröger
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 124
Rep Power: 18 |
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 |
|
February 25, 2013, 18:34 |
|
#2 |
Senior Member
Hannes Kröger
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 124
Rep Power: 18 |
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 |
|
March 11, 2013, 17:39 |
|
#3 |
Senior Member
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 184
Rep Power: 17 |
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. |
|
April 1, 2013, 08:47 |
|
#4 |
Senior Member
Hannes Kröger
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 124
Rep Power: 18 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFX problem in ubuntu (linux) | Vigneshramaero | CFX | 0 | July 13, 2012 11: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 04:03 |
Validation case for turbulent flow | Ratan | Main CFD Forum | 0 | October 4, 2005 04:02 |