Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Running the same analysis on many cantilever beams with different cross-sections
Posted Aug 12, 2019, 10:36 p.m. EDT Structural & Acoustics, API, Structural Mechanics Version 5.3a 2 Replies
Please login with a confirmed email address before reporting spam
Hi,
I am new to COMSOL and have tried to solve the below issue by reading the documentation and watching videos online, without success (yet).
My object is to automatically analyze 100s or 1000s of cantilever beam models with unusual cross-sections using the COMSOL API.
The workflow for each beam:
- create clean environment
- load beam from .stl
- assign material (same for all beams)
- add study: add Fixed Constraint to face at one end, and Boundary Load in the x-direction at the face on the other end.
- compute study: append maximum deflection recorded to .csv file.
I have recorded my workflow for one beam, exported it as a Java file and tried to automate the process. (see files attached) However, to do it on each beam, I will need to access a list of all faces on the loaded beam model and check if they are the faces at the beginning and end of the beam.
Please feel free to respond with any suggestions you may have to achieve this.
Summary:
What is the best way to automate such a workflow? Do I run it as a free-standing Java file? Can I parallelize the process?
How do I access a list of faces, and a list of vertices of each face, such that I can evaluate which face belongs to each end of the beam.
How do I access and evaulate study results, such that I could store each beams corresponding maximum deflection in a given direction in a CSV file?