mpcd.geometry

Overview

Geometry

Geometry.

ParallelPlates

Parallel-plate channel.

PlanarPore

Pore with parallel plate opening.

Sphere

Spherical confinement.

Details

MPCD geometries.

A geometry defines solid boundaries that cannot be penetrated. These geometries are used for various operations in the MPCD algorithm including:

Each geometry may put constraints on the size of the simulation and where particles are allowed. These constraints will be documented by each object.

class hoomd.mpcd.geometry.Geometry(no_slip)

Bases:

Geometry.

Parameters:

no_slip (bool) – If True, surfaces have a no-slip boundary condition. Otherwise, they have a slip boundary condition.

no_slip

If True, plates have a no-slip boundary condition. Otherwise, they have a slip boundary condition (read only).

A no-slip boundary condition means that the average velocity is zero at the surface. A slip boundary condition means that the average normal velocity is zero at the surface, but there is no friction against the tangential velocity.

Type:

bool

class hoomd.mpcd.geometry.ParallelPlates(separation, speed=0.0, no_slip=True)

Bases: Geometry

Parallel-plate channel.

Parameters:
  • separation (float) – Distance between plates.

  • speed (float) – Wall speed.

  • no_slip (bool) – If True, surfaces have no-slip boundary condition. Otherwise, they have the slip boundary condition.

ParallelPlates confines particles between two infinite parallel plates centered around the origin. The plates are placed at \(y=-H\) and \(y=+H\), where the total separation is \(2H\). The plates may be put into motion with speed V, having velocity \(-V\) and \(+V\) in the x direction, respectively. If combined with a no-slip boundary condition, this motion can be used to generate simple shear flow.

Examples:

Stationary parallel plates with no-slip boundary condition.

plates = hoomd.mpcd.geometry.ParallelPlates(separation=6.0)
stream = hoomd.mpcd.stream.BounceBack(period=1, geometry=plates)
simulation.operations.integrator.streaming_method = stream

Stationary parallel plates with slip boundary condition.

plates = hoomd.mpcd.geometry.ParallelPlates(
    separation=6.0, no_slip=False)
stream = hoomd.mpcd.stream.BounceBack(period=1, geometry=plates)
simulation.operations.integrator.streaming_method = stream

Moving parallel plates.

plates = hoomd.mpcd.geometry.ParallelPlates(
    separation=6.0, speed=1.0, no_slip=True)
stream = hoomd.mpcd.stream.BounceBack(period=1, geometry=plates)
simulation.operations.integrator.streaming_method = stream
separation

Distance between plates (read only).

Type:

float

speed

Wall speed (read only).

speed will have no effect if no_slip is False because the slip surface cannot generate shear stress.

Type:

float

class hoomd.mpcd.geometry.PlanarPore(separation, length, no_slip=True)

Bases: Geometry

Pore with parallel plate opening.

Parameters:
  • separation (float) – Distance between pore walls.

  • length (float) – Pore length.

  • no_slip (bool) – If True, surfaces have no-slip boundary condition. Otherwise, they have the slip boundary condition.

PlanarPore is a finite-length version of ParallelPlates. The geometry is similar, except that the plates extend from \(x=-L\) to \(x=+L\) (total length 2L). Additional solid walls with normals in x prevent penetration into the regions above / below the plates. The plates are infinite in z. Outside the pore, the simulation box has full periodic boundaries; it is not confined by any walls. This model hence mimics a narrow pore in, e.g., a membrane.

Example:

pore = hoomd.mpcd.geometry.PlanarPore(separation=6.0, length=4.0)
stream = hoomd.mpcd.stream.BounceBack(period=1, geometry=pore)
simulation.operations.integrator.streaming_method = stream
separation

Distance between pore walls (read only).

Type:

float

length

Pore length (read only).

Type:

float

class hoomd.mpcd.geometry.Sphere(radius, no_slip=True)

Bases: Geometry

Spherical confinement.

Parameters:
  • radius (float) – Radius of sphere.

  • no_slip (bool) – If True, surfaces have no-slip boundary condition. Otherwise, they have the slip boundary condition.

Sphere confines particles inside a sphere of radius \(R\) centered at the origin.

Examples:

Sphere with no-slip boundary condition.

sphere = hoomd.mpcd.geometry.Sphere(radius=5.0)
stream = hoomd.mpcd.stream.BounceBack(period=1, geometry=sphere)
simulation.operations.integrator.streaming_method = stream

Sphere with slip boundary condition.

sphere = hoomd.mpcd.geometry.Sphere(radius=5.0, no_slip=False)
stream = hoomd.mpcd.stream.BounceBack(period=1, geometry=sphere)
simulation.operations.integrator.streaming_method = stream
radius

Radius of sphere (read only).

Type:

float