CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Building direct interaction list for stirred column with Lagrangian Particles

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 6, 2024, 06:23
Default Building direct interaction list for stirred column with Lagrangian Particles
  #1
New Member
 
Oliver vG
Join Date: May 2024
Posts: 5
Rep Power: 2
nuzzknacker is on a distinguished road
Hey CFD People,

I've built two cases. One where I simulated a beaker containing a certain number of Lagrangian particles that are initially at fixed positions and then get stirred with a plate stirrer. The stirrer uses Non-Conformal Coupling (NCC) to introduce the rotation of the mesh. This simulation runs fairly quickly and stable. Below you see my cloudProperties file for this case:

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      cloudProperties;
}

type        collidingCloud;

solution
{
    coupled         true;
    transient       yes;
    cellValueSourceCorrection off;

    interpolationSchemes
    {
        rho             cell;
        U               cellPoint;
        mu              cell;
    }

    integrationSchemes
    {
        U               Euler;
    }

    sourceTerms
    {
        schemes
        {
            U semiImplicit 1;
        }
    }
}

constantProperties
{
    parcelTypeId 1;

    rhoMin          1e-15;
    minParcelMass   1e-15;

    rho0            960;
    youngsModulus   1e4;
    poissonsRatio   0.23;

    constantVolume  true;

    alphaMax        0.64;
}

subModels
{
    particleForces
    {
        sphereDrag;
        gravity;
    }

    injectionModels
    {
        model1
        {
            type            manualInjection;
            positionsFile   "cloudPositions";
            nParticle       1;
            SOI             0;
            U0              (0 0 0);
            sizeDistribution
            {
                type            fixedValue;
                value           0.001;
            }
        }
    }

    dispersionModel none;

    patchInteractionModel standardWallInteraction;

    standardWallInteractionCoeffs
    {
        type rebound;
    }

    patchInteractionModel localInteraction;

    localInteractionCoeffs
    {
        patches
        (
            vessel
            {
                type rebound;
                e    0.97;
                mu   0.09;
            }
            impeller
            {
                type rebound;
                e    0.97;
                mu   0.09;
            }
            outlet
            {
                type escape;
            }
			nonCouple1
            {
                type none;
            }
			nonCouple2
            {
                type none;
            }
			
        );
    }

    heatTransferModel none;

    surfaceFilmModel none;

    collisionModel pairCollision;

    pairCollisionCoeffs
    {
        maxInteractionDistance  9e-4;
        writeReferredParticleCloud no;
        pairModel pairSpringSliderDashpot;
        pairSpringSliderDashpotCoeffs
        {
            useEquivalentSize   no;
            alpha               0.02;
            b                   1.5;
            mu                  0.50;
            cohesionEnergyDensity 0;
            collisionResolutionSteps 12;
        };
        wallModel wallSpringSliderDashpot;
        wallSpringSliderDashpotCoeffs
        {
            useEquivalentSize no;
            collisionResolutionSteps 12;
            youngsModulus   1e8;
            poissonsRatio   0.23;
            alpha           0.02;
            b               1.5;
            mu              0.09;
            cohesionEnergyDensity 0;
        };
        U     U;
    }

    stochasticCollisionModel none;

    radiation off;
}

positionsFile "constant/cloudPositions";

cloudFunctions
{}

// ************************************************************************* //
The second case involves a column where water flows through it and Lagrangian particles get introduced via one of the two inlets (the second inlet only serves as a water inlet). The column is also stirred again with an NCC. Even though the setup for these two cases is fairly similar, the simulation takes way longer in the column case. This is mainly because it builds a direct interaction list every time a cell moves. I don't quite understand why building the interaction list takes that long for the column but not for the beaker case. Below is the cloudProperties file and the log file for the first time steps of the column case, showing the building of the interaction list (had to shorten it a bit to avoid the character limit of the post).

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      cloudProperties;
}

type        collidingCloud;

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

    interpolationSchemes
    {
        rho             cell;
        U               cellPoint;
        mu              cell;
    }

    averagingMethod dual;
	
    integrationSchemes
    {
        U               Euler;
    }

    sourceTerms
    {
        schemes
        {
            U semiImplicit 1;
        }
    }
}

constantProperties
{
    rho0            960;
    youngsModulus   1e4;
    poissonsRatio   0.001;
    alphaMax        0.64;
}

