View Issue Details

IDProjectCategoryView StatusLast Update
0003918OpenFOAMBugpublic2022-10-24 10:18
Reporterlorenzotrevisan Assigned Tohenry  
PrioritynormalSeveritycrashReproducibilityrandom
Status resolvedResolutionfixed 
Platformx86_64OSSlackware64OS Version15.0
Product Versiondev 
Fixed in Version10 
Summary0003918: Strange behavior with eIcoTabulated
DescriptionTrying to consider water tabulated properties, I'm experiencing strange behavior with eIcoTabulated that causes crash.
Steps To Reproducee.g.1: copy tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/ and substitute ./constant/physicalProperties.water with the attached tabulated one:
    - if you run the simulation it works fine,
    - but if the initial temperature in ./0/T is changed from 293 to 300, the calculation crash with the following error:
        "..."
        "in file /home/ENGINSOFT/l.trevisan/OpenFOAM/OpenFOAM-dev/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 313"
        "Energy -> temperature conversion failed to converge:"
        "..."
    - and considering initial temperature at 300, if tabulated Cv value is changed from "(300 4130)" to "(301 4130)" in ./constant/physicalProperties.water the simulation work again.

e.g.2: copy tutorials/multiphase/multiphaseEulerFoam/laminar/bubbleColumn/ and substitute ./constant/physicalProperties.water with the attached tabulated one:
    - if you run the simulation it crashes with the following error:
        "..."
        "431.902 out of range 273 to 373"
        "of NonUniformTable Cv"
        "..."
    - but considering only initial and final tabulated Cv values in ./constant/physicalProperties.water the simulation work.
Additional InformationSimilar behavior is expected with hIcoTabulated, eTabulated and hTabulated too.
TagsNo tags attached.

Activities

lorenzotrevisan

2022-10-21 11:06

reporter  

physicalProperties.water (2,893 bytes)   
FoamFile
{
    format      ascii;
    class       dictionary;
    location    "constant";
    object      physicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType
{
    type            heRhoThermo; // Energy for a mixture based on density
    mixture         pureMixture; // Fixed composition without reactions
    specie          specie;      // Composition of each constituent
    equationOfState icoTabulated;
    thermo          eIcoTabulated;
    transport       tabulated;      
    energy          sensibleInternalEnergy;
}

mixture // Water at 0.1MPa (1Bar) 
{
    specie
    {
        molWeight   18.0; // Grams per mole of specie [g/mol]
    }
    equationOfState
    // "icoTabulated": incompressible equation of state using non-uniform 
    // tabulated density vs temperature
    {
        rho // Density
        {
            values // ( T[K] [kg/m^3] )
            (
                ( 273    999.8 )
                ( 277   1000.0 )
                ( 280    999.9 )
                ( 300    996.6 )
                ( 320    989.4 )
                ( 340    979.5 )
                ( 360    967.4 )
                ( 373    958.6 )
            );
        }
    }
    thermodynamics
    // "eIcoTabulated": internal energy based thermodynamics package using
    // non-uniform tabulated data for heat capacity vs temperature
    {
        Hf              0; // Heat of formation [J/kg]
        Sf              0; // Standard entropy [J/kg*K]
        Cv // Heat capacity at constant volume
        {
            values // ( T[K] [J/kg*K] )
            (
                ( 273    4217 )
                ( 280    4200 )
                ( 300    4130 )
                ( 320    4041 )
                ( 340    3941 )
                ( 360    3837 )
                ( 373    3770 )
            );
        }
    }
    transport
    // "tabulated": transport properties package using uniformly-spaced tabulated 
    // data for viscosity and thermal conductivity vs pressure and temperature
    {
        mu // Dynamic viscosity
        {
            values // ( T[K] [kg/m*s] )
            (
                ( 273    1791e-06 )
                ( 280    1434e-06 )
                ( 300     854e-06 )
                ( 320     577e-06 )
                ( 340     422e-06 )
                ( 360     326e-06 )
                ( 373     283e-06 )
            );
        }
        kappa // Thermal conductivity
        {
            values // ( T[K] [W/m*K] )
            (
                ( 273    556e-03 )
                ( 280    572e-03 )
                ( 300    609e-03 )
                ( 320    637e-03 )
                ( 340    657e-03 )
                ( 360    671e-03 )
                ( 373    677e-03 )
            );
        }
    }
}

// ************************************************************************* //
physicalProperties.water (2,893 bytes)   

tniemi

2022-10-24 08:42

reporter   ~0012832

As mentioned here https://bugs.openfoam.org/view.php?id=3915, correcting a bug in integratedNonUniformTable1.C seems to also help with this. Before the fix I could reproduce both problems, but after fix both cases ran.

In general the tabulated properties can be a bit problematic around the node points if Cp or Cv value changes a lot. This may make it difficult for the Newton iteration from h/e-> to converge. However, at least in my tests with h and eTabulated (which don't use integratedNonUniformTable1), I have not bumped in to this issue in practice.

henry

2022-10-24 10:18

manager   ~0012834

Resolved in OpenFOAM-10 by commit 6327ab2820105ef9e77d7dd69c0d5b8e6b5cbeb4
Resolved in OpenFOAM-dev by commit d551993e89652771a39850d0b5a807f6782953aa

Issue History

Date Modified Username Field Change
2022-10-21 11:06 lorenzotrevisan New Issue
2022-10-21 11:06 lorenzotrevisan File Added: physicalProperties.water
2022-10-24 08:42 tniemi Note Added: 0012832
2022-10-24 10:18 henry Assigned To => henry
2022-10-24 10:18 henry Status new => resolved
2022-10-24 10:18 henry Resolution open => fixed
2022-10-24 10:18 henry Fixed in Version => 10
2022-10-24 10:18 henry Note Added: 0012834