Skip to content

Commit

Permalink
Initial commit R2022b.
Browse files Browse the repository at this point in the history
  • Loading branch information
smiller01985 committed Oct 13, 2022
1 parent ffc016f commit 0f9949e
Show file tree
Hide file tree
Showing 66 changed files with 34 additions and 34 deletions.
6 changes: 3 additions & 3 deletions Models/Bouncing_Ball/Overview/html/sm_contact_ball.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!--
This HTML was auto-generated from MATLAB code.
To make changes, update the MATLAB code and republish this document.
--><title>Bouncing Ball With Zero Crossings</title><meta name="generator" content="MATLAB 9.12"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2022-05-11"><meta name="DC.source" content="sm_contact_ball.m"><style type="text/css">
--><title>Bouncing Ball With Zero Crossings</title><meta name="generator" content="MATLAB 9.13"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2022-09-19"><meta name="DC.source" content="sm_contact_ball.m"><style type="text/css">
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outine:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}

html { min-height:100%; margin-bottom:1px; }
Expand Down Expand Up @@ -67,7 +67,7 @@



</style></head><body><div class="content"><h1>Bouncing Ball With Zero Crossings</h1><!--introduction--><p>This example models a ball bouncing on a floor using the Spatial Contact Force block. MATLAB scripts explore the effect of enabling and disabling zero crossings and the effect of solver settings on the simulation results.</p><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#1">Model</a></li><li><a href="#2">Simulation Results from Simscape Logging</a></li><li><a href="#4">Simulation Results from Simscape Logging: Effect of Zero Crossings</a></li><li><a href="#6">Simulation Results from Simscape Logging: Thin Floor</a></li><li><a href="#8">Simulation Results from Simscape Logging: Thin Floor, Maximum Step Size</a></li></ul></div><h2 id="1">Model</h2><img vspace="5" hspace="5" src="sm_contact_ball_01.png" alt=""> <h2 id="2">Simulation Results from Simscape Logging</h2><p>This plot shows the height of the ball with time.</p><img vspace="5" hspace="5" src="sm_contact_ball_02.png" alt=""> <h2 id="4">Simulation Results from Simscape Logging: Effect of Zero Crossings</h2><p>This plot shows the height of the ball with time with zero crossings enabled and disabled.</p><img vspace="5" hspace="5" src="sm_contact_ball_03.png" alt=""> <h2 id="6">Simulation Results from Simscape Logging: Thin Floor</h2><p>This plot shows the height of the ball with time if the test is conducted with a thin floor. If the step size is too large, the ball can pass through the floor between simulation steps. Enabling zero-crossings can help but may not guarantee the event of the ball hitting the floor will always be captured.</p><img vspace="5" hspace="5" src="sm_contact_ball_04.png" alt=""> <h2 id="8">Simulation Results from Simscape Logging: Thin Floor, Maximum Step Size</h2><p>This plot shows the height of the ball with time if the test is conducted with a thin floor. If the step size is too large, the ball can pass through the floor between simulation steps. Limiting the maximum step size is a better way to ensure the event will be captured.</p><img vspace="5" hspace="5" src="sm_contact_ball_05.png" alt=""> <p class="footer">Copyright 2019-2022 The MathWorks, Inc.<br><a href="https://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2022a</a><br></p></div><!--
</style></head><body><div class="content"><h1>Bouncing Ball With Zero Crossings</h1><!--introduction--><p>This example models a ball bouncing on a floor using the Spatial Contact Force block. MATLAB scripts explore the effect of enabling and disabling zero crossings and the effect of solver settings on the simulation results.</p><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#1">Model</a></li><li><a href="#2">Simulation Results from Simscape Logging</a></li><li><a href="#4">Simulation Results from Simscape Logging: Effect of Zero Crossings</a></li><li><a href="#6">Simulation Results from Simscape Logging: Thin Floor</a></li><li><a href="#8">Simulation Results from Simscape Logging: Thin Floor, Maximum Step Size</a></li></ul></div><h2 id="1">Model</h2><img vspace="5" hspace="5" src="sm_contact_ball_01.png" alt=""> <h2 id="2">Simulation Results from Simscape Logging</h2><p>This plot shows the height of the ball with time.</p><img vspace="5" hspace="5" src="sm_contact_ball_02.png" alt=""> <h2 id="4">Simulation Results from Simscape Logging: Effect of Zero Crossings</h2><p>This plot shows the height of the ball with time with zero crossings enabled and disabled.</p><img vspace="5" hspace="5" src="sm_contact_ball_03.png" alt=""> <h2 id="6">Simulation Results from Simscape Logging: Thin Floor</h2><p>This plot shows the height of the ball with time if the test is conducted with a thin floor. If the step size is too large, the ball can pass through the floor between simulation steps. Enabling zero-crossings can help but may not guarantee the event of the ball hitting the floor will always be captured.</p><img vspace="5" hspace="5" src="sm_contact_ball_04.png" alt=""> <h2 id="8">Simulation Results from Simscape Logging: Thin Floor, Maximum Step Size</h2><p>This plot shows the height of the ball with time if the test is conducted with a thin floor. If the step size is too large, the ball can pass through the floor between simulation steps. Limiting the maximum step size is a better way to ensure the event will be captured.</p><img vspace="5" hspace="5" src="sm_contact_ball_05.png" alt=""> <p class="footer">Copyright 2019-2022 The MathWorks, Inc.<br><a href="https://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2022b</a><br></p></div><!--
##### SOURCE BEGIN #####
%% Bouncing Ball With Zero Crossings
%
Expand All @@ -84,7 +84,7 @@
open_system('sm_contact_ball')
set_param(find_system('sm_contact_ball','FindAll', 'on','type','annotation','Tag','ModelFeatures'),'Interpreter','off')
set_param(find_system('sm_contact_ball','MatchFilter',@Simulink.match.allVariants,'FindAll', 'on','type','annotation','Tag','ModelFeatures'),'Interpreter','off')
%% Simulation Results from Simscape Logging
%%
Expand Down
Binary file modified Models/Bouncing_Ball/Overview/html/sm_contact_ball.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Models/Bouncing_Ball/Overview/html/sm_contact_ball_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Models/Bouncing_Ball/Overview/html/sm_contact_ball_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Models/Bouncing_Ball/Overview/html/sm_contact_ball_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Models/Bouncing_Ball/Overview/html/sm_contact_ball_04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Models/Bouncing_Ball/Overview/html/sm_contact_ball_05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Models/Bouncing_Ball/Overview/sm_contact_ball.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