subModels
{
    particleForces
    {
        sphereDrag;
        gravity;
    }

    injectionModels
    {
        model1
        {
            type            patchInjection;
            SOI             20;
            duration        5;
            nParticle       1;
            parcelsPerSecond 1000;
            patchName       inlet1;
            U0              (0 0.02 0);
//            flowRateProfile constant 1;
            sizeDistribution
            {
                type            normal;
                Q               0;
                min             8.5e-4;
                max             9.5e-4;
                mu              9e-4;
                sigma           0.2e-4;
            }
        }
    }

    dispersionModel none;

    patchInteractionModel standardWallInteraction;

    standardWallInteractionCoeffs
    {
        type rebound;
    }
	
//	patchInteractionModel localInteraction;

    localInteractionCoeffs
    {
        patches
        (
            vessel
            {
                type rebound;
                e    0.97;
                mu   0.09;
            }
            impeller
            {
                type rebound;
                e    0.97;
                mu   0.09;
            }
            "(outlet|inlet1|inlet2)"
            {
                type escape;
            }
			nonCouple1
            {
                type none;
            }
			nonCouple2
            {
                type none;
            }
			
			couple
            {
                type none;
            }
			
        );
    }

    surfaceFilmModel none;
	
    packingModel none;

    collisionModel pairCollision;

    pairCollisionCoeffs
    {
        maxInteractionDistance  9.5e-4;
        writeReferredParticleCloud no;
        pairModel pairSpringSliderDashpot;
        pairSpringSliderDashpotCoeffs
        {
            useEquivalentSize   no;
            alpha               0.02;
            b                   1.5;
            mu                  0.50;
            cohesionEnergyDensity 0;
            collisionResolutionSteps 12;
        };
        wallModel wallSpringSliderDashpot;
        wallSpringSliderDashpotCoeffs
        {
            useEquivalentSize no;
            collisionResolutionSteps 12;
            youngsModulus   1e8;
            poissonsRatio   0.23;
            alpha           0.02;
            b               1.5;
            mu              0.09;
            cohesionEnergyDensity 0;
        };
        U     U;
    }

    dampingModel none;
	
    isotropyModel stochastic;

    stochasticCoeffs
    {
        timeScaleModel
        {
            type isotropic;
            alphaPacked 0.77;
            e 0.9;
        }
    }

    stochasticCollisionModel none;

    radiation off;

}

cloudFunctions
{}

// ************************************************************************* //
Code:
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  11
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 11-e1fc8c682ae6
Exec   : foamRun -parallel
Date   : Sep 06 2024
Time   : 10:39:44
Host   : "MICROCAPS17"
PID    : 41987
I/O    : uncollated
Case   : /home/ovg/openfoam11/cases/column_laminar_cont_gel_2
nProcs : 8
Slaves : 
7
(
"MICROCAPS17.41988"
"MICROCAPS17.41989"
"MICROCAPS17.41990"
"MICROCAPS17.41991"
"MICROCAPS17.41992"
"MICROCAPS17.41993"
"MICROCAPS17.41994"
)

Pstream initialised with:
    floatTransfer      : false
    nProcsSimpleSum    : 0
    commsType          : nonBlocking
    polling iterations : 0
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

patchToPatch: Calculating couplings between 35034 source faces and 35034 target faces
    Source min/average/max coverage = 1/1/1
    Target min/average/max coverage = 1/1/1
    Source average openness/error/depth/angle = 9.20764e-17/8.19576e-15/1.06115e-15/2.2129e-07
    Source max openness/error/depth/angle = 6.34532e-16/2.2392e-13/1.24959e-13/1.9091e-06
    73742 couplings calculated in 1.29369s
fvMeshStitcher: Connecting
    9/7 small couplings removed/added to nonConformalCyclic_on_nonCouple1
    Cell min/avg/max openness = 0/5.69531e-17/1.28294e-15
Selecting fvMeshMover motionSolver
Selecting motion solver: solidBody
Selecting solid-body motion function sixDoFMotion
    - selecting cells using cellZone rotating
Selecting solver incompressibleFluid
Selecting viscosity model constant
Selecting turbulence model type laminar
Selecting laminar stress model Stokes
No MRF models present

Courant Number mean: 1.11805e-06 max: 0.0178331

PIMPLE: No convergence criteria found


PIMPLE: No corrector convergence criteria found
        Calculations will do 2 corrections


PIMPLE: Operating solver in transient mode with 2 outer correctors


Selecting finite volume model type clouds
    Name: clouds
Selecting parcelCloud collidingCloud
Constructing particle forces
    Selecting particle force sphereDrag
    Selecting particle force gravity
Constructing cloud functions
    none
Constructing particle injection models
Creating injector: model1
Selecting injection model patchInjection
    Constructing 3-D injection
Selecting distribution type normal
    min/average/max value = 0.00085/0.0009/0.00095
Selecting dispersion model none
Selecting patch interaction model localInteraction
    Interaction fields will not be written
