View Issue Details

IDProjectCategoryView StatusLast Update
0003132OpenFOAMBugpublic2018-12-13 16:27
Reporterprojectionist Assigned Towill  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSUbuntuOS Version16.04
Summary0003132: Computing heat transfer with StationaryPhaseModel in reactingMultiphaseEulerFoam fails
DescriptionWhen 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 ReproduceGo 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 heat-transfer models enabled.


Add heat transfer models in the file phaseProperties

heatTransfer
(
    (solid in air)
    {
        type RanzMarshall;
        residualAlpha 1e-3;
    }
    
    (solid in water)
    {
        type RanzMarshall;
        residualAlpha 1e-3;
    }
);


Additional InformationInterestingly, when I run

valgrind reactingMultiphaseEulerFoam

then, after some lengthy valgrind-output, 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
Phase-sum 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
Phase-sum 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.42408e-09, 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.50791e-09, 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.67576e-05 0 0.0464204
solid fraction, min, max = 0.192 0 0.6
Phase-sum 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.15711e-05 0 0.0906865
solid fraction, min, max = 0.192 0 0.6
Phase-sum 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/OpenFOAM-6/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.2e-05 0 0.0001
solid fraction, min, max = 0.192 0 0.6
Phase-sum 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.2e-05 0 0.0001
solid fraction, min, max = 0.192 0 0.6
Phase-sum 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
Phase-sum 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
Phase-sum volume fraction, min, max = 1 1 1
Constructing momentum equations
smoothSolver: Solving for e.solid, Initial residual = 0.123651, Final residual = 2.10493e-16, 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.89491e-09, 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
Phase-sum 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
Phase-sum volume fraction, min, max = 1 1 1
Constructing momentum equations
smoothSolver: Solving for e.solid, Initial residual = 1.83298e-07, Final residual = 2.01302e-16, 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.96155e-05, Final residual = 7.19793e-09, 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
Phase-sum 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
Phase-sum volume fraction, min, max = 1 1 1
Constructing momentum equations
smoothSolver: Solving for e.solid, Initial residual = 1.2587e-06, Final residual = 2.09852e-16, 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.42108e-05, Final residual = 7.09539e-09, No Iterations 7
ExecutionTime = 9.58 s


TagsNo tags attached.

Activities

will

2018-12-13 16:27

manager   ~0010220

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/OpenFOAM-dev/commit/3c0ce7b152ae00e21488d777c109ea33763e8f72
https://github.com/OpenFOAM/OpenFOAM-6/commit/4086512c69100b187ccbf017c484df75b80531de

Issue History

Date Modified Username Field Change
2018-12-12 18:29 projectionist New Issue
2018-12-13 16:27 will Assigned To => will
2018-12-13 16:27 will Status new => resolved
2018-12-13 16:27 will Resolution open => fixed
2018-12-13 16:27 will Fixed in Version => 6
2018-12-13 16:27 will Note Added: 0010220