> 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/material/material1d/hysteresis/flag.md).

# Flag

Symmetric/Asymmetric Flag

Some self-centering and rocking systems show flag shaped hysteresis behavior. The `Flag01` model defines a symmetric flag shaped hysteresis rule. The `Flag02` model is an extension of the `Flag01` model and defines an asymmetric flag shaped hysteresis rule.

More flexible flag shaped hysteresis behavior can be achieved by combining multilinear elastic model with for example bilinear hardening model.

## Syntax

```
material Flag01 (1) (2) (3) (4) (5)
# (1) int, unique material tag
# (2) double, elastic modulus
# (3) double, yield stress, positive
# (4) double, residual stress, can be either positive or negative
# (5) double, hardening ratio

material Flag02 (1) (2) (3) (4) (5) (6) (7) (8)
# (1) int, unique material tag
# (2) double, elastic modulus
# (3) double, tension yield stress, positive
# (4) double, tension residual stress, can be either positive or negative
# (5) double, tension hardening ratio
# (6) double, compression yield stress, negative
# (7) double, compression residual stress, can be either positive or negative
# (8) double, compression hardening ratio
```

## History Variable Layout

| location             | value                             |
| -------------------- | --------------------------------- |
| `initial_history(0)` | tension\_reverse\_strain          |
| `initial_history(1)` | tension\_reverse\_low\_strain     |
| `initial_history(2)` | compression\_reverse\_strain      |
| `initial_history(3)` | compression\_reverse\_low\_strain |

## Remarks

1. `Flag01` is a wrapper of `Flag02`.
2. If `Flag01` is used, the compression yield stress and residual stress would be `-(3)` and `-(4)` so that the response would be symmetric.

## Usage

```
material Flag01 1 1000 10 3 .1
materialTest1D 1 1E-3 20 2 7 5 10 20 10 50 10 5 20 10 12 25 40
exit
```

![example one](https://1124082496-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEquxr3H9WpPg4iPvT2mB%2Fuploads%2Fgit-blob-6c500557b89b56da9339b919441e59669b960e94%2FFlag01.EX1.svg?alt=media)

```
material Flag02 1 1000 10 3 .1 -20 -5 -.1
materialTest1D 1 1E-3 20 2 7 5 10 20 10 50 10 5 20 10 12 25 40
exit
```

![example two](https://1124082496-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEquxr3H9WpPg4iPvT2mB%2Fuploads%2Fgit-blob-7b7115d0b929736ebf504f09d5debb426b301802%2FFlag02.EX1.svg?alt=media)


---

# 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/material/material1d/hysteresis/flag.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.
