Skip to content

Commit 2cf4a9e

Browse files
committed
Update to DEM Example
1 parent d6da753 commit 2cf4a9e

20 files changed

+68
-65
lines changed
0 Bytes
Binary file not shown.

Models/Cosim/B3D_Bucket/Overview/Excavator_Motion_B3D.m

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,29 @@
55
% (<matlab:web('Excavator_Design_Overview.html') return to Excavator Design Overview>)
66
%
77
% This example models an excavator acting against soil loads modeled using
8-
% discrete element modeling in ThreeParticle/CAE(TM) software. The motion of the
9-
% actuators is prescribed, and the simulation calculates the amount of force
8+
% discrete element modeling in ThreeParticle/CAE software. The motion of the
9+
% actuators is prescribed and the simulation calculates the amount of force
1010
% or torque required to execute the motion. Cosimulation is used to
11-
% connect the Simscape Multibody model to ThreeParticle/CAE(TM).
12-
%
13-
% *If you have downloaded the correct release from GitHub*, you can follow
14-
% the steps below to set up cosimulation on your machine. All of the files
15-
% you need to set up the cosimulation are provided in a specific release
16-
% you must obtain from the <https://github.com/simscape/Excavator-Simscape
17-
% GitHub repository>. You will also need <https://www.becker3d.com/
18-
% ThreeParticle/CAE(TM) software> R6.1 and API version 3.1.1 which you can
19-
% obtain in a trial license from BECKER 3D.
20-
%
21-
% Note that the compiled files provided will only work with MATLAB R2023a
22-
% on a Windows 64-bit operating system. To set up this example for other
23-
% versions or operating systems, please contact the authors of this
24-
% submission on the MATLAB Central File Exchange. We worked with
25-
% <https://simutopia.com/ Simutopia(R)> to create this example.
11+
% connect the Simscape Multibody model to ThreeParticle/CAE.
12+
%
13+
% Follow the steps below to set up cosimulation on your machine. All of
14+
% the files you need to set up the cosimulation are provided here. You
15+
% will also need ThreeParticle software. Note that the compiled files
16+
% provided will only work with MATLAB R2024a on a Windows 64 bit operating
17+
% system. To set up this example for other versions or operating systems,
18+
% please contact the authors of this submission on the MATLAB Central File
19+
% Exchange.
2620
%
27-
% <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
28-
% ThreeParticle DEM Soil Loads Model>
21+
% <matlab:open_system('Excavator_Motion_B3D') Open Excavator with ThreeParticle DEM Soil Loads Model>
2922
%
30-
% Copyright 2022-2024 The MathWorks, Inc.
23+
% Copyright 2022-2023 The MathWorks, Inc.
3124

