Skip to content

Commit

Permalink
Added documentation for DEM example with ThreeParticle/CAE
Browse files Browse the repository at this point in the history
  • Loading branch information
smiller01985 committed May 5, 2023
1 parent a9f54e5 commit 238a419
Show file tree
Hide file tree
Showing 181 changed files with 507 additions and 237 deletions.
Binary file modified Models/Complete/Excavator_Complete.slx
Binary file not shown.
Binary file modified Models/Complete/Excavator_Motion.slx
Binary file not shown.
Binary file modified Models/Complete/ScenarioMotion.mat
Binary file not shown.
179 changes: 179 additions & 0 deletions Models/Cosim/B3D_Bucket/Overview/html/Excavator_Motion_B3D.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@

<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--
This HTML was auto-generated from MATLAB code.
To make changes, update the MATLAB code and republish this document.
--><title>Excavator Design with Simscape&#8482;: Model Soil Loads</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="2023-05-02"><meta name="DC.source" content="Excavator_Motion_B3D.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; }
html body { height:100%; margin:0px; font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#000; line-height:140%; background:#fff none; overflow-y:scroll; }
html body td { vertical-align:top; text-align:left; }

h1 { padding:0px; margin:0px 0px 25px; font-family:Arial, Helvetica, sans-serif; font-size:1.5em; color:#d55000; line-height:100%; font-weight:normal; }
h2 { padding:0px; margin:0px 0px 8px; font-family:Arial, Helvetica, sans-serif; font-size:1.2em; color:#000; font-weight:bold; line-height:140%; border-bottom:1px solid #d6d4d4; display:block; }
h3 { padding:0px; margin:0px 0px 5px; font-family:Arial, Helvetica, sans-serif; font-size:1.1em; color:#000; font-weight:bold; line-height:140%; }

a { color:#005fce; text-decoration:none; }
a:hover { color:#005fce; text-decoration:underline; }
a:visited { color:#004aa0; text-decoration:none; }

p { padding:0px; margin:0px 0px 20px; }
img { padding:0px; margin:0px 0px 20px; border:none; }
p img, pre img, tt img, li img, h1 img, h2 img { margin-bottom:0px; }

ul { padding:0px; margin:0px 0px 20px 23px; list-style:square; }
ul li { padding:0px; margin:0px 0px 7px 0px; }
ul li ul { padding:5px 0px 0px; margin:0px 0px 7px 23px; }
ul li ol li { list-style:decimal; }
ol { padding:0px; margin:0px 0px 20px 0px; list-style:decimal; }
ol li { padding:0px; margin:0px 0px 7px 23px; list-style-type:decimal; }
ol li ol { padding:5px 0px 0px; margin:0px 0px 7px 0px; }
ol li ol li { list-style-type:lower-alpha; }
ol li ul { padding-top:7px; }
ol li ul li { list-style:square; }

.content { font-size:1.2em; line-height:140%; padding: 20px; }

pre, code { font-size:12px; }
tt { font-size: 1.2em; }
pre { margin:0px 0px 20px; }
pre.codeinput { padding:10px; border:1px solid #d3d3d3; background:#f7f7f7; }
pre.codeoutput { padding:10px 11px; margin:0px 0px 20px; color:#4c4c4c; }
pre.error { color:red; }

@media print { pre.codeinput, pre.codeoutput { word-wrap:break-word; width:100%; } }

span.keyword { color:#0000FF }
span.comment { color:#228B22 }
span.string { color:#A020F0 }
span.untermstring { color:#B20000 }
span.syscmd { color:#B28C00 }
span.typesection { color:#A0522D }

.footer { width:auto; padding:10px 0px; margin:25px 0px 0px; border-top:1px dotted #878787; font-size:0.8em; line-height:140%; font-style:italic; color:#878787; text-align:left; float:none; }
.footer p { margin:0px; }
.footer a { color:#878787; }
.footer a:hover { color:#878787; text-decoration:underline; }
.footer a:visited { color:#878787; }

table th { padding:7px 5px; text-align:left; vertical-align:middle; border: 1px solid #d6d4d4; font-weight:bold; }
table td { padding:7px 5px; text-align:left; vertical-align:top; border:1px solid #d6d4d4; }





</style></head><body><div class="content"><h1>Excavator Design with Simscape&#8482;: Model Soil Loads</h1><!--introduction--><p><img vspace="5" hspace="5" src="Excavator_Motion_B3D_Overview.png" alt=""> </p><p>(<a href="matlab:web('Excavator_Design_Overview.html')">return to Excavator Design Overview</a>)</p><p>This example models an excavator acting against soil loads modeled using discrete element modeling in ThreeParticle/CAE&#8482; software. The motion of the actuators is prescribed, and the simulation calculates the amount of force or torque required to execute the motion. Cosimulation is used to connect the Simscape Multibody model to ThreeParticle/CAE&#8482;.</p><p><b>If you have downloaded the correct release from GitHub</b>, you can follow the steps below to set up cosimulation on your machine. All of the files you need to set up the cosimulation are provided in a specific release you must obtain from the <a href="https://github.com/simscape/Excavator-Simscape">GitHub repository</a>. You will also need <a href="https://www.becker3d.com/">ThreeParticle/CAE&#8482; software</a> R6.1 and API version 3.1.1 which you can obtain in a trial license from BECKER 3D.</p><p>Note that the compiled files provided will only work with MATLAB R2022b on a Windows 64-bit operating system. To set up this example for other versions or operating systems, please contact the authors of this submission on the MATLAB Central File Exchange. We worked with <a href="https://simutopia.com/">Simutopia&reg;</a> to create this example.</p><p><a href="matlab:try,open_system('Excavator_Motion_B3D'),catch,warning('Model%20Excavator_Motion_B3D.slx%20not%20found.%20Please%20obtain%20the%20correct%20release%20from%20GitHub.'),end">Open Excavator with ThreeParticle DEM Soil Loads Model</a></p><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#1">Cosimulation Setup</a></li><li><a href="#2">Model</a></li><li><a href="#3">Excavator Machine Subsystem</a></li><li><a href="#4">DEM Loads Subsystem</a></li><li><a href="#5">Dig Test</a></li></ul></div><h2 id="1">Cosimulation Setup</h2><p>(Note: the compiled files will only work with MATLAB R2022b on a Windows 64 bit operating system.)</p><p><b>1. Copy <tt>\Models\Cosim\util_zmq\zmqdll\libzmq-v143-mt-4_3_5.dll</tt> to the "Bin" subfolder within your ThreeParticle installation directory.</b></p><p><img vspace="5" hspace="5" src="Excavator_Motion_B3D_CopyZMQDLL.png" alt=""> </p><p><b>2. Copy <tt>\Models\Cosim\B3D_Bucket\CosimDLL\API_CoSimulation.dll</tt> to the <tt>"Bin\API"</tt> subfolder within your ThreeParticle installation directory.</b></p><p><img vspace="5" hspace="5" src="Excavator_Motion_B3D_CopyAPICosimDLL.png" alt=""> </p><p><b>3. Open ThreeParticle/CAE&#8482; Software</b></p><p><b>4. Import keyword file <tt>\Models\Cosim\B3D_Bucket\Models_B3D\Bucket_Dig_Cycle.inp</tt></b></p><p><img vspace="5" hspace="5" src="Excavator_Motion_B3D_LoadBucketDigCycle.png" alt=""> </p><p><b>5. In MATLAB, open Simulink model Excavator_Motion_B3D.slx</b></p><p><b>6. Start the simulation in ThreeParticle/CAE&#8482; software</b></p><p><img vspace="5" hspace="5" src="Excavator_Motion_B3D_StartThreeParticleSim.png" alt=""> </p><p><b>7. Start the simulation in Simulink</b></p><p><img vspace="5" hspace="5" src="Excavator_Motion_B3D_StartSimulinkSim.png" alt=""> </p><p><b>8. Monitor the progress in animation</b></p><p><img vspace="5" hspace="5" src="Excavator_Motion_B3D_ProgressAnimation.png" alt=""> </p><h2 id="2">Model</h2><img vspace="5" hspace="5" src="Excavator_Motion_B3D_01.png" alt=""> <h2 id="3">Excavator Machine Subsystem</h2><p><a href="matlab:open_system('Excavator_Motion_B3D');open_system('Excavator_Motion_B3D/Excavator/Machine','force');">Open Subsystem</a></p><img vspace="5" hspace="5" src="Excavator_Motion_B3D_02.png" alt=""> <h2 id="4">DEM Loads Subsystem</h2><p><a href="matlab:open_system('Excavator_Motion_B3D');open_system('Excavator_Motion_B3D/DEM%20Loads','force');">Open Subsystem</a></p><img vspace="5" hspace="5" src="Excavator_Motion_B3D_03.png" alt=""> <h2 id="5">Dig Test</h2><p>The simulation actuates the excavator arm to dig the bucket into the bed of particles which models the soil. The soil loads are plotted below.</p><p><img vspace="5" hspace="5" src="Excavator_Motion_B3D_results_soil_loads.png" alt=""> </p><p class="footer">Copyright 2022-2023 The MathWorks, Inc.<br><a href="https://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2022b</a><br></p></div><!--
##### SOURCE BEGIN #####
%% Excavator Design with Simscape(TM): Model Soil Loads
%
% <<Excavator_Motion_B3D_Overview.png>>
%
% (<matlab:web('Excavator_Design_Overview.html') return to Excavator Design Overview>)
%
% This example models an excavator acting against soil loads modeled using
% discrete element modeling in ThreeParticle/CAE(TM) software. The motion of the
% actuators is prescribed, and the simulation calculates the amount of force
% or torque required to execute the motion. Cosimulation is used to
% connect the Simscape Multibody model to ThreeParticle/CAE(TM).
%
% *If you have downloaded the correct release from GitHub*, you can follow
% the steps below to set up cosimulation on your machine. All of the files
% you need to set up the cosimulation are provided in a specific release
% you must obtain from the <https://github.com/simscape/Excavator-Simscape
% GitHub repository>. You will also need <https://www.becker3d.com/
% ThreeParticle/CAE(TM) software> R6.1 and API version 3.1.1 which you can
% obtain in a trial license from BECKER 3D.
%
% Note that the compiled files provided will only work with MATLAB R2022b
% on a Windows 64-bit operating system. To set up this example for other
% versions or operating systems, please contact the authors of this
% submission on the MATLAB Central File Exchange. We worked with
% <https://simutopia.com/ Simutopia(R)> to create this example.
%
% <matlab:try,open_system('Excavator_Motion_B3D'),catch,warning('Model%20Excavator_Motion_B3D.slx%20not%20found.%20Please%20obtain%20the%20correct%20release%20from%20GitHub.'),end Open Excavator with
% ThreeParticle DEM Soil Loads Model>
%
% Copyright 2022-2023 The MathWorks, Inc.
%% Cosimulation Setup
%
% (Note: the compiled files will only work with MATLAB R2022b on a Windows
% 64 bit operating system.)
%
% *1. Copy |\Models\Cosim\util_zmq\zmqdll\libzmq-v143-mt-4_3_5.dll| to the
% "Bin" subfolder within your ThreeParticle installation directory.*
%
% <<Excavator_Motion_B3D_CopyZMQDLL.png>>
%
% *2. Copy |\Models\Cosim\B3D_Bucket\CosimDLL\API_CoSimulation.dll| to the
% |"Bin\API"| subfolder within your ThreeParticle installation directory.*
%
% <<Excavator_Motion_B3D_CopyAPICosimDLL.png>>
%
% *3. Open ThreeParticle/CAE(TM) Software*
%
% *4. Import keyword file
% |\Models\Cosim\B3D_Bucket\Models_B3D\Bucket_Dig_Cycle.inp|*
%
% <<Excavator_Motion_B3D_LoadBucketDigCycle.png>>
%
% *5. In MATLAB, open Simulink model Excavator_Motion_B3D.slx*
%
% *6. Start the simulation in ThreeParticle/CAE(TM) software*
%
% <<Excavator_Motion_B3D_StartThreeParticleSim.png>>
%
% *7. Start the simulation in Simulink*
%
% <<Excavator_Motion_B3D_StartSimulinkSim.png>>
%
% *8. Monitor the progress in animation*
%
% <<Excavator_Motion_B3D_ProgressAnimation.png>>
%% Model
open_system('Excavator_Motion_B3D')
ann_h = find_system('Excavator_Motion_B3D','MatchFilter',@Simulink.match.allVariants,'FindAll', 'on','type','annotation','Tag','ModelFeatures');
for i=1:length(ann_h)
set_param(ann_h(i),'Interpreter','off');
end
%% Excavator Machine Subsystem
%
% <matlab:open_system('Excavator_Motion_B3D');open_system('Excavator_Motion_B3D/Excavator/Machine','force'); Open Subsystem>
set_param('Excavator_Motion_B3D/Excavator/Machine','LinkStatus','none')
open_system('Excavator_Motion_B3D/Excavator/Machine','force')
%% DEM Loads Subsystem
%
% <matlab:open_system('Excavator_Motion_B3D');open_system('Excavator_Motion_B3D/DEM%20Loads','force'); Open Subsystem>
set_param('Excavator_Motion_B3D/DEM Loads','LinkStatus','none')
open_system('Excavator_Motion_B3D/DEM Loads','force')
%% Dig Test
%
% The simulation actuates the excavator arm to dig the bucket into the bed
% of particles which models the soil. The soil loads are plotted below.
%
% <<Excavator_Motion_B3D_results_soil_loads.png>>
%%
%clear all
close all
bdclose all
##### SOURCE END #####
--></body></html>
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.
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.
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.
Binary file modified Models/Libraries/Excavator_Parts_Lib.slx
Binary file not shown.
Binary file modified Models/Libraries/Excavator_Parts_Param_Lib.slx
Binary file not shown.
2 changes: 1 addition & 1 deletion Models/Overview/html/Excavator_Complete.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>Excavator Design with Simscape&#8482;: Hydromechanical Model with Controls</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="2023-01-31"><meta name="DC.source" content="Excavator_Complete.m"><style type="text/css">
--><title>Excavator Design with Simscape&#8482;: Hydromechanical Model with Controls</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="2023-04-30"><meta name="DC.source" content="Excavator_Complete.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
Binary file modified Models/Overview/html/Excavator_Complete.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/Overview/html/Excavator_Complete_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/Overview/html/Excavator_Complete_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/Overview/html/Excavator_Complete_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/Overview/html/Excavator_Complete_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/Overview/html/Excavator_Complete_05.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/Overview/html/Excavator_Complete_06.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/Overview/html/Excavator_Complete_07.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/Overview/html/Excavator_Complete_08.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/Overview/html/Excavator_Complete_09.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/Overview/html/Excavator_Complete_10.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/Overview/html/Excavator_Complete_11.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/Overview/html/Excavator_Complete_12.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/Overview/html/Excavator_Complete_13.png
Binary file modified Models/Overview/html/Excavator_Complete_14.png
Loading

0 comments on commit 238a419

Please sign in to comment.