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.

Randomising object orientation

Please login with a confirmed email address before reporting spam

Hello,

I have a cylinder within a cube and I am wondering if there is an easy way to randomize its orientation so that its properties can be measured for each instance of orientation. This would allow me to average the properties.

Any help is appreciated, thanks.

-alex


3 Replies Last Post May 14, 2020, 4:32 a.m. EDT
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 4 years ago May 11, 2020, 9:05 a.m. EDT
Updated: 4 years ago May 14, 2020, 9:06 a.m. EDT

Hello Alex,

Creating a randomized geometry can be done by scripting either with MATLAB or Java. To do it with MATLAB your license would need to include LiveLink for MATLAB, and of course you'd need MATLAB. To do it with scripting in Java you don't need any additional products. Our team has written several blogs on how to generate randomized geometries with Java scripting. You can find them at this link. If I understand your intentions correctly, the "Swiss cheese blog post" is perfect for you.

Best regards,

Jeff

-------------------
Jeff Hiller
Hello Alex, Creating a randomized geometry can be done by scripting either with MATLAB or Java. To do it with MATLAB your license would need to include [LiveLink for MATLAB](https://www.comsol.com/livelink-for-matlab), and of course you'd need MATLAB. To do it with scripting in Java you don't need any additional products. Our team has written several blogs on how to generate randomized geometries with Java scripting. You can find them at [this link](https://www.comsol.com/blogs/?np=8&s=random+geometry). If I understand your intentions correctly, the "Swiss cheese blog post" is perfect for you. Best regards, Jeff

Please login with a confirmed email address before reporting spam

Posted: 4 years ago May 11, 2020, 11:25 p.m. EDT

Hello Alex, Creating a randomized geometry can be done by scripting wither with MATLAB or Java. To do it with MATLAB your license would need to include LiveLink for MATLAB, and of course you'd need MATLAB. To do it with scripting in Java you don't need any additional products. Our team has written several blogs on how to generate randomized geometries with Java scripting. You can find them at this link. If I understand your intentions correctly, the "Swiss cheese blog post" is perfect for you.

Best regards,

Jeff

Hi Jeff thanks for explaining it in brief along with the links to navigate in a better way, was looking for similar solution.

Regards, Dalma

>Hello Alex, >Creating a randomized geometry can be done by scripting wither with MATLAB or Java. To do it with MATLAB your license would need to include [LiveLink for MATLAB](https://www.comsol.com/livelink-for-matlab), and of course you'd need MATLAB. To do it with scripting in Java you don't need any additional products. Our team has written several blogs on how to generate randomized geometries with Java scripting. You can find them at [this link](https://www.comsol.com/blogs/?np=8&s=random+geometry). If I understand your intentions correctly, the "Swiss cheese blog post" is perfect for you. > >Best regards, > >Jeff Hi Jeff thanks for explaining it in brief along with the links to navigate in a better way, was looking for similar solution. Regards, Dalma

Please login with a confirmed email address before reporting spam

Posted: 4 years ago May 14, 2020, 4:32 a.m. EDT

Thanks Jeff! Ill try this out

Best regards, Alex

Thanks Jeff! Ill try this out Best regards, Alex

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.