mus_particle_DEM_module Module

In this module the core routines of the Discrete Element Method (DEM) for simulating particle-laden flows are implemented.

Two types of particle simulations are supported: unresolved Discrete Particle Simulations (DPS) and fully resolved Momentum-Exchange Method simulations.



Variables

Type Visibility Attributes Name Initial
real(kind=rk), public :: logger_Flift(3) = 0.0_rk
real(kind=rk), public :: logger_Fdrag(3) = 0.0_rk

Interfaces

public interface updatePositionVerlet

  • public subroutine updatePositionVerlet_MEM(this, dt)

    Update particle position using Verlet integration

    Arguments

    Type IntentOptional Attributes Name
    type(mus_particle_MEM_type), intent(inout) :: this
    real(kind=rk), intent(in) :: dt
  • public subroutine updatePositionVerlet_DPS(this, dt)

    Update particle position using Verlet integration

    Arguments

    Type IntentOptional Attributes Name
    type(mus_particle_DPS_type), intent(inout) :: this
    real(kind=rk), intent(in) :: dt

public interface updatePositionEuler

  • public subroutine updatePositionEuler_MEM(this, dt)

    Update particle continuous position using Euler integration

    Arguments

    Type IntentOptional Attributes Name
    type(mus_particle_MEM_type), intent(inout) :: this
    real(kind=rk), intent(in) :: dt

    Time step

  • public subroutine updatePositionEuler_DPS(this, dt)

    Update particle continuous position using Euler integration

    Arguments

    Type IntentOptional Attributes Name
    type(mus_particle_DPS_type), intent(inout) :: this
    real(kind=rk), intent(in) :: dt

    Time step

public interface updateVelocityEuler

  • public subroutine updateVelocityEuler_MEM(this, dt)

    Update particle velocity according to current forces on particle using Euler integration

    Arguments

    Type IntentOptional Attributes Name
    type(mus_particle_MEM_type), intent(inout) :: this
    real(kind=rk), intent(in) :: dt

    Time step

  • public subroutine updateVelocityEuler_DPS(this, dt)

    Update particle velocity according to current forces on particle using Euler integration

    Arguments

    Type IntentOptional Attributes Name
    type(mus_particle_DPS_type), intent(inout) :: this
    real(kind=rk), intent(in) :: dt

    Time step

public interface updateVelocityVerlet

  • public subroutine updateVelocityVerlet_MEM(this, dt)

    Update particle velocity using Verlet integration

    Arguments

    Type IntentOptional Attributes Name
    type(mus_particle_MEM_type), intent(inout) :: this
    real(kind=rk), intent(in) :: dt
  • public subroutine updateVelocityVerlet_DPS(this, dt)

    Update particle velocity using Verlet integration

    Arguments

    Type IntentOptional Attributes Name
    type(mus_particle_DPS_type), intent(inout) :: this
    real(kind=rk), intent(in) :: dt

public interface DEM_swapFnowFnext

  • public subroutine DEM_swapFnowFnext_MEM(this)

    Swap the indices of Fnow and Fnext pointing to the force at the current and next time step respectively

    Arguments

    Type IntentOptional Attributes Name
    type(mus_particle_MEM_type), intent(inout) :: this
  • public subroutine DEM_swapFnowFnext_DPS(this)

    Swap the indices of Fnow and Fnext pointing to the force at the current and next time step respectively

    Arguments

    Type IntentOptional Attributes Name
    type(mus_particle_DPS_type), intent(inout) :: this

Functions

public function computeWallForce_DPS(this, boundaryData, eps, kn, dn) result(Fwall)

Routine for computing the collision force between particles and walls for the case of a simple prismatic domain with walls aligned with the Cartesian axes.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_DPS_type), intent(inout) :: this

Particle to collide

type(mus_particle_boundarydata_type) :: boundaryData

Boundary data containing information on wall location

real(kind=rk), intent(in) :: eps

Threshold gap at which to call it a collision

real(kind=rk), intent(in) :: kn

Spring coefficient

real(kind=rk), intent(in) :: dn

Damping coefficient

Return Value real(kind=rk), (3)


Subroutines

public subroutine DEMSubcycles_MEM(particleGroup, scheme, geometry, params, Nsubcycles)

DEMsubcycles runs Nsubcycles time integration steps per LBM time step In this routine simple Forward Euler integration of particle position and velocity is used.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: particleGroup

Array of particles

type(mus_scheme_type), intent(inout) :: scheme

Scheme for access to leveldescriptor

type(mus_geom_type), intent(in) :: geometry

Geometry for access to tree

type(mus_param_type), intent(in) :: params

Params for access to dt, dx, etc.

integer, intent(in) :: Nsubcycles

Number of subcycles

