OpenMPCD
LeesEdwardsBoundaryConditions.hpp
Go to the documentation of this file.
1 /**
2  * @file
3  * Defines Host functions for Lees-Edwards boundary conditions.
4  */
5 
6 #ifndef OPENMPCD_LEESEDWARDSBOUNDARYCONDITIONS_HPP
7 #define OPENMPCD_LEESEDWARDSBOUNDARYCONDITIONS_HPP
8 
9 #include <OpenMPCD/Types.hpp>
10 #include <OpenMPCD/Vector3D.hpp>
11 
12 /**
13  * @page LeesEdwardsBoundaryConditions Lees-Edwards Boundary Conditions
14  *
15  * The Lees-Edwards boundary conditions are described in chapter 8.2 of
16  * "Computer Simulation of Liquids" by M. P. Allen and D. J. Tildesley,
17  * Oxford Science Publications,
18  * as well as
19  * "Multiparticle collision dynamics simulations of viscoelastic fluids:
20  * Shear-thinning Gaussian dumbbells" by Bartosz Kowalik and Roland G. Winkler,
21  * The Journal of Chemical Physics 138, 104903 (2013), DOI:10.1063/1.4792196.
22  *
23  * In this software, it is assumed that the primary simulation volume is
24  * replicated along all three of the `x`, `y`, and `z` axes of the Cartesian
25  * coordinate system. Images (including the primary simulation volume) that
26  * are adjacent to one another along the `y` direction are moving such
27  * that the image at larger `y` coordinate values has a relative
28  * velocity along the `x` direction of \f$ \Delta v_x = \dot{\gamma} L_y \f$
29  * with respect to the other image at lower `y`, where \f$ \dot{\gamma} \f$ is
30  * the shear rate, and \f$ L_y \f$ is the size of the primary simulation volume
31  * along the `y` axis.
32  */
33 
34 namespace OpenMPCD
35 {
36  /**
37  * Returns the image of the given particle position under Lees-Edwards
38  * boundary conditions.
39  *
40  * @see LeesEdwardsBoundaryConditions
41  *
42  * @throw OpenMPCD::NULLPointerException
43  * If `OPENMPCD_DEBUG` is defined, throws if
44  * `velocityCorrection == nullptr`.
45  * @param[in] position The particle position.
46  * @param[in] mpcTime The simulation time for the MPC steps.
47  * @param[in] shearRate The applied shear rate.
48  * @param[in] simBoxX The size of the primary simulation box
49  * along the x direction.
50  * @param[in] simBoxY The size of the primary simulation box
51  * along the y direction.
52  * @param[in] simBoxZ The size of the primary simulation box
53  * along the z direction.
54  * @param[out] velocityCorrection Set to the velocity along the x direction
55  * that needs to be added to the particle's
56  * velocity.
57  */
58  const Vector3D<MPCParticlePositionType>
60  const Vector3D<MPCParticlePositionType>& position,
61  const FP mpcTime,
62  const FP shearRate,
63  const unsigned int simBoxX, const unsigned int simBoxY, const unsigned int simBoxZ,
64  MPCParticleVelocityType* const velocityCorrection);
65 
66 } //namespace OpenMPCD
67 
68 #endif //OPENMPCD_LEESEDWARDSBOUNDARYCONDITIONS_HPP
Vector3D.hpp
Types.hpp
OpenMPCD::CUDA::DeviceCode::getImageUnderLeesEdwardsBoundaryConditions
const __device__ Vector3D< MPCParticlePositionType > getImageUnderLeesEdwardsBoundaryConditions(const FP mpcTime, const Vector3D< MPCParticlePositionType > &position, MPCParticleVelocityType &velocityCorrection)
Returns the image of the given particle position under Lees-Edwards boundary conditions.