mpcd.geometry¶
Overview
Geometry. |
|
Serpentine (sinusoidal) channel. |
|
Channel with sinusoidal expansion and contraction. |
|
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.CosineChannel(amplitude, repeat_length, separation, no_slip=True)¶
Bases:
GeometrySerpentine (sinusoidal) channel.
- Parameters:
CosineChannelmodels a fluid confined in \(y\) between two walls described by a sinusoidal profile with equations\[y(x) = A \cos\left(\frac{2 \pi x}{L}\right) \pm H\]where \(A\) is the
amplitude, \(L\) is therepeat_length, and \(2H\) is theseparation.Example:
channel = hoomd.mpcd.geometry.CosineChannel( amplitude=2.0, separation=4.0, repeat_length=10.0) stream = hoomd.mpcd.stream.BounceBack(period=1, geometry=channel) simulation.operations.integrator.streaming_method = stream
- class hoomd.mpcd.geometry.CosineExpansionContraction(expansion_separation, contraction_separation, repeat_length, no_slip=True)¶
Bases:
GeometryChannel with sinusoidal expansion and contraction.
- Parameters:
expansion_separation (float) – Maximum distance between channel walls.
contraction_separation (float) – Minimum distance between channel walls.
repeat_length (float) – Repeat length (period) of cosine.
no_slip (bool) – If True, surfaces have no-slip boundary condition. Otherwise, they have the slip boundary condition.
CosineExpansionContractionmodels a fluid confined in \(y\) between two walls described by a sinusoidal profile with equations\[y(x) = \pm\left( \frac{H_{\rm e}-H_{\rm c}}{2} \left[1+\cos\left(\frac{2 \pi x}{L}\right)\right] + H_{\rm c} \right)\]where \(2 H_{\rm e}\) is the
expansion_separation, \(2 H_{\rm c}\) is thecontraction_separation, and \(L\) is therepeat_length.Example:
channel = hoomd.mpcd.geometry.CosineExpansionContraction( expansion_separation=6.0, contraction_separation=3.0, repeat_length=10.0) stream = hoomd.mpcd.stream.BounceBack(period=1, geometry=channel) simulation.operations.integrator.streaming_method = stream
- contraction_separation¶
Distance between channel walls at the minimum contraction (read only).
- Type:
- expansion_separation¶
Distance between channel walls at the maximum expansion (read only).
- Type:
- 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