Selecting stochastic collision model none
Selecting surface film model none
Selecting U integration scheme Euler
Selecting collision model pairCollision
Selecting pair model pairSpringSliderDashpot
Selecting wall model wallSpringSliderDashpot
Building InteractionLists with interaction distance 0.00095
    Building referred interaction lists
    Building direct interaction lists

Starting time loop

Constructing face momentum Uf
Courant Number mean: 1.11805e-06 max: 0.0178331
fvMeshStitcher: Disconnecting
    Cell min/avg/max openness = 0/5.35581e-17/2.69659e-16
deltaT = 0.00119048
Time = 0.00119048s

PIMPLE: Iteration 1
patchToPatch: Calculating couplings between 35034 source faces and 35034 target faces
    Source min/average/max coverage = 0.533198/0.999986/1
    Target min/average/max coverage = 0.533184/0.999986/1
    Source average openness/error/depth/angle = 1.66599e-16/6.35454e-08/0.000132176/0.0268652
    Source max openness/error/depth/angle = 1.04643e-15/0.000810245/0.0524618/5.8437
    323590 couplings calculated in 0.515734s
fvMeshStitcher: Connecting
    Cell min/avg/max openness = 0/5.74171e-17/3.77629e-16
    Cell min/avg/max volume conservation error = -8.61939e-14/2.38265e-19/1.36108e-13
    nonConformalCyclic_on_nonCouple1 min/avg/max mesh flux error = 0/0/0
DILUPBiCGStab:  Solving for Ux, Initial residual = 1, Final residual = 0.000778812, No Iterations 1
DILUPBiCGStab:  Solving for Uy, Initial residual = 1, Final residual = 0.001349, No Iterations 1
DILUPBiCGStab:  Solving for Uz, Initial residual = 1, Final residual = 0.00141009, No Iterations 1
DICPCG:  Solving for p, Initial residual = 1, Final residual = 9.77816e-07, No Iterations 439
time step continuity errors : sum local = 3.21327e-10, global = 3.58454e-13
PIMPLE: Iteration 2
DILUPBiCGStab:  Solving for Ux, Initial residual = 0.0512996, Final residual = 9.7466e-09, No Iterations 2
DILUPBiCGStab:  Solving for Uy, Initial residual = 0.504438, Final residual = 2.03844e-08, No Iterations 2
DILUPBiCGStab:  Solving for Uz, Initial residual = 0.05135, Final residual = 4.22613e-09, No Iterations 2
DICPCG:  Solving for p, Initial residual = 0.115393, Final residual = 9.48215e-07, No Iterations 395
time step continuity errors : sum local = 3.37016e-09, global = 2.08207e-12, cumulative = 2.08207e-12
ExecutionTime = 14.378 s  ClockTime = 15 s


Solving 3-D cloud cloud

Cloud: cloud injector: model1
    Added 2 new parcels

    13 move-collide subCycles
patchToPatch: Calculating couplings between 35034 source faces and 35034 target faces
    596578 couplings calculated in 0.137323s
--> FOAM Warning : 
    From function void Foam::InteractionLists<ParticleType>::sendReferredData(const Foam::List<Foam::DynamicList<ParticleType*> >&, Foam::PstreamBuffers&) [with ParticleType = Foam::CollidingParcel<Foam::MomentumParcel<Foam::particle> >]
    in file /home/ubuntu/OpenFOAM/OpenFOAM-11/src/lagrangian/basic/lnInclude/InteractionLists.C at line 1158
    Mesh changing, rebuilding InteractionLists form scratch.
Building InteractionLists with interaction distance 0.00095
    Building referred interaction lists
    Building direct interaction lists
--> FOAM Warning : 
    From function void Foam::InteractionLists<ParticleType>::sendReferredData(const Foam::List<Foam::DynamicList<ParticleType*> >&, Foam::PstreamBuffers&) [with ParticleType = Foam::CollidingParcel<Foam::MomentumParcel<Foam::particle> >]
    in file /home/ubuntu/OpenFOAM/OpenFOAM-11/src/lagrangian/basic/lnInclude/InteractionLists.C at line 1158
    Mesh changing, rebuilding InteractionLists form scratch.
Building InteractionLists with interaction distance 0.00095
    Building referred interaction lists
    Building direct interaction lists

...

...

--> FOAM Warning : 
    From function void Foam::InteractionLists<ParticleType>::sendReferredData(const Foam::List<Foam::DynamicList<ParticleType*> >&, Foam::PstreamBuffers&) [with ParticleType = Foam::CollidingParcel<Foam::MomentumParcel<Foam::particle> >]
    in file /home/ubuntu/OpenFOAM/OpenFOAM-11/src/lagrangian/basic/lnInclude/InteractionLists.C at line 1158
    Mesh changing, rebuilding InteractionLists form scratch.
Building InteractionLists with interaction distance 0.00095
    Building referred interaction lists
    Building direct interaction lists
