md.mesh.conservation

Overview

Area

Area conservation potential.

TriangleArea

Triangle Area conservation potential.

Volume

Volume conservation potential.

Details

Mesh Conservation potential.

Mesh conservation force classes apply a force and virial to every mesh vertex particle based on a global or local quantity \(A\) of the given mesh triangulation \(T\).

\[U_\mathrm{conservation} = U(A(T))\]

See also

See the documentation in hoomd.mesh.Mesh for more information on the initialization of the mesh object.

class hoomd.md.mesh.conservation.Area(mesh, ignore_type=False)

Bases: MeshConservationPotential

Area conservation potential.

Area specifies a global area conservation energy for each mesh type.

\[U_t = k \frac{ (A_t - A_{0,t} )^2}{2 \cdot A_0}\]

with \(A_t\) is the instantaneous total area of all triangles of type \(t\).

Parameters:
  • mesh (hoomd.mesh.Mesh) – Mesh data structure.

  • ignore_type (bool, optional) – ignores mesh type if set to True and calculates the conservation energy considering all triangles in the mesh. Defaults to False.

parameter

The parameter of the area conservation for each mesh type. The dictionary has the following keys:

  • k (float, required) - bending stiffness \([\mathrm{energy} \cdot \mathrm{length}^{-2}]\)

  • A0 (float, required) - targeted global surface area \([\mathrm{length}]^2]\)

Type:

TypeParameter[dict]

Example:

area_conservation_potential = hoomd.md.mesh.conservation.Area(mesh)
area_conservation_potential.params["mesh"] = dict(k=10.0, A0=250)
property area

Area of the mesh triangulation.

(Loggable: category=”scalar”)

class hoomd.md.mesh.conservation.TriangleArea(mesh)

Bases: MeshPotential

Triangle Area conservation potential.

TriangleArea specifies an area conservation energy by applying an area constraint to each triangle of the mesh.

\[U(r) = k \sum_{i,j,k \in \mathrm{mesh{ }triangle}} \frac{( N_\mathrm{tri} \cdot A_{ijk} - A_0 )^2} {2 \cdot A_0 \cdot N_\mathrm{tri}}\]

The potential sums over the area \(A_{ijk}\) of all triplets \(i\), \(j\) and \(k\) that make up a triangle in the mesh. The number of triangles in the mesh are symbolized by \(N_\mathrm{tri}\).

Parameters:

mesh (hoomd.mesh.Mesh) – Mesh data structure.

parameter

The parameter of the triangle area conservation for each mesh type. The dictionary has the following keys:

  • k (float, required) - area conservation coefficient \([\mathrm{energy} \cdot \mathrm{length}^{-2}]\)

  • A0 (float, required) - target surface area of a single triangle in the mesh \([\mathrm{length}]^2\)

Type:

TypeParameter[dict]

Example:

tringle_area_conservation_potential = \
    hoomd.md.mesh.conservation.TriangleArea(mesh)
tringle_area_conservation_potential.params["mesh"] = dict(k=10.0, A0=250)
property area

Area of the mesh triangulation.

(Loggable: category=”scalar”)

class hoomd.md.mesh.conservation.Volume(mesh, ignore_type=False)

Bases: MeshConservationPotential

Volume conservation potential.

Volume specifies a volume constraint on the whole mesh surface:

\[U(r) = k \frac{( V(r) - V_0 )^2}{2 \cdot V_0}\]
Parameters:
  • mesh (hoomd.mesh.Mesh) – Mesh data structure.

  • ignore_type (bool, optional) – ignores mesh type if set to True and calculates the conservation energy considering all triangles in the mesh. Defaults to False.

parameter

The parameter of the volume constraint for the defined mesh. The dictionary has the following keys:

  • k (float, required) - potential constant \([\mathrm{energy} \cdot \mathrm{length}^{-3}]\)

  • V0 (float, required) - target volume \([\mathrm{length}^{3}]\)

Type:

TypeParameter[dict]

Example:

volume = hoomd.md.mesh.conservation.Volume(mesh)
volume.params["mesh"] = dict(k=10.0, V0=100)
property volume

Volume of the mesh triangulation.

(Loggable: category=”scalar”)