SineForce¶
- class hoomd.mpcd.force.SineForce(amplitude, wavenumber)¶
Bases:
BodyForce
Sine force.
- Parameters:
SineForce
applies a force with amplitude F in x that is sinusoidally varying in y with wavenumber k to all MPCD particles:\[\mathbf{F}(\mathbf{r}) = F \sin (k r_y) \mathbf{e}_x\]Typically, the wavenumber should be something that is commensurate with the simulation box. For example, \(k = 2\pi/L_y\) will generate one period of the sine.
Example:
Sine force with one period.
Ly = simulation.state.box.Ly force = hoomd.mpcd.force.SineForce( amplitude=1.0, wavenumber=2 * numpy.pi / Ly ) stream = hoomd.mpcd.stream.Bulk(period=1, mpcd_particle_force=force) simulation.operations.integrator.streaming_method = stream