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

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:

  1. create clean environment
  2. load beam from .stl
  3. assign material (same for all beams)
  4. add study: add Fixed Constraint to face at one end, and Boundary Load in the x-direction at the face on the other end.
  5. 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?



2 Replies Last Post Aug 21, 2019, 12:26 a.m. EDT
Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 5 years ago Aug 13, 2019, 1:36 a.m. EDT
Updated: 5 years ago Aug 13, 2019, 1:33 a.m. EDT

Hi,

Without adressing all of your question: When you want to apply boundary conditions on imported geometries, it is usually easier to do it based on geometrical location than trying to search within the geometry yourself. Add Selections->Box under Defintions and apply the boundary conditions on the boxes..

Regards,
Henrik

-------------------
Henrik Sönnerlind
COMSOL
Hi, Without adressing all of your question: When you want to apply boundary conditions on imported geometries, it is usually easier to do it based on geometrical location than trying to search within the geometry yourself. Add Selections->Box under Defintions and apply the boundary conditions on the boxes.. Regards, Henrik

Please login with a confirmed email address before reporting spam

Posted: 5 years ago Aug 21, 2019, 12:26 a.m. EDT

Dear Henrik,

Thank you for your response. I will try to incorporate your advice into my code.

I have just gotten my first script to work by putting the whole workflow into a single Application Method Class, and then running it via a button on a form.

Best, Philippe

Dear Henrik, Thank you for your response. I will try to incorporate your advice into my code. I have just gotten my first script to work by putting the whole workflow into a single Application Method Class, and then running it via a button on a form. Best, Philippe

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.