open_system('sm_contact_ball')

set_param(find_system('sm_contact_ball','FindAll', 'on','type','annotation','Tag','ModelFeatures'),'Interpreter','off')
set_param(find_system('sm_contact_ball','MatchFilter',@Simulink.match.allVariants,'FindAll', 'on','type','annotation','Tag','ModelFeatures'),'Interpreter','off')

%% Simulation Results from Simscape Logging
%%
Expand Down
Binary file modified Models/Bouncing_Ball/sm_contact_ball.slx
Binary file not shown.
Binary file modified Models/Contact_Pairs/sm_contact_pairs.slx
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!--
This HTML was auto-generated from MATLAB code.
To make changes, update the MATLAB code and republish this document.
--><title>Multibody Rolling Disk, Custom Force Law</title><meta name="generator" content="MATLAB 9.12"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2022-05-11"><meta name="DC.source" content="sm_disk_floor_custom_friction.m"><style type="text/css">
--><title>Multibody Rolling Disk, Custom Force Law</title><meta name="generator" content="MATLAB 9.13"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2022-09-19"><meta name="DC.source" content="sm_disk_floor_custom_friction.m"><style type="text/css">
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outine:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}

html { min-height:100%; margin-bottom:1px; }
Expand Down Expand Up @@ -67,7 +67,7 @@



