Skip to content

Commit

Permalink
Initial commit R2016b
Browse files Browse the repository at this point in the history
  • Loading branch information
smiller01985 committed Oct 19, 2019
1 parent 9ff9d1e commit 670e35b
Show file tree
Hide file tree
Showing 28 changed files with 264 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
%% Generate Results: Lumped Parameter Beam, Vary Number of Elements
% Copyright 2017 The MathWorks, Inc.

open_system('sm_flex_lumped_param_beam');
set_param([bdroot '/Flexible Beam'],'radio_flextype','Rotation: Z');
sm_flex_lumped_param_beam_configure_load(bdroot,'Tip Load');
Expand Down
231 changes: 231 additions & 0 deletions Examples/Simple/html/html/sm_flex_fe_import_beam.html

Large diffs are not rendered by default.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Examples/Simple/html/html/sm_flex_fe_import_beam_01.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Examples/Simple/html/html/sm_flex_fe_import_beam_02.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Examples/Simple/html/html/sm_flex_fe_import_beam_03.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Examples/Simple/sm_flex_fe_import_beam.slx
Binary file not shown.
Binary file removed Examples/Simple/sm_flex_fe_import_beam_test.slx
Binary file not shown.
Binary file modified Examples/Simple/sm_flex_lumped_param_beam.slx
Binary file not shown.
Binary file modified Examples/Slider_Crank/sm_flex_slider_crank.slx
Binary file not shown.
4 changes: 2 additions & 2 deletions Libraries/html/html/sm_flex_body_lib_fe_import_body.html

Large diffs are not rendered by default.

Binary file modified Libraries/html/html/sm_flex_body_lib_fe_import_body.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Libraries/html/html/sm_flex_body_lib_fe_import_body_01.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 19 additions & 2 deletions Libraries/html/html/sm_flex_body_lib_lumped_par_beam.html

Large diffs are not rendered by default.

Binary file modified Libraries/html/html/sm_flex_body_lib_lumped_par_beam.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Libraries/html/html/sm_flex_body_lib_lumped_par_beam_01.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Libraries/sm_flex_body_lib.slx
Binary file not shown.
11 changes: 8 additions & 3 deletions Libraries/sm_flex_body_lib_lpar_construct_beam.m
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,15 @@ function sm_flex_body_lib_lpar_construct_beam(b_h,numelem,flextype)
add_line(thisblock,[sprintf('Transform\nBeamX') '/Rconn1'],['Flex_Elem_' elem_name_prefix '1' '/Lconn1'],'autorouting','on');

% Add and connect remainder of flexible elements
%numelem_per_row = 20;
numelem_per_row = ceil(sqrt(numelem));
if (numelem>1)
for i = 2:1:numelem
%disp(['Num elem = ' num2str(i)]);
elem_name_prefix = repmat('0',1,numDigits-length(num2str(i)));
add_block(flex_elem_src,[thisblock '/Flex_Elem_' elem_name_prefix num2str(i)],'Position',blk_or+(i+1)*[80 0 80 0])
elem_x = mod(i,numelem_per_row);
elem_y = floor(i/numelem_per_row);
add_block(flex_elem_src,[thisblock '/Flex_Elem_' elem_name_prefix num2str(i)],'Position',blk_or+(elem_x+1)*[80 0 80 0]+(elem_y)*[0 80 0 80])
elem_name_prefix_prev = repmat('0',1,numDigits-length(num2str(i-1)));
add_line(thisblock,['Flex_Elem_' elem_name_prefix_prev num2str(i-1) '/Rconn1'],['Flex_Elem_' elem_name_prefix num2str(i) '/Lconn1'],'autorouting','on');
end
Expand All @@ -73,12 +78,12 @@ function sm_flex_body_lib_lpar_construct_beam(b_h,numelem,flextype)
end

% Create and connect last rigid transform (orient as starting frame)
add_block('sm_lib/Frames and Transforms/Rigid Transform',[thisblock '/TransformPortF'],'Position',blk_or+(numelem+2)*[80 0 80 0])
add_block('sm_lib/Frames and Transforms/Rigid Transform',[thisblock '/TransformPortF'],'Position',blk_or+(numelem_per_row+2)*[80 0 80 0])
%set_param([thisblock '/' sprintf('Transform\nBeamF')],'Position',blk_or+(numelem+2)*[80 0 80 0])
add_line(thisblock,['Flex_Elem_' elem_name_prefix num2str(i) '/Rconn1'],[sprintf('TransformPortF') '/Lconn1'],'autorouting','on');

% Add F Port
set_param([thisblock '/F'],'Position',blk_or+(numelem+3)*[80 0 80 0]);
set_param([thisblock '/F'],'Position',blk_or+(numelem_per_row+3)*[80 0 80 0]);
add_line(thisblock,[sprintf('TransformPortF') '/Rconn1'],['F/Rconn1'],'autorouting','on');

