> For the complete documentation index, see [llms.txt](https://tlcfem.gitbook.io/suanpan-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tlcfem.gitbook.io/suanpan-manual/constraint/fixedlength.md).

# FixedLength

The Lagrange multiplier method can be used to define constraints. Extra storage is required for the so-called auxiliary border stiffness matrix. The constraint is satisfied exactly.

The `FixedLength2D` and `FixedLength3D` constraints behave similarly to the `Tie` element; the nonlinear constraint is implemented via the Lagrange multiplier method.

The position $$\mathbf{x}$$ of a given node can be expressed as the summation of coordinate $$\mathbf{d}$$ and displacement $$\mathbf{u}$$.

$$
\mathbf{x}=\mathbf{d}+\mathbf{u}.
$$

The constraint enforces that

$$
\Big|\mathbf{x}\_i-\mathbf{x}\_j\Big|=\Big|\mathbf{d}\_i-\mathbf{d}\_j\Big|.
$$

It shall not be used with global damping models in dynamic analysis since it alters the frequency distribution, leading to an unintended damping response. Only damping models that do not depend on system properties can be used.

## Syntax

```
fixedlength2d (1) (2) (3)
fixedlength3d (1) (2) (3)
constraint fixedlength2d (1) (2) (3)
constraint fixedlength3d (1) (2) (3)
# (1) int, unique constraint tag
# (2) int, node tag
# (3) int, node tag
```

## Example

![two cantilever beams](https://1124082496-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEquxr3H9WpPg4iPvT2mB%2Fuploads%2Fgit-blob-c1dfd2f242516289ca9c11e2aa6f6262744f6d60%2FFixedLength.gif?alt=media)

A vertical load is applied to the free end of the top beam. The free ends of the two beams are connected by a `FixedLength2D` constraint.

```
node 1 0 0
node 2 1 0
node 11 .2 0
node 12 .4 0
node 13 .6 0
node 14 .8 0

node 3 1 -.2
node 4 2 -.2
node 21 1.2 -.2
node 22 1.4 -.2
node 23 1.6 -.2
node 24 1.8 -.2

material Elastic1D 1 10

element EB21 1 1 11 12 1 1 1
element EB21 2 11 12 12 1 1 1
element EB21 3 12 13 12 1 1 1
element EB21 4 13 14 12 1 1 1
element EB21 5 14 2 12 1 1 1

element EB21 6 3 21 12 1 1 1
element EB21 7 21 22 12 1 1 1
element EB21 8 22 23 12 1 1 1
element EB21 9 23 24 12 1 1 1
element EB21 10 24 4 12 1 1 1

fix2 1 E 1 4

constraint FixedLength2D 2 2 3

cload 1 0 10 2 2

step static 1 1
set ini_step_size 1E-2
set fixed_step_size true
set symm_mat false

converger RelIncreDisp 1 1E-10 10 1

analyze

exit
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://tlcfem.gitbook.io/suanpan-manual/constraint/fixedlength.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
