Skip to content

Commit

Permalink
duck example
Browse files Browse the repository at this point in the history
  • Loading branch information
Huangzizhou committed Oct 11, 2024
1 parent dc520f1 commit 3494d2d
Show file tree
Hide file tree
Showing 15 changed files with 1,520,759 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@ To run a shape optimization and obtain the microstructure cell shape that corres
cd scripts/
python optimize.py 5000 \
../inflator/data/patterns/2D/topologies/0105.obj \
--no_tile --strain 0.25 --n_samples 4
--no_tile --strain 0.2 --n_samples 3

where `5000` is the desired stress, the optimization will sample 4 strains from `10%` to `25%` and optimize the stress on those samples to match the desired stress.
where `5000` is the desired stress, the optimization will sample 3 strains from `10%` to `20%` and optimize the stress on those samples to match the desired stress.

All 105 topologies used in the paper are in folder `inflator/data/patterns/2D/topologies/0105.obj`, one can provide a new `.obj` edge mesh to run the optimization on a custom cell topology. The edge mesh has to fit into the unit cube and be periodic in both directions.

The above command creates a folder `result/0105_0.25_5000.0` and set up the JSON files needed to run PolyFEM. Once the optimization finishes successfully, one can further optimize the cell shape for wider flat region by
The above command creates a folder `result/0105_0.2_5000.0` and set up the JSON files needed to run PolyFEM. Once the optimization finishes successfully, one can further optimize the cell shape for wider flat region by

python optimize.py 5000 \
../inflator/data/patterns/2D/topologies/0105.obj \
--no_tile --strain 0.3 --n_samples 5 \
--params ../result/0105_0.25_5000.0/sol.txt
--no_tile --strain 0.25 --n_samples 4 \
--params ../result/0105_0.2_5000.0/sol.txt

which adds one more sample strain, and uses the previous optimized shape parameters as a starting point.

Expand Down
Loading

0 comments on commit 3494d2d

Please sign in to comment.