LeesEdwardsBoxDeformer¶
- class hoomd.md.deform.LeesEdwardsBoxDeformer(shear_rate, max_tilt=0.5)¶
Bases:
BoxDeformerBox deformation with Lees-Edwards boundary conditions.
- Parameters:
LeesEdwardsBoxDeformerapplies Lees-Edwards boundary conditions to impose a homogeneous shear flow in the simulation box by manipulating the box tilt factorxy.The box tilt deforms as
where is the imposed shear rate.
This produces a linear velocity profile
corresponding to a simple shear flow in the x-direction, with gradient in the y-direction.
The
max_tiltparameter controls when the simulation box is flipped to avoid excessive skew. When|xy| > max_tilt, the box is flipped (remapped by a lattice vector) to bring the tilt back into the range[-max_tilt, max_tilt].Box flipping and particle remap is mathematically equivalent to the original sheared system and does not affect the dynamics or measured properties, but it improves numerical stability and avoids highly distorted boxes.
Note
Values of
max_tiltaround 0.5 are commonly used and provide a good balance between minimizing remapping frequency and avoiding extreme box distortions.Smaller values lead to more frequent flips, while larger values may result in highly skewed boxes that can impact computational performance.
Members inherited from
AutotunedObject:- property kernel_parameters¶
Kernel parameters.
Read more...
- property is_tuning_complete¶
Check if kernel parameter tuning is complete.
Read more...
- tune_kernel_parameters()¶
Start tuning kernel parameters.
Read more...
Members inherited from
BoxDeformer:Members defined in
LeesEdwardsBoxDeformer:Example
Create the deformer and attach it to the
Integrator.deformer = hoomd.md.deform.LeesEdwardsBoxDeformer( shear_rate=0.01, max_tilt=0.5, ) integrator = hoomd.md.Integrator(dt=0.005, deformer=deformer)