Cloud: cloud
    Current number of parcels       = 2
    Current mass in system          = 7.22006e-07
    Linear momentum                 = (-1.06394e-13 1.30016e-08 -1.35876e-13)
   |Linear momentum|                = 1.30016e-08
    Linear kinetic energy           = 1.17067e-10
    model1:
        number of parcels added     = 2
        mass introduced             = 7.22006e-07
    Parcel fate (number, mass)      : patch impeller
      - escape                      = 0, 0
      - stick                       = 0, 0
    Parcel fate (number, mass)      : patch vessel
      - escape                      = 0, 0
      - stick                       = 0, 0
    Parcel fate (number, mass)      : patch outlet
      - escape                      = 0, 0
      - stick                       = 0, 0
    Parcel fate (number, mass)      : patch inlet1
      - escape                      = 0, 0
      - stick                       = 0, 0
    Parcel fate (number, mass)      : patch inlet2
      - escape                      = 0, 0
      - stick                       = 0, 0
    Rotational kinetic energy       = 0

Courant Number mean: 0.0129638 max: 0.20508
fvMeshStitcher: Disconnecting
    Cell min/avg/max openness = 0/5.37304e-17/2.69659e-16
    Cell min/avg/max volume conservation error = -8.61939e-14/2.38123e-19/1.36108e-13
deltaT = 0.00141156
Time = 0.00260204s

PIMPLE: Iteration 1
patchToPatch: Calculating couplings between 35034 source faces and 35034 target faces
    Source min/average/max coverage = 0.57624/0.999987/1
    Target min/average/max coverage = 0.576213/0.999987/1
    Source average openness/error/depth/angle = 1.59622e-16/1.31463e-07/0.00027849/0.0579973
    Source max openness/error/depth/angle = 8.4624e-16/0.00166483/0.106178/12.6858
    323604 couplings calculated in 0.695042s
fvMeshStitcher: Connecting
    Cell min/avg/max openness = 0/5.73414e-17/3.53182e-16
    Cell min/avg/max volume conservation error = -4.8448e-14/8.38456e-19/6.42725e-14
    Cell min/avg/max old-time volume conservation error = -5.80195e-13/4.76836e-16/1.13285e-12
    nonConformalCyclic_on_nonCouple1 min/avg/max mesh flux error = 0/0/0
DILUPBiCGStab:  Solving for Ux, Initial residual = 0.347467, Final residual = 0.000808293, No Iterations 1
DILUPBiCGStab:  Solving for Uy, Initial residual = 0.920887, Final residual = 0.00116557, No Iterations 1
DILUPBiCGStab:  Solving for Uz, Initial residual = 0.346607, Final residual = 0.000321285, No Iterations 1
DICPCG:  Solving for p, Initial residual = 0.107894, Final residual = 9.61697e-07, No Iterations 415
time step continuity errors : sum local = 4.61078e-09, global = -1.73208e-12
PIMPLE: Iteration 2
DILUPBiCGStab:  Solving for Ux, Initial residual = 0.0134641, Final residual = 9.65383e-09, No Iterations 2
DILUPBiCGStab:  Solving for Uy, Initial residual = 0.0898331, Final residual = 1.69888e-08, No Iterations 2
DILUPBiCGStab:  Solving for Uz, Initial residual = 0.0136091, Final residual = 2.47311e-09, No Iterations 2
DICPCG:  Solving for p, Initial residual = 0.625764, Final residual = 9.55071e-07, No Iterations 411
time step continuity errors : sum local = 7.57776e-10, global = -1.73439e-12, cumulative = 3.47681e-13
ExecutionTime = 128.676 s  ClockTime = 129 s


Can anyone give me a hint on what causes this and if there is a way to avoid it (e.g. first calculating the movement of the mesh and then the interaction in one step)?

I'm fairly new to openFOAM and CFD in general. So if anything is unclear or additional information is needed let me know

Thanks a lot in advance to anyone who can help me!
nuzzknacker is offline   Reply With Quote

Reply

Tags
interactions, lagrangian injectors, non-conformal mesh, patch injection


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accumulating Lagrangian particles data at boundary cwl STAR-CCM+ 2 December 6, 2022 13:31
Lagrangian Particles + Porosity 37269 OpenFOAM Running, Solving & CFD 3 September 25, 2020 05:14
Probability of interaction with the wall of lagrangian particles spikespigel OpenFOAM 0 June 22, 2019 22:03
Purpose and Map of this forum Tobi OpenFOAM Community Contributions 0 September 19, 2017 06:52
implementing new Lagrangian patch interaction Chrisi1984 OpenFOAM Programming & Development 0 May 31, 2014 05:49


All times are GMT -4. The time now is 14:14.