MEDYAN.Boundary
Union{}
Mechanical boundary
A set of soft planes and capsules that push beads back inside the domain. Apply it with set_mech_boundary!.
Rather than filling in the fields by hand, use one of the constructors:
boundary_box: planes at the edges of aCubicGrid.boundary_plane: a single plane.boundary_capsule: a sphere or capsule, inside or outside.boundary_cylinder: a cylinder with flat ends.
Combine boundaries with ∩. Boundary() is the empty boundary, which applies no forces.
planes::Vector{StaticArraysCore.SVector{4, Float64}}: Planes that make up the mechanical boundary of the simulation.E = 1//2 * relu(pos ⋅ planes[bi][1:3] - planes[bi][4])^2For example, a mech bounding plane
[1,0,0,3]would try and make x < 3 nm with a spring constant of 1 pN/nm.2.0*[1,0,0,3]would try and make x < 3 nm with a spring constant of 4 pN/nm.plane_layers::Vector{UInt32}: Collision layers for each plane. Empty for chemical boundaries.plane_ncmask::Vector{UInt32}: No-collide mask for each plane. Empty for chemical boundaries.capsules::Vector{StaticArraysCore.SVector{8, Float64}}: Capsules that make up the mechanical boundary of the simulation.capsules[bi][1:3]is the starting point of the spine line segment (nm).capsules[bi][4:6]is the axis of the spine line segment (nm).capsules[bi][7]is the radius (nm). If the radius is negative, the domain is the outside of the capsule, if the radius is positive the domain is inside the capsule.capsules[bi][8]is the spring constant (pN/nm).if
capsules[bi][4:6]is zero then the capsule is a sphere. Capsule boundaries can be combined with plane boundaries to create cylinder boundaries.E = 1//2*k*relu(sign(r0)*d - r0)^2where:- d is the distance of the point to the spine line segment described by capsules[bi][1:6].
- r0 is capsules[bi][7]
- k is capsules[bi][8]
capsule_layers::Vector{UInt32}: Collision layers for each capsule. Empty for chemical boundaries.capsule_ncmask::Vector{UInt32}: No-collide mask for each capsule. Empty for chemical boundaries.