View Issue Details

IDProjectCategoryView StatusLast Update
0002472OpenFOAMBugpublic2017-03-17 12:02
Reporterfs1982 Assigned Towill  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version14.04
Product Versiondev 
Fixed in Versiondev 
Summary0002472: Set-up of an pure dispersed flow simulation in reactingMultiphaseEulerFoam only with a dragModel is not possible
Descriptionhere is an issue with the set-up for reactingMultiphaseEulerFoam and reactingTwophaseEulerFoam. If one defines just a dragModel for a dispersed flow (only an ordered phasePair "gas1 in gas2") and no surface tension, wall lubrication, virtual mass, and so on. Additionally, one has to specify "none" for the blending method, then the solver fails with an FOAM FATAL ERROR. The issue is solved, if one defines an surfaceTension model, more detailed a model which uses an unordered phasePair.

Tested with dev release check out at 21.02.2017.
Steps To ReproduceAllrun on the case in the attachment. Check log file log.reactingMultiphaseEulerFoam.
Additional InformationThe solver fails when filling the table with the drag coefficients Kds_ in the constructor in momentumTransferPhaseSystem.C in line

const phasePair& pair(this->phasePairs_[dragModelIter.key()]);

because the key in phasePairs is only an ordered key (gas1 in gas2) but the key used in the drag coefficient table is an unordered key (gas1 and gas2). Hence, there is a lookup error. A quick & dirty fix is to change the generatePairs function in phaseSystem.C and ensure that for an ordered phase pair resulting from the dragModel dict an unordered entry is generated as-well in the phasePairs_ table

        // new ordered pair
        else if (key.ordered())
        {
            phasePairs_.insert
            (
                key,
                autoPtr<phasePair>
                (
                    new orderedPhasePair
                    (
                        phaseModels_[key.first()],
                        phaseModels_[key.second()]
                    )
                )
            );

            //Bugfix: We need to add an unordered phasePairKey for
            // blendedInterfacialModels, which only have a ordered
            // phasePairKey. This is needed because the corresponding
            // coefficent table, e.g., KdTable Kds_ has only an unordered key

            phasePairKey unorderedKey
            (
               key.first(),
               key.second(),
               false
            );

            if (!phasePairs_.found(unorderedKey))
            {
                phasePairs_.insert
                (
                    unorderedKey,
                    autoPtr<phasePair>
                    (
                        new phasePair
                        (
                            phaseModels_[key.first()],
                            phaseModels_[key.second()]
                        )
                    )
                );
            }
        }
TagsNo tags attached.

Activities

fs1982

2017-02-22 14:39

reporter  

bugReport.tar.gz (3,550 bytes)

will

2017-03-16 14:03

manager   ~0007935

Thanks for the report and the fix. I'll put pretty much exactly that fix in, but I think it belongs in phaseSystemTemplates.C, next to the creation of the blended model.

will

2017-03-17 12:02

manager   ~0007937

Resolved by commit a166237d087d9ed36106fa9f0614a0dd27a772e5

Issue History

Date Modified Username Field Change
2017-02-22 14:39 fs1982 New Issue
2017-02-22 14:39 fs1982 File Added: bugReport.tar.gz
2017-03-16 14:03 will Note Added: 0007935
2017-03-17 12:02 will Assigned To => will
2017-03-17 12:02 will Status new => resolved
2017-03-17 12:02 will Resolution open => fixed
2017-03-17 12:02 will Fixed in Version => dev
2017-03-17 12:02 will Note Added: 0007937