View Issue Details
ID  Project  Category  View Status  Date Submitted  Last Update 

0003132  OpenFOAM  Bug  public  20181212 18:29  20181213 16:27 
Reporter  projectionist  Assigned To  will  
Priority  normal  Severity  minor  Reproducibility  always 
Status  resolved  Resolution  fixed  
Platform  Linux  OS  Ubuntu  OS Version  16.04 
Product Version  6  
Fixed in Version  6  
Summary  0003132: Computing heat transfer with StationaryPhaseModel in reactingMultiphaseEulerFoam fails  
Description  When I try to add some heat transfer to the bed tutorial case of reactingMultiphaseEulerFoam, the solver fails to run the simulation. It seems the solver is unable to create or solve the energy equation of the StationaryPhase. The solver crashes, when I try to use the pureStationaryIsothermalPhaseModel phase model, with or without heat transfer models. Interestingly, the solver does not always crash, when I run it with valgrind. Has heat transfer in conjunction with the stationary phase model been tested so far?  
Steps To Reproduce  Go to the "bed" tutorial of reactingMultiphaseEulerFoam change in phaseProperties the type of the "solid" phase from "pureStationaryIsothermalPhaseModel" to "pureStationaryPhaseModel" to enable heat transfer modelling change in fvSolution the value of nOuterCorrectors to 1; if we leave the setting at the value 3, then the solver will fail during the first time step; if we use 1, then the solver will not crash immediately. run reactingMultiphaseEulerFoam The solver will fail with a segmentationFault So far, we tried to run the case without any heattransfer models enabled. Add heat transfer models in the file phaseProperties heatTransfer ( (solid in air) { type RanzMarshall; residualAlpha 1e3; } (solid in water) { type RanzMarshall; residualAlpha 1e3; } );  
Additional Information  Interestingly, when I run valgrind reactingMultiphaseEulerFoam then, after some lengthy valgrindoutput, the solver will run, yet compute rubbish Here is a bit of the solvers output Courant Number mean: 0.00562167 max: 0.050868 Time = 0.006 MULES: Solving for alpha.air MULES: Solving for alpha.water air fraction, min, max = 0.807894 0.3999 1 water fraction, min, max = 0.000106438 0 0.132897 solid fraction, min, max = 0.192 0 0.6 Phasesum volume fraction, min, max = 1 1 1 MULES: Solving for alpha.air MULES: Solving for alpha.water air fraction, min, max = 0.807869 0.3999 1 water fraction, min, max = 0.000131355 0 0.173147 solid fraction, min, max = 0.192 0 0.6 Phasesum volume fraction, min, max = 1 1 1 Constructing momentum equations smoothSolver: Solving for e.solid, Initial residual = nan, Final residual = nan, No Iterations 1000 air min/max T 300  300 water min/max T 300  300 solid min/max T nan  nan GAMG: Solving for p_rgh, Initial residual = 0.000137127, Final residual = 9.42408e09, No Iterations 9 ExecutionTime = 8.33 s If we use This is the solver output from the very first time step ... lengthy valgrind output smoothSolver: Solving for e.solid, Initial residual = 1, Final residual = nan, No Iterations 1000 air min/max T 300  300 water min/max T 300  300 solid min/max T nan  nan GAMG: Solving for p_rgh, Initial residual = 0.0238341, Final residual = 8.50791e09, No Iterations 15 PIMPLE: Iteration 2 MULES: Solving for alpha.air MULES: Solving for alpha.water air fraction, min, max = 0.807943 0.3999 1 water fraction, min, max = 5.67576e05 0 0.0464204 solid fraction, min, max = 0.192 0 0.6 Phasesum volume fraction, min, max = 1 1 1 MULES: Solving for alpha.air MULES: Solving for alpha.water air fraction, min, max = 0.807918 0.3999 1 water fraction, min, max = 8.15711e05 0 0.0906865 solid fraction, min, max = 0.192 0 0.6 Phasesum volume fraction, min, max = 1 1 1 Constructing momentum equations smoothSolver: Solving for e.solid, Initial residual = nan, Final residual = nan, No Iterations 1000 > FOAM FATAL IO ERROR: wrong token type  expected Scalar, found on line 0 the word 'nan' file: /home/gerhard/OpenFOAM/OpenFOAM6/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bed/system/data.solverPerformance.e.solid at line 0. From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::doubleScalar&) in file lnInclude/Scalar.C at line 93. FOAM exiting If we specify heatTransfer models, then running the solver ends like this: Courant Number mean: 0 max: 0 Time = 0.002 PIMPLE: Iteration 1 MULES: Solving for alpha.air MULES: Solving for alpha.water air fraction, min, max = 0.807968 0.3999 1 water fraction, min, max = 3.2e05 0 0.0001 solid fraction, min, max = 0.192 0 0.6 Phasesum volume fraction, min, max = 1 1 1 MULES: Solving for alpha.air MULES: Solving for alpha.water air fraction, min, max = 0.807968 0.3999 1 water fraction, min, max = 3.2e05 0 0.0001 solid fraction, min, max = 0.192 0 0.6 Phasesum volume fraction, min, max = 1 1 1 Constructing momentum equations new cannot satisfy memory request. This does not necessarily mean you have run out of virtual memory. It could be due to a stack violation caused by e.g. bad use of pointers or an out of date shared library Abgebrochen (Speicherabzug geschrieben) If we run valgrind, then the solver runs: Courant Number mean: 0.00568723 max: 0.0575264 Time = 0.006 PIMPLE: Iteration 1 MULES: Solving for alpha.air MULES: Solving for alpha.water air fraction, min, max = 0.807741 0.3999 1 water fraction, min, max = 0.000258982 0 0.348089 solid fraction, min, max = 0.192 0 0.6 Phasesum volume fraction, min, max = 1 1 1 MULES: Solving for alpha.air MULES: Solving for alpha.water air fraction, min, max = 0.807716 0.3999 1 water fraction, min, max = 0.000284159 0 0.37835 solid fraction, min, max = 0.192 0 0.6 Phasesum volume fraction, min, max = 1 1 1 Constructing momentum equations smoothSolver: Solving for e.solid, Initial residual = 0.123651, Final residual = 2.10493e16, No Iterations 1 air min/max T 300  300 water min/max T 300  300 solid min/max T 300  300 GAMG: Solving for p_rgh, Initial residual = 0.000204108, Final residual = 6.89491e09, No Iterations 10 PIMPLE: Iteration 2 MULES: Solving for alpha.air MULES: Solving for alpha.water air fraction, min, max = 0.807691 0.3999 1 water fraction, min, max = 0.000309372 0 0.407208 solid fraction, min, max = 0.192 0 0.6 Phasesum volume fraction, min, max = 1 1 1 MULES: Solving for alpha.air MULES: Solving for alpha.water air fraction, min, max = 0.807665 0.3999 1 water fraction, min, max = 0.000334621 0 0.434726 solid fraction, min, max = 0.192 0 0.6 Phasesum volume fraction, min, max = 1 1 1 Constructing momentum equations smoothSolver: Solving for e.solid, Initial residual = 1.83298e07, Final residual = 2.01302e16, No Iterations 1 air min/max T 300  300 water min/max T 300  300 solid min/max T 300  300 GAMG: Solving for p_rgh, Initial residual = 9.96155e05, Final residual = 7.19793e09, No Iterations 7 PIMPLE: Iteration 3 MULES: Solving for alpha.air MULES: Solving for alpha.water air fraction, min, max = 0.80764 0.3999 1 water fraction, min, max = 0.000359902 0 0.460968 solid fraction, min, max = 0.192 0 0.6 Phasesum volume fraction, min, max = 1 1 1 MULES: Solving for alpha.air MULES: Solving for alpha.water air fraction, min, max = 0.807615 0.3999 1 water fraction, min, max = 0.000385215 0 0.485992 solid fraction, min, max = 0.192 0 0.6 Phasesum volume fraction, min, max = 1 1 1 Constructing momentum equations smoothSolver: Solving for e.solid, Initial residual = 1.2587e06, Final residual = 2.09852e16, No Iterations 1 air min/max T 300  300 water min/max T 300  300 solid min/max T 300  300 GAMG: Solving for p_rgh, Initial residual = 7.42108e05, Final residual = 7.09539e09, No Iterations 7 ExecutionTime = 9.58 s  
Tags  No tags attached.  

I think you are the first person to try this. There was a bug in that the handling of some of the tmp fields in the multiphase energy equations. Fixed in dev and 6. https://github.com/OpenFOAM/OpenFOAMdev/commit/3c0ce7b152ae00e21488d777c109ea33763e8f72 https://github.com/OpenFOAM/OpenFOAM6/commit/4086512c69100b187ccbf017c484df75b80531de 