|
[Sponsors] |
negative inlet temperature for axisymmetric nozzle flow using rhoCentralFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 3, 2023, 09:59 |
negative inlet temperature for axisymmetric nozzle flow using rhoCentralFoam
|
#1 |
New Member
Baptiste
Join Date: Mar 2023
Posts: 25
Rep Power: 3 |
Hi,
I have been trying to simulate a very simple nozzle flow with OpenFOAM flow in the past weeks. I have tried many different parameters and hypotheses, changing them only one at a time, but everyone one them has led to the same result: the simulation crashes with the error message "negative temperature inlet T0=-XXXK". The domain I am considering is a short straight section followed by a simple convergent-divergent with straight walls sections. To take advantage of the geometry, I am solving the flow with axisymmetric BC. My domain is then a simple wedge - of less than 5°. The domain is meshed with gmsh, creating a structured hexahedral mesh with grading from the center to the walls (growth ratio < 0.95). A grading is also applied from the inlet to the throat; after the throat, the mesh size is constant. rhoCentralFoam is used as a density-based solver and different turbulent models have been tried - k-eps, RNG k-eps, k-omega-SST. The courant number is set to Co<0.2. Boundary conditions are set as follow:
I am using CO2 in supercritical conditions as a fluid. I want to use a perfect gas model in the first place. Thus, my thermophysical properties as are follow: Code:
thermoType { type hePsiThermo; mixture pureMixture; transport const; thermo hConst; equationOfState perfectGas; specie specie; energy sensibleEnthalpy; } mixture { // normalised gas specie { nMoles 1; molWeight 44.01; } thermodynamics { Cp 2327; Hf 0; } transport { mu 1.444e-5; Pr 1.5; } } My fvSchemes is set as follow: Code:
fluxScheme Kurganov; ddtSchemes { default Euler; } gradSchemes { default Gauss linear; limited cellLimited Gauss linear 1; } divSchemes { default none; div(phi,U) Gauss linearUpwind limited; div(phi,e) Gauss linearUpwind limited; div(phi,K) Gauss linearUpwind limited; turbulence Gauss linearUpwind limited; div(phi,epsilon) $turbulence; div(phi,k) $turbulence; div(phi,omega) $turbulence; div(phiv,p) Gauss linearUpwind limited; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(tauMC) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; reconstruct(rho) vanLeer; reconstruct(U) vanLeerV; reconstruct(T) vanLeer; } snGradSchemes { default corrected; } wallDist { method meshWave; } Code:
solvers { p { solver PCG; preconditioner DIC; tolerance 1e-08; relTol 0.01; } pFinal { $p; relTol 0; } "rho.*" { $p; tolerance 1e-05; relTol 0; } "(omega|U|e|h|k|epsilon).*" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-08; relTol 0.01; } } Parameters that I tried to modify:
note: When solving in 2D - 3D mesh, 1 cell wide with empty BC - the simulation converges with k-omegaSST turbulence model. All the other models make the simulation diverge (same error). I am open to any discussion about my simulation. Please don't hesitate to ask for more information. Best. |
|
May 3, 2023, 10:37 |
|
#2 |
New Member
Baptiste
Join Date: Mar 2023
Posts: 25
Rep Power: 3 |
In addition, please find attached pictures of the mesh I am using.
I also want to mention that I tried tu implement limitTemperature with fvOptions. However, it led me to the same "negative inlet temperature" error. |
|
May 9, 2023, 05:08 |
rhoCentralFoam negative inlet temperature
|
#3 |
New Member
Baptiste
Join Date: Mar 2023
Posts: 25
Rep Power: 3 |
By any chance, does anyone have any idea or insight ?
Best |
|
May 16, 2023, 12:14 |
Can someone answer to this post ?
|
#4 |
New Member
Baptiste
Join Date: Mar 2023
Posts: 25
Rep Power: 3 |
Is there a way to get people to see this post ? I know that multiple post for the same probleme is not allowed.
Best. |
|
May 16, 2023, 12:18 |
|
#5 |
New Member
K
Join Date: Oct 2022
Location: Madison, WI
Posts: 19
Rep Power: 4 |
OpenFOAM is not so good at importing meshes from other softwares. The negative temp at the inlet could be caused by misaligned normals. Check in gmsh that your normals are all pointing the correct direction.
|
|
May 16, 2023, 12:38 |
|
#6 |
New Member
Baptiste
Join Date: Mar 2023
Posts: 25
Rep Power: 3 |
You think this issue could come from bad normals ? The fact that the simulation runs for a long time before it crashes doesn't exclude this hypothesis ?
|
|
May 16, 2023, 13:55 |
|
#7 |
Senior Member
Joern Beilke
Join Date: Mar 2009
Location: Dresden
Posts: 539
Rep Power: 20 |
Just have a look at this tutorial:
https://github.com/unicfdlab/hybridC...ivergingNozzle It uses pimpleCentralFoam but might help. |
|
June 8, 2023, 04:05 |
Solution
|
#8 |
New Member
Baptiste
Join Date: Mar 2023
Posts: 25
Rep Power: 3 |
If anyone encounter a similar solution: I solved it by using setFields to initialize de fields in the domain.
The issue was that with the domain being initialized at 1bar and the inlet being at 91bar, it creates a shock in the convergent right at the beginning of the simulation. This shock propagates but unfortunately cannot be damped and creates a divergence when reaching the throat. By simply initializing the domain to highest pressures, and with a jump of pressure AFTER the throat, the simulation converged. |
|
June 8, 2023, 11:35 |
|
#9 | |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66 |
I want to go back to something
Quote:
However, I do applaud you for updating your own post and confirming that initialization errors are still a common occurrence in 2023 and will likely continue to be a pain point for CFDers for the foreseeable future. |
||
June 13, 2023, 11:22 |
|
#10 | |
New Member
Baptiste
Join Date: Mar 2023
Posts: 25
Rep Power: 3 |
Quote:
|
||
Tags |
convergence, openfoam2212, rhocentralfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SU2 incompressible laminar flow | mkulcsar | SU2 | 3 | April 30, 2023 23:59 |
Total pressure and mass flow boundary condition at inlet | bscphil | OpenFOAM Pre-Processing | 3 | July 9, 2017 15:39 |
Mass flow inlet with given temperature | taalf | SU2 | 3 | October 15, 2015 15:25 |
Turbulent Intesity Inlet and outlet cavitating flow in Nozzle | SPH_CFD | FLUENT | 2 | April 29, 2015 09:51 |
ATTENTION! Reliability problems in CFX 5.7 | Joseph | CFX | 14 | April 20, 2010 16:45 |