3225
%% Cosimulation Setup
3326
%
34-
% (Note: the compiled files will only work with MATLAB R2023a on a Windows
27+
% (Note: the compiled files will only work with MATLAB R2024a on a Windows
3528
% 64 bit operating system.)
3629
%
37-
% *1. Copy |\Models\Cosim\util_zmq\zmqdll\libzmq-v143-mt-4_3_5.dll| to the
30+
% *1. Copy |\Models\Cosim\util_zmq\zmqdll\libzmq-v143-mt-4_3_6.dll| to the
3831
% "Bin" subfolder within your ThreeParticle installation directory.*
3932
%
4033
% <<Excavator_Motion_B3D_CopyZMQDLL.png>>
@@ -44,7 +37,7 @@
4437
%
4538
% <<Excavator_Motion_B3D_CopyAPICosimDLL.png>>
4639
%
47-
% *3. Open ThreeParticle/CAE(TM) Software*
40+
% *3. Open ThreeParticle Software*
4841
%
4942
% *4. Import keyword file
5043
% |\Models\Cosim\B3D_Bucket\Models_B3D\Bucket_Dig_Cycle.inp|*
@@ -53,7 +46,7 @@
5346
%
5447
% *5. In MATLAB, open Simulink model Excavator_Motion_B3D.slx*
5548
%
56-
% *6. Start the simulation in ThreeParticle/CAE(TM) software*
49+
% *6. Start the simulation in ThreeParticle software*
5750
%
5851
% <<Excavator_Motion_B3D_StartThreeParticleSim.png>>
5952
%

Models/Cosim/B3D_Bucket/Overview/html/Excavator_Motion_B3D.html

Lines changed: 27 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
To make changes, update the MATLAB code and republish this document.
88
-->
99
<title>Excavator Design with Simscape&trade;: Model Soil Loads</title>
10-
<meta name="generator" content="MATLAB 23.2">
10+
<meta name="generator" content="MATLAB 24.1">
1111
<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/">
12-
<meta name="DC.date" content="2023-12-08">
12+
<meta name="DC.date" content="2025-07-24">
1313
<meta name="DC.source" content="Excavator_Motion_B3D.m">
1414
<style type="text/css">
1515
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}
@@ -81,12 +81,10 @@ <h1>Excavator Design with Simscape&trade;: Model Soil Loads</h1>
8181
<p>
8282
<img vspace="5" hspace="5" src="Excavator_Motion_B3D_Overview.png" alt=""> </p>
8383
<p>(<a href="matlab:web('Excavator_Design_Overview.html')">return to Excavator Design Overview</a>)</p>
84-
<p>This example models an excavator acting against soil loads modeled using discrete element modeling in ThreeParticle/CAE&trade; 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&trade;.</p>
84+
<p>This example models an excavator acting against soil loads modeled using discrete element modeling in ThreeParticle/CAE 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.</p>
85+
<p>Follow the steps below to set up cosimulation on your machine. All of the files you need to set up the cosimulation are provided here. You will also need ThreeParticle software. Note that the compiled files provided will only work with MATLAB R2024a 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.</p>
8586
<p>
86-
<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&trade; software</a> R6.1 and API version 3.1.1 which you can obtain in a trial license from BECKER 3D.</p>
87-
<p>Note that the compiled files provided will only work with MATLAB R2023a 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>
88-
<p>
89-
<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>
87+
<a href="matlab:open_system('Excavator_Motion_B3D')">Open Excavator with ThreeParticle DEM Soil Loads Model</a>
9088
</p>
9189
<!--/introduction-->
9290
<h2>Contents</h2>
@@ -110,9 +108,9 @@ <h2>Contents</h2>
110108
</ul>
111109
</div>
112110
<h2 id="1">Cosimulation Setup</h2>
113-
<p>(Note: the compiled files will only work with MATLAB R2023a on a Windows 64 bit operating system.)</p>
111+
<p>(Note: the compiled files will only work with MATLAB R2024a on a Windows 64 bit operating system.)</p>
114112
<p>
115-
<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>
113+
<b>1. Copy <tt>\Models\Cosim\util_zmq\zmqdll\libzmq-v143-mt-4_3_6.dll</tt> to the "Bin" subfolder within your ThreeParticle installation directory.</b>
116114
</p>
117115
<p>
118116
<img vspace="5" hspace="5" src="Excavator_Motion_B3D_CopyZMQDLL.png" alt=""> </p>
@@ -122,7 +120,7 @@ <h2 id="1">Cosimulation Setup</h2>
122120
<p>
123121
<img vspace="5" hspace="5" src="Excavator_Motion_B3D_CopyAPICosimDLL.png" alt=""> </p>
124122
<p>
125-
<b>3. Open ThreeParticle/CAE&trade; Software</b>
123+
<b>3. Open ThreeParticle Software</b>
126124
</p>
127125
<p>
128126
<b>4. Import keyword file <tt>\Models\Cosim\B3D_Bucket\Models_B3D\Bucket_Dig_Cycle.inp</tt></b>
@@ -133,7 +131,7 @@ <h2 id="1">Cosimulation Setup</h2>
133131
<b>5. In MATLAB, open Simulink model Excavator_Motion_B3D.slx</b>
134132
</p>
135133
<p>
136-
<b>6. Start the simulation in ThreeParticle/CAE&trade; software</b>
134+
<b>6. Start the simulation in ThreeParticle software</b>
137135
</p>
138136
<p>
139137
<img vspace="5" hspace="5" src="Excavator_Motion_B3D_StartThreeParticleSim.png" alt=""> </p>
@@ -160,8 +158,8 @@ <h2 id="2">Model</h2>
160158
<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>
161159
<p>
162160
<img vspace="5" hspace="5" src="Excavator_Motion_B3D_results_soil_loads.png" alt=""> </p>
163-
<p class="footer">Copyright 2022-2024 The MathWorks, Inc.<br>
164-
<a href="https://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2023b</a>
161+
<p class="footer">Copyright 2022-2023 The MathWorks, Inc.<br>
162+
<a href="https://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2024a</a>
165163
<br>
166164
</p>
167165
</div>
@@ -174,36 +172,29 @@ <h2 id="2">Model</h2>
174172
% (<matlab:web('Excavator_Design_Overview.html') return to Excavator Design Overview>)
175173
%
176174
% This example models an excavator acting against soil loads modeled using
177-
% discrete element modeling in ThreeParticle/CAE(TM) software. The motion of the
178-
% actuators is prescribed, and the simulation calculates the amount of force
175+
% discrete element modeling in ThreeParticle/CAE software. The motion of the
176+
% actuators is prescribed and the simulation calculates the amount of force
179177
% or torque required to execute the motion. Cosimulation is used to
180-
% connect the Simscape Multibody model to ThreeParticle/CAE(TM).
178+
% connect the Simscape Multibody model to ThreeParticle/CAE.
181179
%
182-
% *If you have downloaded the correct release from GitHub*, you can follow
183-
% the steps below to set up cosimulation on your machine. All of the files
184-
% you need to set up the cosimulation are provided in a specific release
185-
% you must obtain from the <https://github.com/simscape/Excavator-Simscape
186-
% GitHub repository>. You will also need <https://www.becker3d.com/
187-
% ThreeParticle/CAE(TM) software> R6.1 and API version 3.1.1 which you can
188-
% obtain in a trial license from BECKER 3D.
189-
%
190-
% Note that the compiled files provided will only work with MATLAB R2023a
191-
% on a Windows 64-bit operating system. To set up this example for other
192-
% versions or operating systems, please contact the authors of this
193-
% submission on the MATLAB Central File Exchange. We worked with
194-
% <https://simutopia.com/ Simutopia(R)> to create this example.
180+
% Follow the steps below to set up cosimulation on your machine. All of
181+
% the files you need to set up the cosimulation are provided here. You
182+
% will also need ThreeParticle software. Note that the compiled files
183+
% provided will only work with MATLAB R2024a on a Windows 64 bit operating
184+
% system. To set up this example for other versions or operating systems,
185+
% please contact the authors of this submission on the MATLAB Central File
186+
% Exchange.
195187
%
196-
% <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
197-
% ThreeParticle DEM Soil Loads Model>
188+
% <matlab:open_system('Excavator_Motion_B3D') Open Excavator with ThreeParticle DEM Soil Loads Model>
198189
%
199-
% Copyright 2022-2024 The MathWorks, Inc.
190+
% Copyright 2022-2023 The MathWorks, Inc.
200191
201192
%% Cosimulation Setup
202193
%
203-
% (Note: the compiled files will only work with MATLAB R2023a on a Windows
194+
% (Note: the compiled files will only work with MATLAB R2024a on a Windows
204195
% 64 bit operating system.)
205196
%
206-
% *1. Copy |\Models\Cosim\util_zmq\zmqdll\libzmq-v143-mt-4_3_5.dll| to the
197+
% *1. Copy |\Models\Cosim\util_zmq\zmqdll\libzmq-v143-mt-4_3_6.dll| to the
207198
% "Bin" subfolder within your ThreeParticle installation directory.*
208199
%
209200
% <<Excavator_Motion_B3D_CopyZMQDLL.png>>
@@ -213,7 +204,7 @@ <h2 id="2">Model</h2>
213204
%
214205
% <<Excavator_Motion_B3D_CopyAPICosimDLL.png>>
215206
%
216-
% *3. Open ThreeParticle/CAE(TM) Software*
207+
% *3. Open ThreeParticle Software*
217208
%
218209
% *4. Import keyword file
219210
% |\Models\Cosim\B3D_Bucket\Models_B3D\Bucket_Dig_Cycle.inp|*
@@ -222,7 +213,7 @@ <h2 id="2">Model</h2>
222213
%
223214
% *5. In MATLAB, open Simulink model Excavator_Motion_B3D.slx*
224215
%
225-
% *6. Start the simulation in ThreeParticle/CAE(TM) software*
216+
% *6. Start the simulation in ThreeParticle software*
226217
%
227218
% <<Excavator_Motion_B3D_StartThreeParticleSim.png>>
228219
%
-2 Bytes
Loading
-407 Bytes
Loading
-60 Bytes
Loading
-24 Bytes
Loading
22.1 KB
Loading
-3 KB
Binary file not shown.

Models/Cosim/util_zmq/addZMQDLLtoSysPath.m

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
%% Add the ZMQ DLL to the system path:
1313
p = simulinkproject;
1414
if strcmp(mexext,'mexw64')
15-
zmqdll_list = dir([p.RootFolder '/**/util_zmq/zmqdll/libzmq*.dll']);
15+
zmqdll_list = dir([p.RootFolder '/**/Models/Cosim/util_zmq/zmqdll/libzmq*.dll']);
1616
if(length(zmqdll_list)==1)
1717
%if exist(fullfile(p.RootFolder,'Models','Cosim','zmq','libzmq','bin','x64','bin','Release','libzmq-v143-mt-4_3_5.dll'),'file')
1818
pathEnvVar = getenv('PATH');
@@ -25,18 +25,17 @@
2525
success = 1;
2626
msg = sprintf('%s\n%s','libzmq DLL already on system PATH:',[zmqdll_list.folder]);
2727
end
28-
elseif(length(zmqdll_list)>1)
28+
else
2929
success = 0;
30-
msg = ['ZMQ library not added to path. There were ' length(zmqdll_list') ' libzmq DLLs found in subfolders.'];
31-
elseif(isempty(zmqdll_list))
32-
msg = 'ZMQ library not found.';
30+
msg = 'libzmq DLL not found. Build libzmq DLL before adding to the system path.';
3331
end
3432
else
3533
success = 0;
3634
msg = 'Non-Windows OS, please add the ZMQ library to your PATH environment variable manually';
3735
end
3836

3937
if(showResult)
38+
msg = sprintf('%s\n%s','libzmq DLL added to system PATH:',[zmqdll_list.folder filesep zmqdll_list.name]);
4039
disp(msg)
4140
end
4241

0 commit comments

Comments
 (0)