BlockForce¶
- class hoomd.mpcd.force.BlockForce(force, separation=None, width=None)¶
Bases:
BodyForceBlock force.
- Parameters:
The
forcemagnitude F is applied in the x direction on the MPCD particles in blocks defined along the y direction by theseparationand thewidth. The force in x is in the upper block, in the lower block, and zero otherwise.The
BlockForcecan be used to implement the double-parabola method for measuring viscosity using separation and width , where is the size of the simulation box in y.Warning
You should define the blocks to lie fully within the simulation box and to not overlap each other.
Example:
Block force for double-parabola method.
Ly = simulation.state.box.Ly force = hoomd.mpcd.force.BlockForce( force=1.0, separation=Ly/2, width=Ly/2) stream = hoomd.mpcd.stream.Bulk(period=1, mpcd_particle_force=force) simulation.operations.integrator.streaming_method = stream
- separation¶
Distance between the centers of the blocks.
Example:
Ly = simulation.state.box.Ly force.separation = Ly / 2
- Type: