View Issue Details

IDProjectCategoryView StatusLast Update
0001949OpenFOAM(No Category)public2016-01-05 09:29
ReportermartinBAssigned Tohenry 
PrioritylowSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSOpenSuSEOS Version13.1
Product Version 
Fixed in Version 
Summary0001949: Feature request: "pass" option for particles' localPatchInteraction
DescriptionIt would be very useful to add a "pass" option to the patchInteraction models. For example particles could pass AMI interfaces and stick at other patches.

There are only three minor modifications necessary.

In the attached archive you can find the modified source code files and a test case. The test case is prepared for icoUncoupledKinematicParcelFoam.
Steps To ReproduceIntegrate code snippets, and run icoUncoupledKinematicParcelFoam in the attached case.
Additional InformationThe integration seems to be easy, changes are highlighted with "// <--":

LocalInteration.C, line 256ff:
            case PatchInteractionModel<CloudType>::itPass: // <--
            {
                keepParticle = true;
                active = true;
                return false;
                //break;
            }




PatchInteractionModel.H, line 71ff:
        enum interactionType
        {
            itRebound,
            itStick,
            itEscape,
            itPass, // <--
            itOther
        };



PatchInteractionModel.C, line 33ff:
template<class CloudType>
Foam::wordList Foam::PatchInteractionModel<CloudType>::interactionTypeNames_
(
    IStringStream
    (
        "(rebound stick escape pass)" // <--
    )()
);

// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //

template<class CloudType>
Foam::word Foam::PatchInteractionModel<CloudType>::interactionTypeToWord
(
    const interactionType& itEnum
)
{
    word it = "other";

    switch (itEnum)
    {
        case itRebound:
        {
            it = "rebound";
            break;
        }
        case itStick:
        {
            it = "stick";
            break;
        }
        case itEscape:
        {
            it = "escape";
            break;
        }
        case itPass: // <--
        {
            it = "pass";
            break;
        }
        default:
        {
        }
    }

    return it;
}


template<class CloudType>
typename Foam::PatchInteractionModel<CloudType>::interactionType
Foam::PatchInteractionModel<CloudType>::wordToInteractionType
(
    const word& itWord
)
{
    if (itWord == "rebound")
    {
        return itRebound;
    }
    else if (itWord == "stick")
    {
        return itStick;
    }
    else if (itWord == "escape")
    {
        return itEscape;
    }
    else if (itWord == "pass") // <--
    {
        return itPass;
    }
    else
    {
        return itOther;
    }
}
TagsNo tags attached.

Activities

martinB

2015-12-15 12:30

reporter  

featureRequest_cyclicAMI_pass.tar.gz (901,210 bytes)

henry

2015-12-15 13:29

manager   ~0005764

Are you finding that currently particles are not passing through AMI interfaces?

martinB

2015-12-15 13:39

reporter   ~0005765

Indeed the particles can pass through AMI interfaces, but if I want to use localPatchInteraction I must assign a PatchInteractionModel to each patch. This includes the AMI interfaces. But I can only select from "rebound", "stick" or "escape" which is not the intended behavior.
If I choose standardWallInteraction, then particles move through the AMI interfaces but then I can't have the particles stick on one patch and pass through another patch...

henry

2015-12-15 13:47

manager   ~0005766

Thanks for the clarification, I will study the changes and report back.

henry

2016-01-03 15:46

manager   ~0005797

I do not think there is a need to add a new patch interaction type for cyclicAMI patches as they should simply be treated as a special type of coupled boundary. I have added the exception for cyclicAMIPolyPatch to patchInteractionDataList which allow you to specify localInteraction models for patches without the need to specify models for cyclicAMI patches in OpenFOAM-dev:

commit e20b9173e95e9c058ea5e882171fca21f5ec7025
Author: Henry Weller <http://cfd.direct>
Date: Sun Jan 3 15:39:44 2016 +0000

    patchInteractionDataList: treat cyclicAMIPolyPatch as a coupled patch
    Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1949

Please test and let me know if this change resolves the problems you are having.

martinB

2016-01-05 09:16

reporter   ~0005800

Thanks for the code update: it works excellently this way.

A (rather specific) application case, where a "pass" option would still be useful, is: particulate filters are modeled with type cyclic patches (for example porousBafflePressure). Some particles (cloud1) can pass the cyclic patch, others (cloud2) should stick to it. But of course this is very specific, and more special features like "a fraction of particles smaller then xy can pass" must be implemented particularly anyway.

So this feature request can be closed, thanks again.

henry

2016-01-05 09:29

manager   ~0005801

Resolved in OpenFOAM-dev by commit e20b9173e95e9c058ea5e882171fca21f5ec7025
Resolved in OpenFOAM-3.0.x by commit fde910a34396fcbc826ca5846281e336f0d629b9

Issue History

Date Modified Username Field Change
2015-12-15 12:30 martinB New Issue
2015-12-15 12:30 martinB File Added: featureRequest_cyclicAMI_pass.tar.gz
2015-12-15 13:29 henry Note Added: 0005764
2015-12-15 13:39 martinB Note Added: 0005765
2015-12-15 13:47 henry Note Added: 0005766
2016-01-03 15:46 henry Note Added: 0005797
2016-01-05 09:16 martinB Note Added: 0005800
2016-01-05 09:29 henry Note Added: 0005801
2016-01-05 09:29 henry Status new => resolved
2016-01-05 09:29 henry Resolution open => fixed
2016-01-05 09:29 henry Assigned To => henry
2016-03-11 11:44 administrator Category 3.0.1 => (No Category)