</style></head><body><div class="content"><h1>Multibody Rolling Disk, Custom Force Law</h1><!--introduction--><p>This example shows how to model a custom force law that integrated with the Spatial Contact Force block. The custom force law modifies the coefficients of friction based on the disk's position.</p><p>Two spinning disks are released above a floor with an initial translational speed. The friction between the disks and the floor slows the rate at which they spin and slide. When the disk with the custom force law reaches a patch of ice (shown visually in the animation), the coefficients of friction are reduced. The rotational speeds of the disks and trajectories of the disks differ, showing the effect of the custom force law.</p><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#1">Model</a></li><li><a href="#2">Custom Force</a></li><li><a href="#3">Simulation Results from Simscape Logging</a></li></ul></div><h2 id="1">Model</h2><img vspace="5" hspace="5" src="sm_disk_floor_custom_friction_01.png" alt=""> <h2 id="2">Custom Force</h2><p>This shows the basic calculations required for developing a custom force law.</p><div><ol><li>Calculate quantities upon which normal/friction will depend</li><li>Obtain relevant tangential veloctiy.</li><li>Calculate normal force</li><li>Calculate friction force</li><li>Decompose friction force along relevant axes (tangential plane)</li></ol></div><img vspace="5" hspace="5" src="sm_disk_floor_custom_friction_02.png" alt=""> <h2 id="3">Simulation Results from Simscape Logging</h2><p>The plot below compares the rotational speed of the disks and their position along the global x-axis. When the disks hit the patch of ice, only the disk with the custom force law has its friction force affected.</p><img vspace="5" hspace="5" src="sm_disk_floor_custom_friction_03.png" alt=""> <p class="footer">Copyright 2022 The MathWorks, Inc.<br><a href="https://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2022a</a><br></p></div><!--
</style></head><body><div class="content"><h1>Multibody Rolling Disk, Custom Force Law</h1><!--introduction--><p>This example shows how to model a custom force law that integrated with the Spatial Contact Force block. The custom force law modifies the coefficients of friction based on the disk's position.</p><p>Two spinning disks are released above a floor with an initial translational speed. The friction between the disks and the floor slows the rate at which they spin and slide. When the disk with the custom force law reaches a patch of ice (shown visually in the animation), the coefficients of friction are reduced. The rotational speeds of the disks and trajectories of the disks differ, showing the effect of the custom force law.</p><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#1">Model</a></li><li><a href="#2">Custom Force</a></li><li><a href="#3">Simulation Results from Simscape Logging</a></li></ul></div><h2 id="1">Model</h2><img vspace="5" hspace="5" src="sm_disk_floor_custom_friction_01.png" alt=""> <h2 id="2">Custom Force</h2><p>This shows the basic calculations required for developing a custom force law.</p><div><ol><li>Calculate quantities upon which normal/friction will depend</li><li>Obtain relevant tangential veloctiy.</li><li>Calculate normal force</li><li>Calculate friction force</li><li>Decompose friction force along relevant axes (tangential plane)</li></ol></div><img vspace="5" hspace="5" src="sm_disk_floor_custom_friction_02.png" alt=""> <h2 id="3">Simulation Results from Simscape Logging</h2><p>The plot below compares the rotational speed of the disks and their position along the global x-axis. When the disks hit the patch of ice, only the disk with the custom force law has its friction force affected.</p><img vspace="5" hspace="5" src="sm_disk_floor_custom_friction_03.png" alt=""> <p class="footer">Copyright 2022 The MathWorks, Inc.<br><a href="https://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2022b</a><br></p></div><!--
##### SOURCE BEGIN #####
%% Multibody Rolling Disk, Custom Force Law
%
Expand All @@ -90,7 +90,7 @@
open_system('sm_disk_floor_custom_friction')
set_param(find_system('sm_disk_floor_custom_friction','FindAll', 'on','type','annotation','Tag','ModelFeatures'),'Interpreter','off')
set_param(find_system('sm_disk_floor_custom_friction','MatchFilter',@Simulink.match.allVariants,'FindAll', 'on','type','annotation','Tag','ModelFeatures'),'Interpreter','off')
%% Custom Force
%
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

open_system('sm_disk_floor_custom_friction')

set_param(find_system('sm_disk_floor_custom_friction','FindAll', 'on','type','annotation','Tag','ModelFeatures'),'Interpreter','off')
set_param(find_system('sm_disk_floor_custom_friction','MatchFilter',@Simulink.match.allVariants,'FindAll', 'on','type','annotation','Tag','ModelFeatures'),'Interpreter','off')

%% Custom Force
%
Expand Down
Binary file modified Models/Custom_Force_Law/sm_disk_floor_custom_friction.slx
Binary file not shown.
6 changes: 3 additions & 3 deletions Models/Disk_Basic/Overview/html/sm_disk_cyl_on_floor.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!--
This HTML was auto-generated from MATLAB code.
To make changes, update the MATLAB code and republish this document.
--><title>Multibody Disk Contact, Cylinder on Floor</title><meta name="generator" content="MATLAB 9.12"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2022-05-11"><meta name="DC.source" content="sm_disk_cyl_on_floor.m"><style type="text/css">
--><title>Multibody Disk Contact, Cylinder on Floor</title><meta name="generator" content="MATLAB 9.13"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2022-09-19"><meta name="DC.source" content="sm_disk_cyl_on_floor.m"><style type="text/css">
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outine:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}

html { min-height:100%; margin-bottom:1px; }
Expand Down Expand Up @@ -67,7 +67,7 @@



