BlockForce¶
- class hoomd.mpcd.force.BlockForce(force, separation=None, width=None)¶
Bases:
BodyForce
Block force.
- Parameters:
The
force
magnitude F is applied in the x direction on the MPCD particles in blocks defined along the y direction by theseparation
and thewidth
. The force in x is in the upper block, in the lower block, and zero otherwise.The
BlockForce
can 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: