Skip to content

Commit

Permalink
Add plotting to stiffened plate example
Browse files Browse the repository at this point in the history
  • Loading branch information
A-CGray committed Jul 12, 2024
1 parent 73e5d48 commit 2617a02
Show file tree
Hide file tree
Showing 2 changed files with 192 additions and 52 deletions.
12 changes: 9 additions & 3 deletions examples/stiffened_plate/generate_plate.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@
from scipy.spatial.transform import Rotation

parser = argparse.ArgumentParser()
parser.add_argument("--nex", type=int, default=20, help="# elements from top to bottom")
parser.add_argument(
"--nex", type=int, default=20, help="# elements from top to bottom"
)
parser.add_argument(
"--ney", type=int, default=40, help="# elements around circumference"
)
parser.add_argument("--pinEdges", action="store_true", help="Pin edges of plate")
parser.add_argument(
"--pinEdges", action="store_true", help="Pin edges of plate"
)
args = parser.parse_args()

# Overall dimensions
Expand Down Expand Up @@ -124,7 +128,9 @@ def write_bulk_line(key, items, format="small"):

# Write nodes
for i in range(n1 * n2):
write_bulk_line("GRID", [i + 1, 0, nmat[i, 0], nmat[i, 1], nmat[i, 2], 0, 0, 0])
write_bulk_line(
"GRID", [i + 1, 0, nmat[i, 0], nmat[i, 1], nmat[i, 2], 0, 0, 0]
)

# Write elements
compID = 1
Expand Down
Loading

0 comments on commit 2617a02

Please sign in to comment.