</style></head><body><div class="content"><h1>Multibody Disk Contact, Cylinder on Floor</h1><!--introduction--><p>This example models a cylinder bouncing on a floor using different contact methods. It compares contact between two solids, one solid and a point cloud, and one solid with two disks. The comparison looks at the number of steps during the simulation. It is seen that the solid-to-solid contact requires more steps as the point of contact moves along the contact line between the cylinder and the floor. Both the point cloud and the disk contact proxies show the cylinder resting on the floor with no oscillations about the lateral axis.</p><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#1">Model</a></li><li><a href="#2">Simulation Results from Simscape Logging</a></li></ul></div><h2 id="1">Model</h2><img vspace="5" hspace="5" src="sm_disk_cyl_on_floor_01.png" alt=""> <h2 id="2">Simulation Results from Simscape Logging</h2><p>The plot below compares the rotational speed of the lateral axis for each contact modeling method. The simulations are run separately to obtain an independent measure of the number of steps required to complete the simulation, which is shown in the lower plot. It is clear that as the contact point for solid-to-solid contact moves along the contact line, the cylinder rotates very slightly about the lateral axis which requires additional simulation steps.</p><img vspace="5" hspace="5" src="sm_disk_cyl_on_floor_02.png" alt=""> <p class="footer">Copyright 2022 The MathWorks, Inc.<br><a href="https://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2022a</a><br></p></div><!--
</style></head><body><div class="content"><h1>Multibody Disk Contact, Cylinder on Floor</h1><!--introduction--><p>This example models a cylinder bouncing on a floor using different contact methods. It compares contact between two solids, one solid and a point cloud, and one solid with two disks. The comparison looks at the number of steps during the simulation. It is seen that the solid-to-solid contact requires more steps as the point of contact moves along the contact line between the cylinder and the floor. Both the point cloud and the disk contact proxies show the cylinder resting on the floor with no oscillations about the lateral axis.</p><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#1">Model</a></li><li><a href="#2">Simulation Results from Simscape Logging</a></li></ul></div><h2 id="1">Model</h2><img vspace="5" hspace="5" src="sm_disk_cyl_on_floor_01.png" alt=""> <h2 id="2">Simulation Results from Simscape Logging</h2><p>The plot below compares the rotational speed of the lateral axis for each contact modeling method. The simulations are run separately to obtain an independent measure of the number of steps required to complete the simulation, which is shown in the lower plot. It is clear that as the contact point for solid-to-solid contact moves along the contact line, the cylinder rotates very slightly about the lateral axis which requires additional simulation steps.</p><img vspace="5" hspace="5" src="sm_disk_cyl_on_floor_02.png" alt=""> <p class="footer">Copyright 2022 The MathWorks, Inc.<br><a href="https://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2022b</a><br></p></div><!--
##### SOURCE BEGIN #####
%% Multibody Disk Contact, Cylinder on Floor
%
Expand All @@ -87,7 +87,7 @@
open_system('sm_disk_cyl_on_floor')
set_param(find_system('sm_disk_cyl_on_floor','FindAll', 'on','type','annotation','Tag','ModelFeatures'),'Interpreter','off')
set_param(find_system('sm_disk_cyl_on_floor','MatchFilter',@Simulink.match.allVariants,'FindAll', 'on','type','annotation','Tag','ModelFeatures'),'Interpreter','off')
%% Simulation Results from Simscape Logging
%%
Expand Down
Binary file modified Models/Disk_Basic/Overview/html/sm_disk_cyl_on_floor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Models/Disk_Basic/Overview/html/sm_disk_cyl_on_floor_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Models/Disk_Basic/Overview/html/sm_disk_cyl_on_floor_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Models/Disk_Basic/Overview/sm_disk_cyl_on_floor.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

open_system('sm_disk_cyl_on_floor')

set_param(find_system('sm_disk_cyl_on_floor','FindAll', 'on','type','annotation','Tag','ModelFeatures'),'Interpreter','off')
set_param(find_system('sm_disk_cyl_on_floor','MatchFilter',@Simulink.match.allVariants,'FindAll', 'on','type','annotation','Tag','ModelFeatures'),'Interpreter','off')

%% Simulation Results from Simscape Logging
%%
Expand Down
Binary file modified Models/Disk_Basic/sm_disk_cyl_on_floor.slx
Binary file not shown.
Loading

0 comments on commit 0f9949e

Please sign in to comment.