public subroutine DEMSubcycles_DPS(particleGroup, scheme, geometry, params, Nsubcycles)

DEMsubcycles runs Nsubcycles time integration steps per LBM time step In this routine velocity verlet integration of particle position and velocity is used.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: particleGroup

Array of particles

type(mus_scheme_type), intent(inout) :: scheme

Scheme for access to leveldescriptor

type(mus_geom_type), intent(in) :: geometry

Geometry for access to tree

type(mus_param_type), intent(in) :: params

Params for access to dt, dx, etc.

integer, intent(in) :: Nsubcycles

Number of subcycles

public subroutine DEMSubcycles_DPS_onewaycoupled(particleGroup, scheme, geometry, params, Nsubcycles)

DEMsubcycles runs Nsubcycles time integration steps per LBM time step In this routine velocity verlet integration of particle position and velocity is used. This routine is for one-way coupled DPS particles.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: particleGroup

Array of particles

type(mus_scheme_type), intent(inout) :: scheme

Scheme for access to leveldescriptor

type(mus_geom_type), intent(in) :: geometry

Geometry for access to tree

type(mus_param_type), intent(in) :: params

Params for access to dt, dx, etc.

integer, intent(in) :: Nsubcycles

Number of subcycles

public subroutine updatePositionEuler_MEM(this, dt)

Update particle continuous position using Euler integration

Arguments

Type IntentOptional Attributes Name
type(mus_particle_MEM_type), intent(inout) :: this
real(kind=rk), intent(in) :: dt

Time step

public subroutine updatePositionEuler_DPS(this, dt)

Update particle continuous position using Euler integration

Arguments

Type IntentOptional Attributes Name
type(mus_particle_DPS_type), intent(inout) :: this
real(kind=rk), intent(in) :: dt

Time step

public subroutine updateVelocityEuler_MEM(this, dt)

Update particle velocity according to current forces on particle using Euler integration

Arguments

Type IntentOptional Attributes Name
type(mus_particle_MEM_type), intent(inout) :: this
real(kind=rk), intent(in) :: dt

Time step

public subroutine updateVelocityEuler_DPS(this, dt)

Update particle velocity according to current forces on particle using Euler integration

Arguments

Type IntentOptional Attributes Name
type(mus_particle_DPS_type), intent(inout) :: this
real(kind=rk), intent(in) :: dt

Time step

public subroutine updatePositionVerlet_MEM(this, dt)

Update particle position using Verlet integration

Arguments

Type IntentOptional Attributes Name
type(mus_particle_MEM_type), intent(inout) :: this
real(kind=rk), intent(in) :: dt

public subroutine updatePositionVerlet_DPS(this, dt)

Update particle position using Verlet integration

Arguments

Type IntentOptional Attributes Name
type(mus_particle_DPS_type), intent(inout) :: this
real(kind=rk), intent(in) :: dt

public subroutine updateVelocityVerlet_MEM(this, dt)

Update particle velocity using Verlet integration

Arguments

Type IntentOptional Attributes Name
type(mus_particle_MEM_type), intent(inout) :: this
real(kind=rk), intent(in) :: dt

public subroutine updateVelocityVerlet_DPS(this, dt)

Update particle velocity using Verlet integration

Arguments

Type IntentOptional Attributes Name
type(mus_particle_DPS_type), intent(inout) :: this
real(kind=rk), intent(in) :: dt

public subroutine updateParticleForces(particleGroup, scheme, geometry, params, boundaryData)

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: particleGroup

Array of particles

type(mus_scheme_type), intent(inout) :: scheme

Scheme for access to leveldescriptor

type(mus_geom_type), intent(in) :: geometry

Geometry for access to tree

type(mus_param_type), intent(in) :: params

Params for access to dt, dx, etc.

type(mus_particle_boundarydata_type) :: boundaryData

Domain boundary information for particle-wall collisions

public subroutine DEM_computeLocalCollisionForces(particleGroup, myRank, eps, Tc, mu)

Compute collision forces using Discrete Element Method between particles local to this process i.e. both particles are owned by this process.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: particleGroup

particleGroup to search for collisions in

integer, intent(in) :: myRank

This proc's rank

real(kind=rk), intent(in) :: eps

Threshold gap at which to call it a collision

real(kind=rk), intent(in) :: Tc

DEM collision time, used for calculating spring and damper coefficients

real(kind=rk), intent(in) :: mu

Fluid dynamic viscosity (physical units)

public subroutine DEM_computeLocalCollisionForces_DPS(particleGroup, myRank, eps, Tc, mu)

Compute collision forces using Discrete Element Method between particles local to this process i.e. both particles are owned by this process.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: particleGroup

particleGroup to search for collisions in

integer, intent(in) :: myRank

This proc's rank

real(kind=rk), intent(in) :: eps

