View Issue Details

IDProjectCategoryView StatusLast Update
0001408OpenFOAMBugpublic2014-10-15 20:21
Reporterwyldckat Assigned Towill  
PrioritynormalSeverityminorReproducibilitysometimes
Status resolvedResolutionfixed 
Summary0001408: Method "SaffmanMeiLiftForce::Cl" is missing a mathematical operation protection in the last expression
DescriptionWhile trying to figure out how to use "SaffmanMeiLiftForce" with the tutorial "lagrangian/DPMFoam/Goldschmidt", a SIGFPE signal was triggered.

After a bit of old-school debugging (using Info outputs to see the values), the conclusion was that the crash was due to this line of code in the method "SaffmanMeiLiftForce::Cl":

    return 3.0/(mathematical::twoPi*sqrt(Rew))*Cld;

Since the division operation doesn't have a protection from divisions by zero, it's therefore susceptible to these crashes.
The curious detail is that many of the other operations done on this method, similar protections are implemented, except on this very last expression, e.g.:

    scalar beta = 0.5*(Rew/(Re + ROOTVSMALL));

It makes some sense that a similar protection is implemented, otherwise the flow field must strictly be pre-initialized.
Steps To ReproduceAs mentioned above, the tutorial "lagrangian/DPMFoam/Goldschmidt" was used, with the following settings were used in the file "constant/kinematicCloudProperties" (also provided in attachment):

//...

    interpolationSchemes
    {
        rho.air cell;
        U.air cellPoint;
        mu.air cell;
        curlUcDt cellPatchConstrained;
    }

//...

    particleForces
    {
        ErgunWenYuDrag
        {
            alphac alpha.air;
        }
        gravity;
        SaffmanMeiLiftForce
        {
            U U.air;
        }
    }

//...


------------------
Note: "cellPatchConstrained" was used only because it was my last attempt at trying to use this lift model.
Additional InformationFound this out while helping on this (external) forum thread: http://www.cfd-online.com/Forums/openfoam-pre-processing/124795-saffmanmeiliftforce.html#post512967

In addition, I honestly have no idea whether this model is applicable on this tutorial case, since I only focused on managing to figure out how to configure the case to use this lift model...
TagsNo tags attached.

Activities

wyldckat

2014-10-05 12:14

updater  

kinematicCloudProperties (4,122 bytes)   
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      particleProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solution
{
    active          true;
    coupled         true;
    transient       yes;
    cellValueSourceCorrection off;

    interpolationSchemes
    {
        rho.air         cell;
        U.air           cellPoint;
        mu.air          cell;
        curlUcDt        cellPatchConstrained;
    }

    integrationSchemes
    {
        U               Euler;
    }

    sourceTerms
    {
        schemes
        {
            U semiImplicit 1;
        }
    }
}

constantProperties
{
    parcelTypeId 1;

    rhoMin          1e-15;
    minParticleMass 1e-15;

    rho0            2526;
    youngsModulus   1e8;
    poissonsRatio   0.35;

    constantVolume  false;

    alphaMax        0.99;
}

subModels
{
    particleForces
    {
        ErgunWenYuDrag
        {
            alphac alpha.air;
        }
        gravity;
        SaffmanMeiLiftForce
        {
            U U.air;
        }
    }

    injectionModels
    {
        model1
        {
            type            manualInjection;
            massTotal       0;
            parcelBasisType fixed;
            nParticle       1;
            SOI             0;
            positionsFile   "kinematicCloudPositions";
            U0              ( 0 0 0 );
            sizeDistribution
            {
                type        fixedValue;
                fixedValueDistribution
                {
                    value   0.0025;
                }
            }
        }
    }

    dispersionModel none;

    patchInteractionModel localInteraction;

    localInteractionCoeffs
    {
        patches
        (
            top
            {
                type rebound;
                e    0.97;
                mu   0.09;
            }
            bottom
            {
                type rebound;
                e    0.97;
                mu   0.09;
            }
            walls
            {
                type rebound;
                e    0.97;
                mu   0.09;
            }
            frontAndBack
            {
                type rebound;
                e    0.97;
                mu   0.09;
            }
        );
    }

    StandardWallInteractionCoeffs
    {
        type rebound;
        e    0.97;
        mu   0.09;
    }

    heatTransferModel none;

    surfaceFilmModel none;

    collisionModel pairCollision;

    pairCollisionCoeffs
    {
        maxInteractionDistance  0.0025;

        writeReferredParticleCloud no;

        pairModel pairSpringSliderDashpot;

        pairSpringSliderDashpotCoeffs
        {
            useEquivalentSize   no;
            alpha               0.02;
            b                   1.5;
            mu                  0.10;
            cohesionEnergyDensity 0;
            collisionResolutionSteps 12;
        };

        wallModel wallSpringSliderDashpot;

        wallSpringSliderDashpotCoeffs
        {
            useEquivalentSize no;
            collisionResolutionSteps 12;
            youngsModulus   1e8;
            poissonsRatio   0.23;
            alpha           0.01;
            b               1.5;
            mu              0.09;
            cohesionEnergyDensity 0;
        };

        UName U.air;
    }

    stochasticCollisionModel none;

    radiation off;
}


cloudFunctions
{}


// ************************************************************************* //
kinematicCloudProperties (4,122 bytes)   

will

2014-10-15 11:54

manager   ~0003259

Thanks for the report. A small value has been added to Rew in commit e1b8f230403ce86142394db06c1d371bd9be3000.

Issue History

Date Modified Username Field Change
2014-10-05 12:14 wyldckat New Issue
2014-10-05 12:14 wyldckat File Added: kinematicCloudProperties
2014-10-15 11:54 will Note Added: 0003259
2014-10-15 11:54 will Status new => resolved
2014-10-15 11:54 will Resolution open => fixed
2014-10-15 11:54 will Assigned To => will