Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions Markdown/ansys_codefest/ansys.codefest.mapdl.Beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@

# <kbd>class</kbd> `Beam`
Continuous material linking two nodes.

### <kbd>method</kbd> `Beam.__init__`

```python
__init__(
start: ansys.codefest.mapdl.mechanics.core.Node,
end: ansys.codefest.mapdl.mechanics.core.Node,
section: ansys.codefest.mapdl.mechanics.core.CrossSection = CrossSection(shape=<BeamXn.CIRCLE: 2>, dimensions=[0.01]),
material: ansys.codefest.mapdl.constants.Material = Material(name='Steel', density=7850.0, elastic_modulus=210000000000.0, poissons_ratio=0.29, yield_strength=330000000.0, price_per_kg=1.2, id=1),
number: int = None,
stress: float = 0.0
) → None
```






---

### <kbd>property</kbd> Beam.cost

Return Beam cost



**Returns:**
beam cost as a float, in dollarydoos

---

### <kbd>property</kbd> Beam.cross_section_area

Return beam cross-section area.



**Returns:**
beam area as a float

---

### <kbd>property</kbd> Beam.length

Return beam length



**Returns:**
beam length as float

---

### <kbd>property</kbd> Beam.mass

Return Beam mass



**Returns:**
beam mass ass a float



---

## <kbd>method</kbd> `Beam.has_been_broken`

```python
has_been_broken() → bool
```

Return True if the beam has experienced stress >= its yield.



**Returns:**
True if any of the bridge has exceeded the equivalent yield stress

---

## <kbd>method</kbd> `Beam.is_beam_allowed`

```python
is_beam_allowed() → tuple[bool, list[str]]
```

Return True if beam is allowed by the environment.

Difference between 'allowed' and 'valid'. All allowed beams are valid but not all valid beams are allowed.



**Returns:**
answer to function question as well as feedback

---

## <kbd>method</kbd> `Beam.is_valid`

```python
is_valid() → tuple[bool, list[str]]
```

Return True if this instance of Beam is valid.

list tuple will contain feedback on why False, or will be empty when True.



**Returns:**
answer to the question posed by the function name as well as feedback

36 changes: 36 additions & 0 deletions Markdown/ansys_codefest/ansys.codefest.mapdl.BeamXn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

# <kbd>class</kbd> `BeamXn`
Beam cross-section enum.

In PyMAPDL the beam cross-sections correspond to the following sectypes.

* RECT = RECTANGLE = 1

* HREC = RECTANGLETUBE = 4

* CSOLID = CIRCLE = 2

* CTUBE = CYLINDER = 3

Dimensions structure for each cross-section shown below:

RECTANGLE - [width, height]

RECTANGLETUBE - [total_width, total_height, left_wall_thickness, right_wall_thickness, bottom_wall_thickness, top_wall_thickness]

CIRCLE - [radius]

CYLINDER - [inner_radius, outer_radius]



**Examples:**
```python-repl
>>> import ansys.codefest.mapdl as acf
>>> acf.BeamXn.RECTANGLE
<BeamXn.RECTANGLE: 1>
```




116 changes: 116 additions & 0 deletions Markdown/ansys_codefest/ansys.codefest.mapdl.Blueprint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@

# <kbd>class</kbd> `Blueprint`
The Plan/Blueprint for a simulation. Contains nodes, beams and BCs.

### <kbd>method</kbd> `Blueprint.__init__`

```python
__init__(
nodes: list[ansys.codefest.mapdl.mechanics.core.Node],
beams: list[ansys.codefest.mapdl.mechanics.core.Beam]
) → None
```






---

### <kbd>property</kbd> Blueprint.cost

Return total cost of material in the blueprint.



**Returns:**
cost of the material in dollary doos

---

### <kbd>property</kbd> Blueprint.grid_lims

Return the populated grid limits.



**Returns:**
the resulting grid limits

---

### <kbd>property</kbd> Blueprint.mass

Return total mass of material in the blueprint.



**Returns:**
mass of material as a float



---

## <kbd>method</kbd> `Blueprint.is_valid`

```python
is_valid() → tuple[bool, str]
```

Returns True if this Blueprint instance is ready to be converted to a sim.

A blueprint must contain a list of nodes, a list of beams, a load path (going from node 1 to node 2 via nodes connected by beams), a beam cross-section value and the dimensions of that cross-section.



**Returns:**
answer to function question as well as feedback

---

## <kbd>method</kbd> `Blueprint.save_as`

```python
save_as(file_path: pathlib.Path = WindowsPath('input.txt')) → None
```

save blueprint to specified file path.

Defaults to "input.txt" in your current working directory.



**Args:**

- <b>`file_path`</b>: path to where you wish to save the file



**Returns:**
None

---

## <kbd>method</kbd> `Blueprint.with_challenge_attempt_geometry`

```python
with_challenge_attempt_geometry(
attempt: ansys.codefest.mapdl.constants.Submission
) → None
```

Add challenge attempt geometry to blueprint.



**Args:**

- <b>`attempt`</b>: design dictionary for this attempt



**Returns:**
None

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

# <kbd>class</kbd> `BlueprintConstructionException`
Exception raised when a blueprint is transformed into a simulation and an error is encountered.




85 changes: 85 additions & 0 deletions Markdown/ansys_codefest/ansys.codefest.mapdl.BooleanVector.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@

# <kbd>class</kbd> `BooleanVector`
3D Boolean vector dataclass.

Simple 3D vector class for simple boolean operations. Typically used for vectors where components are optional.

The components are explicitly refewrred to as x, y and z.



**Examples:**
```python-repl
>>> import ansys.codefest.mapdl as acf
>>> bv = acf.BooleanVector(True, False, True)
>>> bv.y
False
>>> bv.z
True
```

### <kbd>method</kbd> `BooleanVector.__init__`

```python
__init__(x: bool, y: bool, z: bool) → None
```






---

### <kbd>property</kbd> BooleanVector.false

If the vector is False in all components return True.



**Returns:**
True if all components are False, otherwise False

---

### <kbd>property</kbd> BooleanVector.true

If the vector is True in all components return True.



**Returns:**
True if all components are True, otherwise False



---

## <kbd>classmethod</kbd> `BooleanVector.all_false`

```python
all_false() → BooleanVector
```

Return an instance of BooleanVector which is False in all components



**Returns:**
a BooleanVector with all False properties

---

## <kbd>classmethod</kbd> `BooleanVector.all_true`

```python
all_true() → BooleanVector
```

Return an instance of BooleanVector which is True in all components



**Returns:**
a BooleanVector with all True properties

Loading