Threshold gap at which to call it a collision

real(kind=rk), intent(in) :: Tc

DEM collision time, used for calculating spring and damper coefficients

real(kind=rk), intent(in) :: mu

Fluid dynamic viscosity, in physical units

public subroutine DEM_computeRemoteCollisionForces(particleGroup, myRank, eps, Tc, mu)

Compute collision forces using Discrete Element Method between particle pairs where particles belong to different processes.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: particleGroup

particleGroup to search for collisions in

integer, intent(in) :: myRank

This proc's rank

real(kind=rk), intent(in) :: eps

Threshold gap at which to call it a collision

real(kind=rk), intent(in) :: Tc

DEM collision time, used for calculating spring and damper coefficients

real(kind=rk), intent(in) :: mu

Fluid dynamic viscosity, physical units

public subroutine DEM_computeRemoteCollisionForces_DPS(particleGroup, myRank, eps, Tc, mu)

Compute collision forces using Discrete Element Method between particle pairs where particles belong to different processes.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: particleGroup

particleGroup to search for collisions in

integer, intent(in) :: myRank

This proc's rank

real(kind=rk), intent(in) :: eps

Threshold gap at which to call it a collision

real(kind=rk), intent(in) :: Tc

DEM collision time, used for calculating spring and damper coefficients

real(kind=rk), intent(in) :: mu

Fluid dynamic viscosity, physical units

public subroutine DEM_computeExternalForces(particleGroup)

DEM_computeExternalForces adds the non-DEM forces (including hydrodynamic force from the LBM) to F_DEM which is used to update velocity within the DEM subcycle.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: particleGroup

particleGroup to search for collisions in

public subroutine computeHydroForces_DPS(particleGroup, nu, myRank)

DEM_computeExternalForces adds the non-DEM forces (including hydrodynamic force from the LBM) to F_DEM which is used to update velocity within the DEM subcycle.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: particleGroup

particleGroup to search for collisions in

real(kind=rk), intent(in) :: nu

Fluid dynamic viscosity (physical units) for computing hydro forces

integer, intent(in) :: myRank

This process rank

public subroutine DEM_computeExternalForces_DPS_oneway(particleGroup, nu, myRank)

DEM_computeExternalForces adds the non-DEM forces (including hydrodynamic force from the LBM) to F_DEM which is used to update velocity within the DEM subcycle.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: particleGroup

particleGroup to search for collisions in

real(kind=rk), intent(in) :: nu

Fluid dynamic viscosity (physical units) for computing hydro forces

integer, intent(in) :: myRank

This process rank

public subroutine DEM_computeWallForces_DPS(particleGroup, boundaryData, eps, Tc, myRank)

DEM_computeWallForces_DPS computes the forces on particles as a result of collisions with walls described in the boundaryData object. These forces are only computed for particles owned by this process.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: particleGroup

particleGroup to search for collisions in

type(mus_particle_boundarydata_type), intent(in) :: boundaryData

Data about particle domain boundaries

real(kind=rk), intent(in) :: eps

threshold at which gap to call it a collision

real(kind=rk), intent(in) :: Tc

Collision time

integer, intent(in) :: myRank

This process rank

public subroutine DEM_fillNeighborList(particleGroup, d0)

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: particleGroup

particleGroup

real(kind=rk), intent(in) :: d0

Radius of search area: particles closer than this distance will be added to the neighbor list

public subroutine DEM_storeWallPositions_MEM(particleGroup, scheme, geometry, params, Tc, eps)

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: particleGroup

particleGroup

type(mus_scheme_type), intent(inout) :: scheme

Scheme for access to leveldescriptor

type(mus_geom_type), intent(in) :: geometry

Geometry for access to tree

type(mus_param_type), intent(in) :: params

Params for access to dt, dx, etc.

real(kind=rk) :: Tc

Collision time

real(kind=rk) :: eps

Threshold gap for DEM collisions

public subroutine DEM_swapFnowFnext_MEM(this)

Swap the indices of Fnow and Fnext pointing to the force at the current and next time step respectively

Arguments

Type IntentOptional Attributes Name
type(mus_particle_MEM_type), intent(inout) :: this

public subroutine DEM_swapFnowFnext_DPS(this)

Swap the indices of Fnow and Fnext pointing to the force at the current and next time step respectively

Arguments

Type IntentOptional Attributes Name
type(mus_particle_DPS_type), intent(inout) :: this

public subroutine DEM_resetFnext_MEM(particleGroup)

Reset the force at the next time step to 0

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: particleGroup

particleGroup to reset F_DEM(F_DEM_next,:) for

public subroutine DEM_resetFnext_DPS(particleGroup)

Reset the force at the next time step to 0

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: particleGroup

particleGroup to reset F_DEM(F_DEM_next,:) for