BounceBack

class hoomd.mpcd.methods.BounceBack(filter, geometry)

Bases: Method

Velocity Verlet integration method with bounce-back from surfaces.

Parameters:

A bounce-back method for integrating solutes (MD particles) embedded in an MPCD fluid. The integration scheme is velocity Verlet with bounce-back performed at the solid boundaries defined by a geometry, as in hoomd.mpcd.stream.BounceBack. This gives a simple approximation of the interactions required to keep a solute bounded in a geometry, and more complex interactions can be specified, for example, by writing custom external fields.

Similar caveats apply to these methods as for hoomd.mpcd.stream.BounceBack. In particular:

  1. The simulation box is periodic, but the geometry may impose non-periodic boundary conditions. You must ensure that the box is sufficiently large to enclose the geometry and that all particles lie inside it

  2. You must also ensure that particles do not self-interact through the periodic boundaries. This is usually achieved for simple pair potentials by padding the box size by the largest cutoff radius. Failure to do so may result in unphysical interactions.

  3. Bounce-back rules do not always enforce no-slip conditions at surfaces properly. It may still be necessary to add additional “ghost” MD particles in the surface to achieve the right boundary conditions and reduce density fluctuations.

Warning

This method does not support anisotropic integration because torques are not computed for collisions with the boundary. Rigid bodies will also not be treated correctly because the integrator is not aware of the extent of the particles. The surface reflections are treated as point particles. These conditions are too complicated to validate easily, so it is the user’s responsibility to choose the filter correctly.

Example:

plates = hoomd.mpcd.geometry.ParallelPlates(separation=6.0)
nve = hoomd.mpcd.methods.BounceBack(
    filter=hoomd.filter.All(), geometry=plates
)
simulation.operations.integrator.methods.append(nve)

Members inherited from AutotunedObject:

property kernel_parameters

Kernel parameters. Read more...

property is_tuning_complete

Check if kernel parameter tuning is complete. Read more...

tune_kernel_parameters()

Start tuning kernel parameters. Read more...


Members defined in BounceBack:

filter

Subset of particles on which to apply this method (read only).

Type:

hoomd.filter.filter_like

geometry

Surface to bounce back from (read only).

Type:

hoomd.mpcd.geometry.Geometry

check_particles()

Check if particles are inside geometry.

This method can only be called after this object is attached to a simulation.

Returns:

True if all particles are inside geometry.

Example:

assert nve.check_particles()