set_param([thisblock '/TransformPortF'],...
Expand Down
4 changes: 2 additions & 2 deletions Scripts_Data/Doc/html/Flex_Body_Library_Demo_Script.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>Simscape Multibody Flexible Body Library</title><meta name="generator" content="MATLAB 9.0"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2017-10-23"><meta name="DC.source" content="Flex_Body_Library_Demo_Script.m"><style type="text/css">
--><title>Simscape Multibody Flexible Body Library</title><meta name="generator" content="MATLAB 9.1"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2017-10-23"><meta name="DC.source" content="Flex_Body_Library_Demo_Script.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,sub,sup,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 @@ -77,7 +77,7 @@
<tr><br>
<tr><b><u>Applications </u></b><br>
<tr>1. Slider Crank: <a href="matlab:open_system('sm_flex_slider_crank.slx');"> Model</a>, <a href="matlab:web('sm_flex_slider_crank.html');">Documentation</a><br>
</p><p>Copyright 2017 The MathWorks&#8482;, Inc.</p><p class="footer"><br><a href="http://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2016a</a><br></p></div><!--
</p><p>Copyright 2017 The MathWorks&#8482;, Inc.</p><p class="footer"><br><a href="http://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2016b</a><br></p></div><!--
##### SOURCE BEGIN #####
%% Simscape Multibody Flexible Body Library
%
Expand Down
4 changes: 2 additions & 2 deletions Scripts_Data/Doc/html/Flex_Body_Library_Overview.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>Simscape Multibody Flexible Library: Overview</title><meta name="generator" content="MATLAB 9.0"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2017-10-23"><meta name="DC.source" content="Flex_Body_Library_Overview.m"><style type="text/css">
--><title>Simscape Multibody Flexible Library: Overview</title><meta name="generator" content="MATLAB 9.1"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2017-10-23"><meta name="DC.source" content="Flex_Body_Library_Overview.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,sub,sup,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 @@ -66,7 +66,7 @@



</style></head><body><div class="content"><h1>Simscape Multibody Flexible Library: Overview</h1><p>This Simscape Multibody Flexible Body offers two methods for modeling flexible bodies: lumped parameter method and finite element import method. Your use case will determine which method is appropriate for you.</p><p><a href="matlab:web('Flex_Body_Library_Demo_Script.html');">Return to Summary</a></p><p><b>Lumped Parameter Method</b></p><p><a href="matlab:web('sm_flex_body_lib_lumped_par_beam.html');">View documentation for lumped parameter model</a></p><p>This method models the flexible body as a chain of mass-spring- dampers. You specify the cross section of the body, material, and number of elements, and MATLAB calculates the necessary parameters and constructs the chain of flexible elements.</p><p>This method is recommended if:</p><div><ol><li>The cross-section of the body does not vary along its length</li><li>Expected deflection is in the linear range</li></ol></div><p><b>Finite Element Method</b></p><p><a href="matlab:web('sm_flex_body_lib_fe_import_body.html');">View documentation for finite element model</a></p><p>This method superimposes superimposes deflection of the body onto rigid body motion. Degrees of freedom are added to the rigid body to model the deflection of the body. Those deflections are used to calculate the forces that resist deflection. That calculation is performed using the mass and stiffness matrices of the flexible body, which are often calcuated using finite element software.</p><p>This method is recommended if:</p><div><ol><li>The geometry of the flexible body is complex</li><li>You have a means of calculating the mass and stiffness matrices for your flexible body (usually requires finite element software)</li><li>The connection points to the rest of the system are known and not likely to change.</li></ol></div><p>Copyright 2017 The MathWorks&#8482;, Inc.</p><p class="footer"><br><a href="http://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2016a</a><br></p></div><!--
</style></head><body><div class="content"><h1>Simscape Multibody Flexible Library: Overview</h1><p>This Simscape Multibody Flexible Body offers two methods for modeling flexible bodies: lumped parameter method and finite element import method. Your use case will determine which method is appropriate for you.</p><p><a href="matlab:web('Flex_Body_Library_Demo_Script.html');">Return to Summary</a></p><p><b>Lumped Parameter Method</b></p><p><a href="matlab:web('sm_flex_body_lib_lumped_par_beam.html');">View documentation for lumped parameter model</a></p><p>This method models the flexible body as a chain of mass-spring- dampers. You specify the cross section of the body, material, and number of elements, and MATLAB calculates the necessary parameters and constructs the chain of flexible elements.</p><p>This method is recommended if:</p><div><ol><li>The cross-section of the body does not vary along its length</li><li>Expected deflection is in the linear range</li></ol></div><p><b>Finite Element Method</b></p><p><a href="matlab:web('sm_flex_body_lib_fe_import_body.html');">View documentation for finite element model</a></p><p>This method superimposes superimposes deflection of the body onto rigid body motion. Degrees of freedom are added to the rigid body to model the deflection of the body. Those deflections are used to calculate the forces that resist deflection. That calculation is performed using the mass and stiffness matrices of the flexible body, which are often calcuated using finite element software.</p><p>This method is recommended if:</p><div><ol><li>The geometry of the flexible body is complex</li><li>You have a means of calculating the mass and stiffness matrices for your flexible body (usually requires finite element software)</li><li>The connection points to the rest of the system are known and not likely to change.</li></ol></div><p>Copyright 2017 The MathWorks&#8482;, Inc.</p><p class="footer"><br><a href="http://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2016b</a><br></p></div><!--
##### SOURCE BEGIN #####
%% Simscape Multibody Flexible Library: Overview
%
Expand Down
10 changes: 0 additions & 10 deletions Scripts_Data/publish_all_sm_flex_body.m

This file was deleted.

0 comments on commit 670e35b

Please sign in to comment.