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.

Script to add many point loads to geometry?

Please login with a confirmed email address before reporting spam

Hi - I'm new to Comsol, and coming from ANSYS where this problem would be easy. I have a very complex load defined at 10^6 points. Wondering if I can write a script to define points in the geomety and then apply forces at those points. Alternatively I could apply forces at nearest nodes if I knew how to find them. Or, I could spread the point loads into areas and define pressures, but I don't know how to define the areas for those loads either.

I can easily write a program to create a script, but not sure what it should say. Web serches haven't turned up anything. Thanks for any help.


4 Replies Last Post 2021年9月2日 GMT-4 21:09
Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 2021年9月1日 GMT-4 05:39

To add perform a repetitive task, you can use either a Model Method, a Java Script, or (if you have such a license) Matlab scripting.

This said, adding 10^6 nodes to the model tree will make your model essentially impossible to work with. What is the background story for the 10^6 loads? Is it a distributed load that you try model in this way? If so, it is probably better to work with boundary loads and interpolation functions.

-------------------
Henrik Sönnerlind
COMSOL
To add perform a repetitive task, you can use either a Model Method, a Java Script, or (if you have such a license) Matlab scripting. This said, adding 10^6 nodes to the model tree will make your model essentially impossible to work with. What is the background story for the 10^6 loads? Is it a distributed load that you try model in this way? If so, it is probably better to work with boundary loads and interpolation functions.

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 2021年9月2日 GMT-4 12:13

Thanks Henrik for your reply. They are individual known point loads. Your idea of interpolating the load is interesting. If I input a table with X, Y, Force (directed in Z) values and create an interpolated load, can I apply that to the model surface?

Thanks Henrik for your reply. They are individual known point loads. Your idea of interpolating the load is interesting. If I input a table with X, Y, Force (directed in Z) values and create an interpolated load, can I apply that to the model surface?

Dave Greve Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 2021年9月2日 GMT-4 18:59

The force components associated with a Boundary Load node can be functions of position, so I assume that an interpolation function can also be used there (haven't done this myself however).

Indeed, in Comsol almost any box that takes a numerical input will also accept functions.

The force components associated with a Boundary Load node can be functions of position, so I assume that an interpolation function can also be used there (haven't done this myself however). Indeed, in Comsol almost any box that takes a numerical input will also accept functions.

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 2021年9月2日 GMT-4 21:09

Yes that works. One can enter int1(x,y) for a z-direction boundary load. Thanks!

Yes that works. One can enter int1(x,y) for a z-direction boundary load. Thanks!

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.