Modelling a galaxy with Simscape Multibody
이전 댓글 표시
Dear MATLAB Community,
I've saw an example on modelling the solar system using Simulink Simscape Multibody (link: https://se.mathworks.com/help/physmod/sm/ug/model-planet-orbit-due-to-gravity.html) in MATLAB R2019b.
However, I would like to change this simulation to simulate a galaxy instead (with e.g. 400 stars orbiting), is this possible in Simulink?
Also, when objects collide, I noticed they literally bounce off of each other, and don't "mold" and become 1, is there a property that allows them to stay intact after collision?
Thank you for your help,
Best Regards,
Arpad
답변 (1개)
Steve Miller
2021년 6월 6일
1 개 추천
Hi Arpad,
> However, I would like to change this simulation to simulate a galaxy instead (with e.g. 400 stars orbiting), is this possible in Simulink?
Yes! You can copy-paste to add as many objects as your computers memory will allow.
> Also, when objects collide, I noticed they literally bounce off of each other, and don't "mold" and become 1, is there a property that allows them to stay intact after collision?
This can be done by activating Weld Joints between the objects. However, you have to know which ones might collide and put a deactivated joint between them. This might be prohibitive for so many objects.
--Steve
댓글 수: 2
Arpad Lenart
2021년 6월 9일
Dear Steve,
Thank you for your reply! Is there a guide as to how to attach the "Weld Joints"? So should it be placed between the objects/planets or?

I really appreciate your help!
Best regards,
Arpad
Steve Miller
2021년 6월 9일
The weld joints need to be between any planets that may collide, and "Mode" needs to be set to "Provided by Input". The input signal should be 0 until the planets collide, then set it to 1.
--Steve
카테고리
도움말 센터 및 File Exchange에서 Simulation and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!