Unseen 
August 24, 2010 08:50 
transsonic nozzle with rhoSimpleFoam
Hi, I am trying to simulate a transsonic nozzle (like a laval nozzle with a convergent and a divergent part) using the rhoSimpleFoam solver. The case is set up to use the SST turbulence modell.
Boundary conditions are as follows:
At the inlet I specify T_0 and p_0, and at the outlet I set a static pressure and temperature to zeroGradient. Now the pressure ratio p_static/p_0 determines how the flow through the nozzle will look like: completely subsonic, transsonic or completely supersonic in the divergent part.
This setup works fine for CFX and sonicFoam, but for comparitive reasons I want to simulate this with rhoSimpleFoam too. Actually I even think it would make more sense using rhoSimpleFoam instead of sonicFoam since I want to find a steady solution. But I can't get it to work.
Here is the output from rhoSimpleFoam:
Quote:
Starting time loop
Time = 1
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 7.50557e08, No Iterations 6
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 2.77255e07, No Iterations 5
DILUPBiCG: Solving for h, Initial residual = 0.482888, Final residual = 5.27538e08, No Iterations 3
DICPCG: Solving for p, Initial residual = 1, Final residual = 9.90481e07, No Iterations 412
DICPCG: Solving for p, Initial residual = 0.00200474, Final residual = 9.53918e07, No Iterations 301
DICPCG: Solving for p, Initial residual = 0.000147977, Final residual = 9.80301e07, No Iterations 335
DICPCG: Solving for p, Initial residual = 7.0753e05, Final residual = 9.78237e07, No Iterations 183
DICPCG: Solving for p, Initial residual = 1.43311e05, Final residual = 9.54748e07, No Iterations 300
DICPCG: Solving for p, Initial residual = 6.37506e06, Final residual = 9.87798e07, No Iterations 37
time step continuity errors : sum local = 0.378442, global = 0.00107449, cumulative = 0.00107449
rho max/min : 1.15862 0.616445
smoothSolver: Solving for omega, Initial residual = 0.466632, Final residual = 9.60914e05, No Iterations 10
bounding omega, min: 4.70953e+07 max: 5.36335e+08 average: 2.42753e+06
DILUPBiCG: Solving for k, Initial residual = 1, Final residual = 1.09971e07, No Iterations 4
bounding k, min: 0 max: 2045.21 average: 174.164
ExecutionTime = 3.98 s ClockTime = 4 s
Time = 2
DILUPBiCG: Solving for Ux, Initial residual = 0.19459, Final residual = 2.09254e07, No Iterations 4
DILUPBiCG: Solving for Uy, Initial residual = 0.0855989, Final residual = 1.10864e08, No Iterations 5
DILUPBiCG: Solving for h, Initial residual = 1, Final residual = 8.97303e07, No Iterations 3
DICPCG: Solving for p, Initial residual = 0.957095, Final residual = 9.74092e07, No Iterations 517
DICPCG: Solving for p, Initial residual = 0.0135551, Final residual = 9.30689e07, No Iterations 442
DICPCG: Solving for p, Initial residual = 0.00064559, Final residual = 9.22921e07, No Iterations 410
DICPCG: Solving for p, Initial residual = 0.000819135, Final residual = 9.92676e07, No Iterations 246
DICPCG: Solving for p, Initial residual = 0.00010276, Final residual = 9.41144e07, No Iterations 285
DICPCG: Solving for p, Initial residual = 0.000100948, Final residual = 9.60549e07, No Iterations 206
time step continuity errors : sum local = 0.396817, global = 0.0229595, cumulative = 0.024034
rho max/min : 1.15876 1e06
smoothSolver: Solving for omega, Initial residual = 0.00310563, Final residual = 2.19338e07, No Iterations 10
bounding omega, min: 6.69351e+11 max: 8.60937e+13 average: 8.01497e+11
DILUPBiCG: Solving for k, Initial residual = 0.179666, Final residual = 2.05165e08, No Iterations 5
bounding k, min: 0 max: 3073.3 average: 168.747
ExecutionTime = 8.13 s ClockTime = 8 s
Time = 3
DILUPBiCG: Solving for Ux, Initial residual = 0.152395, Final residual = 4.46597e07, No Iterations 4
DILUPBiCG: Solving for Uy, Initial residual = 0.0544148, Final residual = 1.16204e07, No Iterations 4
DILUPBiCG: Solving for h, Initial residual = 0.56658, Final residual = 2.33144e07, No Iterations 3
DICPCG: Solving for p, Initial residual = 0.251858, Final residual = 7.38651e07, No Iterations 384
DICPCG: Solving for p, Initial residual = 4.20666e05, Final residual = 9.08749e07, No Iterations 28
DICPCG: Solving for p, Initial residual = 7.88155e06, Final residual = 6.59651e07, No Iterations 21
DICPCG: Solving for p, Initial residual = 2.55826e06, Final residual = 9.73543e07, No Iterations 3
DICPCG: Solving for p, Initial residual = 1.23148e06, Final residual = 7.47417e07, No Iterations 1
DICPCG: Solving for p, Initial residual = 7.42068e07, Final residual = 7.42068e07, No Iterations 0
time step continuity errors : sum local = 1.55563, global = 0.0208779, cumulative = 0.00315611
rho max/min : 2 1e06
smoothSolver: Solving for omega, Initial residual = 0.585117, Final residual = 3.521e09, No Iterations 5
DILUPBiCG: Solving for k, Initial residual = 0.25674, Final residual = 9.63173e07, No Iterations 1
bounding k, min: 0.0701715 max: 4987.9 average: 162.727
ExecutionTime = 9.32 s ClockTime = 10 s
Time = 4
DILUPBiCG: Solving for Ux, Initial residual = 0.997795, Final residual = 1.64032e07, No Iterations 6
DILUPBiCG: Solving for Uy, Initial residual = 0.998882, Final residual = 7.32716e07, No Iterations 5
DILUPBiCG: Solving for h, Initial residual = 0.0744124, Final residual = 4.70478e07, No Iterations 3
DICPCG: Solving for p, Initial residual = 0.759872, Final residual = 9.57541e07, No Iterations 284
DICPCG: Solving for p, Initial residual = 0.000123465, Final residual = 9.82243e07, No Iterations 57
DICPCG: Solving for p, Initial residual = 8.70489e06, Final residual = 9.71241e07, No Iterations 4
DICPCG: Solving for p, Initial residual = 1.76624e06, Final residual = 5.50452e07, No Iterations 1
DICPCG: Solving for p, Initial residual = 7.16095e07, Final residual = 7.16095e07, No Iterations 0
DICPCG: Solving for p, Initial residual = 7.16095e07, Final residual = 7.16095e07, No Iterations 0
time step continuity errors : sum local = 404.096, global = 19.2919, cumulative = 19.2951
rho max/min : 2 1e06
smoothSolver: Solving for omega, Initial residual = 0.788337, Final residual = 1.3774e06, No Iterations 10
bounding omega, min: 2.96432e+14 max: 3.00319e+16 average: 3.21144e+12
DILUPBiCG: Solving for k, Initial residual = 0.968773, Final residual = 2.01015e09, No Iterations 1
bounding k, min: 756.427 max: 35883.4 average: 195.582
ExecutionTime = 10.39 s ClockTime = 11 s
Time = 5
DILUPBiCG: Solving for Ux, Initial residual = 0.310195, Final residual = 1.73164e07, No Iterations 4
DILUPBiCG: Solving for Uy, Initial residual = 0.126598, Final residual = 5.89545e07, No Iterations 2
DILUPBiCG: Solving for h, Initial residual = 0.680939, Final residual = 3.04399e07, No Iterations 2
DICPCG: Solving for p, Initial residual = 0.998137, Final residual = 9.43214e07, No Iterations 487
DICPCG: Solving for p, Initial residual = 4.64363e05, Final residual = 9.30679e07, No Iterations 4
DICPCG: Solving for p, Initial residual = 6.05651e06, Final residual = 9.73192e07, No Iterations 1
DICPCG: Solving for p, Initial residual = 2.56727e06, Final residual = 6.63206e07, No Iterations 1
DICPCG: Solving for p, Initial residual = 1.3765e06, Final residual = 4.99567e07, No Iterations 1
DICPCG: Solving for p, Initial residual = 7.74991e07, Final residual = 7.74991e07, No Iterations 0
time step continuity errors : sum local = 897588, global = 74572.2, cumulative = 74591.5
rho max/min : 2 1e06
smoothSolver: Solving for omega, Initial residual = 0.533712, Final residual = 0.000103851, No Iterations 5
bounding omega, min: 1.622e+16 max: 1.41955e+17 average: 3.58821e+13
DILUPBiCG: Solving for k, Initial residual = 0.661468, Final residual = 2.9169e07, No Iterations 1
bounding k, min: 153.288 max: 42609.5 average: 318.405
ExecutionTime = 11.58 s ClockTime = 12 s
Time = 6
DILUPBiCG: Solving for Ux, Initial residual = 0.213536, Final residual = 9.55407e07, No Iterations 3
DILUPBiCG: Solving for Uy, Initial residual = 0.126084, Final residual = 4.68714e07, No Iterations 3
DILUPBiCG: Solving for h, Initial residual = 0.221702, Final residual = 4.57775e08, No Iterations 3
DICPCG: Solving for p, Initial residual = 0.962782, Final residual = 8.92019e07, No Iterations 530
DICPCG: Solving for p, Initial residual = 0.00113766, Final residual = 9.72405e07, No Iterations 21
DICPCG: Solving for p, Initial residual = 0.000189473, Final residual = 8.29085e07, No Iterations 8
DICPCG: Solving for p, Initial residual = 6.06308e05, Final residual = 9.18088e07, No Iterations 7
DICPCG: Solving for p, Initial residual = 1.00251e05, Final residual = 9.88796e07, No Iterations 2
DICPCG: Solving for p, Initial residual = 3.73146e06, Final residual = 9.7275e07, No Iterations 2
time step continuity errors : sum local = 2.79573e+07, global = 10554.4, cumulative = 64037
rho max/min : 2 1e06
smoothSolver: Solving for omega, Initial residual = 0.999496, Final residual = 1.11391e10, No Iterations 5
bounding omega, min: 4.95025e+17 max: 1.19663e+24 average: 4.05024e+19
DILUPBiCG: Solving for k, Initial residual = 0.604858, Final residual = 7.6708e12, No Iterations 1
bounding k, min: 1213.68 max: 52183.5 average: 196.438
ExecutionTime = 12.96 s ClockTime = 13 s
Time = 7
DILUPBiCG: Solving for Ux, Initial residual = 0.143333, Final residual = 1.78302e08, No Iterations 5
DILUPBiCG: Solving for Uy, Initial residual = 0.367181, Final residual = 8.26728e08, No Iterations 5
DILUPBiCG: Solving for h, Initial residual = 0.345348, Final residual = 3.69898e08, No Iterations 3
DICPCG: Solving for p, Initial residual = 0.7791, Final residual = 9.83852e07, No Iterations 585
DICPCG: Solving for p, Initial residual = 0.00667543, Final residual = 9.142e07, No Iterations 550
DICPCG: Solving for p, Initial residual = 0.00206138, Final residual = 8.97629e07, No Iterations 531
DICPCG: Solving for p, Initial residual = 0.000466277, Final residual = 9.62494e07, No Iterations 283
DICPCG: Solving for p, Initial residual = 0.000308349, Final residual = 9.64406e07, No Iterations 197
DICPCG: Solving for p, Initial residual = 0.000185042, Final residual = 9.61781e07, No Iterations 195
time step continuity errors : sum local = 9.87003e+07, global = 4.30657e+06, cumulative = 4.37061e+06
rho max/min : 2 1e06
smoothSolver: Solving for omega, Initial residual = 0.538495, Final residual = 9.77628e11, No Iterations 5
bounding omega, min: 2.19937e+22 max: 3.5899e+23 average: 1.57063e+19
DILUPBiCG: Solving for k, Initial residual = 0.229398, Final residual = 1.61737e07, No Iterations 2
bounding k, min: 191.332 max: 48987.5 average: 164.447
ExecutionTime = 17.4 s ClockTime = 18 s
Time = 8
DILUPBiCG: Solving for Ux, Initial residual = 0.182003, Final residual = 3.63321e07, No Iterations 4
DILUPBiCG: Solving for Uy, Initial residual = 0.259147, Final residual = 3.8712e08, No Iterations 5
DILUPBiCG: Solving for h, Initial residual = 0.98536, Final residual = 3.79371e07, No Iterations 3
> FOAM FATAL ERROR:
Maximum number of iterations exceeded
From function specieThermo<thermo>::T(scalar f, scalar T0, scalar (specieThermo<thermo>::*F)(const scalar) const, scalar (specieThermo<thermo>::*dFdT)(const scalar) const) const
in file /home/unseen/OpenFOAM/OpenFOAM1.7.x/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 61.
FOAM aborting
#0 Foam::error::printStack(Foam::Ostream&) in "/home/unseen/OpenFOAM/OpenFOAM1.7.x/lib/linux64IccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/unseen/OpenFOAM/OpenFOAM1.7.x/lib/linux64IccDPOpt/libOpenFOAM.so"
#2 Foam::hPsiThermo<Foam::pureMixture<Foam::constTran sport<Foam::specieThermo<Foam::hConstThermo<Foam:: perfectGas> > > > >::calculate() in "/home/unseen/OpenFOAM/OpenFOAM1.7.x/lib/linux64IccDPOpt/libbasicThermophysicalModels.so"
#3 Foam::hPsiThermo<Foam::pureMixture<Foam::constTran sport<Foam::specieThermo<Foam::hConstThermo<Foam:: perfectGas> > > > >::correct() in "/home/unseen/OpenFOAM/OpenFOAM1.7.x/lib/linux64IccDPOpt/libbasicThermophysicalModels.so"
#4
in "/home/unseen/OpenFOAM/OpenFOAM1.7.x/applications/bin/linux64IccDPOpt/rhoSimpleFoam"
#5 __libc_start_main in "/lib/libc.so.6"
#6
in "/home/unseen/OpenFOAM/OpenFOAM1.7.x/applications/bin/linux64IccDPOpt/rhoSimpleFoam"
Aborted

There are several things which are going wrong here:
1.) bounding omega, min: 4.70953e+07 max: 5.36335e+08 average: 2.42753e+06
omega is not supposed to become negative at any time!
2.) bounding k, min: 0.0701715 max: 4987.9 average: 162.727
same for k, it is not allowed to become negative!
3.) huge continuity errors
4.) when I look at the produced results during these few timesteps the pressure gets massive negative values (1e1 0Pa region).
So obviuosly I am doing something wrong. I just can't figure out what it is ...
I haven't changed anything from the setup except adding the SIMPLE dictionary to the fvSolution and changing e to h when going from sonicFoam to rhoSimpleFoam.
Any help would be greatly appreciated, thank you :)
