mpcd.geometry¶
Overview
Geometry. |
|
Parallel-plate channel. |
|
Pore with parallel plate opening. |
|
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:
Bounce-back streaming for MPCD particles (
hoomd.mpcd.stream.BounceBack)Bounce-back integration for MD particles (
hoomd.mpcd.methods.BounceBack)Virtual particle filling (
hoomd.mpcd.fill.GeometryFiller)
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:
- class hoomd.mpcd.geometry.ParallelPlates(separation, speed=0.0, no_slip=True)¶
Bases:
GeometryParallel-plate channel.
- Parameters:
ParallelPlatesconfines particles between two infinite parallel plates centered around the origin. The plates are placed at \(y=-H\) and \(y=+H\), where the totalseparationis \(2H\). The plates may be put into motion withspeedV, 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
- class hoomd.mpcd.geometry.PlanarPore(separation, length, no_slip=True)¶
Bases:
GeometryPore with parallel plate opening.
- Parameters:
PlanarPoreis a finite-length version ofParallelPlates. The geometry is similar, except that the plates extend from \(x=-L\) to \(x=+L\) (totallength2L). 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
- class hoomd.mpcd.geometry.Sphere(radius, no_slip=True)¶
Bases:
GeometrySpherical confinement.
- Parameters:
Sphereconfines particles inside a sphere ofradius\(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