BarAndHinge

class BarAndHinge : public minim::NewPotential<BarAndHinge>

The bar-and-hinge model for thin sheet buckling.

Represents an elastic sheet as a triangulated surface: bars (edges) stretch with energy \( k (l - l_0)^2 / 2 \), and hinges (pairs of adjacent triangles) bend with energy \( k (\theta - \theta_0)^2 / 2 \). Optionally includes substrate and external force interactions.

The bar and hinge lists are generated from a triangulation, or can be given explicitly. Rest lengths and angles are taken from the initial coordinates unless set.

Elastic properties

double modulus = 1

The elastic modulus.

double poissonRatio = 0.3

The Poisson ratio of the material.

BarAndHinge &setModulus(double modulus)

Set the elastic modulus.

BarAndHinge &setThickness(double thickness)

Set the sheet thickness.

BarAndHinge &setThickness(const vector<double> &thickness)

Set the sheet thickness per bar.

BarAndHinge &setRigidity(double kBond, double kHinge)

Set the stretching and bending rigidities.

BarAndHinge &setRigidity(const vector<double> &kBond, const vector<double> &kHinge)

Set the stretching and bending rigidities per bar and hinge.

BarAndHinge &setLength0(double length0)

Set the rest length of the bars.

BarAndHinge &setLength0(const vector<double> &length0)

Set the rest length of each bar.

BarAndHinge &setTheta0(double theta0)

Set the rest angle of the hinges.

BarAndHinge &setTheta0(const vector<double> &theta0)

Set the rest angle of each hinge.

Substrate interaction

bool wallOn = false

Whether the substrate (wall) interaction is enabled.

bool wallAdhesion = false

Whether adhesion to the substrate is enabled.

double lj_epsilon = 1e-12

The energy parameter of the substrate interaction.

double lj_sigma = 1e-5

The length parameter of the substrate interaction.

BarAndHinge &setWall(bool wallOn = true)

Enable or disable the substrate (wall) interaction.

BarAndHinge &setWallAdhesion(bool wallAdhesion = true)

Enable or disable adhesion to the substrate.

BarAndHinge &setWallParams(double epsilon, double sigma)

Set the substrate interaction parameters.

Structure

BarAndHinge &setTriangulation(const vector2d<int> &triList)

Set the triangulation used to generate the bar and hinge lists.

BarAndHinge &setBondList(const vector2d<int> &bondList)

Set the bars (edges) of the model, overriding the generated list.

BarAndHinge &setHingeList(const vector2d<int> &hingeList)

Set the hinges of the model, overriding the generated list.

External force

BarAndHinge &setForce(const vector<double> &force)

Set an external force on the nodes.

BarAndHinge &setForce(const vector2d<double> &force)

Set an external force on the nodes per bar.

Overrides

virtual void init(const vector<double> &coords) override

Initialise the potential with the coordinates of a new state.

virtual void elementEnergyGradient(const vector<double> &coords, const Element &el, double *e, vector<double> *g) const override

Compute the energy and gradient of a single element.