Skip to content

Commit 9717dfc

Browse files
doc: Update showcase READMEs to reflect + link to forum posts (#405)
<!-- Please use a PR title that conforms to *conventional commits*: "<commit_type>: Describe your change"; for example: "fix: prevent race condition". Some other commit types are: fix, feat, ci, doc, refactor... For a full list of commit types visit https://www.conventionalcommits.org/en/v1.0.0/ --> #### Relevant issue or PR <!-- If the changes resolve an issue or follow some other PR, link to them here. Only link something if it is directly relevant. --> #### Description of changes <!-- Add a high-level description of changes, focusing on the *what* and *why*. --> #### Testing done <!-- Describe how the changes were tested; e.g., "CI passes", "Tested manually in stagingrepo#123", screenshots of a terminal session that verify the changes, or any other evidence of testing the changes. --> --------- Co-authored-by: Dion Häfner <[email protected]>
1 parent 4362e1a commit 9717dfc

File tree

5 files changed

+30
-17
lines changed

5 files changed

+30
-17
lines changed

demo/_showcase/ansys-qoi/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# QoI-Based Surrogate Modeling Workflow
1+
# QoI-based Workflows with Ansys Fluent and Terreract
22

3-
This showcase demonstrates an end-to-end workflow for building QoI-based surrogate models from Ansys simulation data using Tesseract.
3+
This showcase demonstrates an end-to-end workflow for building QoI-based surrogate models from Ansys simulation data using Tesseract. The overall workflow is illustrated below and demonstrated within our [QoI-based surrogacy showcase](https://si-tesseract.discourse.group/t/qoi-based-workflows-with-ansys-fluent-and-terreract/110).
44

55
## Overview
66

demo/_showcase/ansys-shapeopt/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Ansys Tesseract Integration
1+
# Parametric Shape Optimization of Rocket Fins with Ansys SpaceClaim and PyAnsys
22

3-
This directory contains an example Tesseract configuration and scripts demonstrating how to use Tesseract-JAX with Ansys spaceclaim and PyMAPDL. The overall workflow is illustrated below:
3+
This directory contains an example Tesseract configuration and scripts demonstrating how to use Tesseract-JAX with Ansys SpaceClaim and PyMAPDL. The overall workflow is illustrated below and demonstrated within our [rocket fin optimization showcase](https://si-tesseract.discourse.group/t/parametric-shape-optimization-of-rocket-fins-with-ansys-spaceclaim-and-pyansys/109):
44

55
![Workflow](imgs/workflow_1.png)
66

@@ -36,13 +36,13 @@ A machine B, ideally running linux, with:
3636
In Windows Powershell, install the the required dependencies by running:
3737

3838
```bash
39-
pip install tesseract-core[runtime] trimesh
39+
$ pip install tesseract-core[runtime] trimesh
4040
```
4141

4242
Clone this repository, navigate to `demo/_showcase/ansys-shapeopt/spaceclaim` and start the Tesseract runtime server with:
4343

4444
```bash
45-
tesseract-runtime serve --port <port_number_1> --host 0.0.0.0
45+
$ tesseract-runtime serve --port <port_number_1> --host 0.0.0.0
4646
```
4747
Note that we do not build a Tesseract Docker image for SpaceClaim in this example. Instead, we use an existing SpaceClaim installation directly from the host machine. More details about this Tesseract can be found [here](https://docs.pasteurlabs.ai/projects/tesseract-core/latest/content/examples/ansys_integration/spaceclaim_tess.html).
4848

@@ -61,15 +61,15 @@ replace "v242" with your Ansys version and ensure the path is correct. More deta
6161
On machine B, navigate to `demo/_showcase/ansys-shapeopt/` and run
6262

6363
```bash
64-
pip install -r requirements.txt
64+
$ pip install -r requirements.txt
6565
```
6666

6767
and build the needed tesseracts using
6868

6969
```bash
70-
tesseract build spaceclaim
71-
tesseract build pymapdl
72-
tesseract build sdf_fd
70+
$ tesseract build spaceclaim
71+
$ tesseract build pymapdl
72+
$ tesseract build sdf_fd
7373
```
7474

7575
### Run the notebook

docs/content/examples/ansys_integration/pymapdl_tess.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ The Tesseract computes structural compliance using finite element analysis and p
66

77
```{seealso}
88
The full code for this Tesseract can be found under `demo/_showcase/ansys-shapeopt/pymapdl` in the [Tesseract Core repository](https://github.com/pasteurlabs/tesseract-core/tree/main/demo/_showcase/ansys-shapeopt/pymapdl).
9+
10+
The Tesseract can be seen in action within our [rocket fin optimization showcase](https://si-tesseract.discourse.group/t/parametric-shape-optimization-of-rocket-fins-with-ansys-spaceclaim-and-pyansys/109).
911
```
1012

1113
## Prerequisites
1214

13-
This example requires a running ANSYS MAPDL server accessible via gRPC, e.g. via:
15+
This example requires a running Ansys MAPDL server accessible via gRPC, e.g. via:
1416

1517
```bash
1618
# Linux
@@ -94,6 +96,10 @@ The `abstract_eval` function computes output shapes based on input shapes withou
9496

9597
## Demo script
9698

99+
```{seealso}
100+
The full code for this demo can be found in `demo/_showcase/ansys-shapeopt/pymapdl/demo.py` in the [Tesseract Core repository](https://github.com/pasteurlabs/tesseract-core/blob/main/demo/_showcase/ansys-shapeopt/pymapdl/demo.py).
101+
```
102+
97103
This demo shows a complete workflow for a cantilever beam problem. It requires you set environment variables pointing to the MAPDL server:
98104

99105
```bash

docs/content/examples/ansys_integration/spaceclaim_tess.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ This guide outlines how to wrap Ansys SpaceClaim as a Tesseract. For this, we wi
44

55
```{seealso}
66
The full code for this Tesseract can be found under `demo/_showcase/ansys-shapeopt/spaceclaim` in the [Tesseract Core repository](https://github.com/pasteurlabs/tesseract-core/tree/main/demo/_showcase/ansys-shapeopt/spaceclaim).
7+
8+
The Tesseract can be seen in action within our [rocket fin optimization showcase](https://si-tesseract.discourse.group/t/parametric-shape-optimization-of-rocket-fins-with-ansys-spaceclaim-and-pyansys/109).
79
```
810

911
## Why SpaceClaim as a Tesseract?
@@ -12,6 +14,11 @@ Complex CAD models imported from parametric CAD software often require pre-proce
1214

1315
SpaceClaim is commonly used to generate parametric geometries and perform pre-processing actions on them. In this example we demonstrate the use of SpaceClaim as a geometry engine within Tesseract-driven processing pipelines. This unlocks powerful applications operating on real-world CAD geometries.
1416

17+
```{figure} ../../../img/spaceclaim_tesseract_workflow.png
18+
19+
Architecture of the SpaceClaim Tesseract implemented here.
20+
```
21+
1522
## Core concepts
1623

1724
### Folder structure
@@ -93,8 +100,8 @@ $ pip install -r tesseract_requirements.txt
93100

94101
When using SpaceClaim as a geometry engine, the goal is typically to map design parameters in the parametric CAD model to a surface mesh. Here, we are creating a SpaceClaim Tesseract that operates on a grid fin geometry with a number of parameters representing the position of bars and their thickness.
95102

96-
```{seealso}
97-
The explanation and intuation behind the inputs is explained further in the [demo](https://si-tesseract.discourse.group/c/showcase/11).
103+
```{note}
104+
This particular choice of inputs and outputs is motivated in our [rocket fin optimization showcase](https://si-tesseract.discourse.group/t/parametric-shape-optimization-of-rocket-fins-with-ansys-spaceclaim-and-pyansys/109).
98105
```
99106

100107
#### Input schema
@@ -131,14 +138,14 @@ The `apply` function that we are invoking with the above command builds each of
131138
:pyobject: apply
132139
```
133140

134-
To build the geometries we first prepare the SpaceClaim `.scscript` by replacing placeholder values with the user inputs via string substituation. SpaceClaim is then run, outputting `.stl` meshes that are read with `trimesh`.
141+
To build the geometries we first prepare the SpaceClaim `.scscript` by replacing placeholder values with the user inputs via string substitution. SpaceClaim is then run, outputting `.stl` meshes that are read with `trimesh`.
135142

136143
```{literalinclude} ../../../../demo/_showcase/ansys-shapeopt/spaceclaim/tesseract_api.py
137144
:language: python
138145
:pyobject: build_geometries
139146
```
140147

141-
The `.scscript` preperation is unique to this grid fin example, with the user input values being processed into dictionaries that are then used within the string substituation. For a different geometry one would have to create their own `.scscript` and dictionaries with all the neccessary inputs required.
148+
The `.scscript` preperation is unique to this grid fin example, with the user input values being processed into dictionaries that are then used within the string substitution. For a different geometry one would have to create their own `.scscript` and dictionaries with all the neccessary inputs required.
142149

143150
```{literalinclude} ../../../../demo/_showcase/ansys-shapeopt/spaceclaim/tesseract_api.py
144151
:language: python
@@ -204,7 +211,7 @@ curl -Method POST `
204211
-Body '{"inputs":{"differentiable_parameters":[[200,600,0,3.14,0.39,3.53,0.79,3.93,1.18,4.32,1.57,4.71,1.96,5.11,2.36,5.50,2.75,5.89],[400,400,0,3.14,0.39,3.53,0.79,3.93,1.18,4.32,1.57,4.71,1.96,5.11,2.36,5.50,2.75,5.89]],"non_differentiable_parameters":[[800,100],[800,100]],"string_parameters":["F:\\Ansys installations\\ANSYS Inc\\v241\\scdm\\SpaceClaim.exe","geometry_generation.scscript"]}}'
205212
```
206213

207-
After about (~15 seconds) the mesh output is returned and displayed in text form in your terminal. The point coordinates and cells correspond to a grid fin like below (shown with randomised cross beam locations).
214+
After about ~15 seconds the mesh output is returned and displayed in text form in your terminal. The point coordinates and cells correspond to a grid fin like below (shown with randomised cross beam locations).
208215

209216
```{figure} ../../../img/grid_fin_stl.png
210217
@@ -215,4 +222,4 @@ Grid fin geometry shown with randomised beam locations.
215222

216223
Invoking SpaceClaim via HTTP is only the start of the Tesseract journey.
217224

218-
For example, by using finite difference approximations under the hood, we can make the resulting geometry [differentiable](../../introduction/differentiable-programming.md) with respect to the design parameters. For a concrete demonstration of end-to-end shape optimization in action, please have a look at our [grid fin optimization showcase](https://si-tesseract.discourse.group/c/showcase/11).
225+
For example, by using finite difference approximations under the hood, we can make the resulting geometry [differentiable](../../introduction/differentiable-programming.md) with respect to the design parameters. For a concrete demonstration of end-to-end shape optimization in action, please have a look at our [rocket fin optimization showcase](https://si-tesseract.discourse.group/t/parametric-shape-optimization-of-rocket-fins-with-ansys-spaceclaim-and-pyansys/109).
228 KB
Loading

0 commit comments

Comments
 (0)