To run simulations with SPACAR Light, the following components all need to be installed:
Both Windows and macOS (Intel processors) are supported. There's no support for Macs with Apple Silicon (M1 and M2) processors yet.
Note that version older than indicated might work, but they are not supported. After installation, a default user work folder is created automatically. Typically it is
on Windows: C:\Users/[user]\Documents\MATLAB on macOS: /Users/[user]/Documents/MATLAB
You can find the path by running userpath
in the command window.
Download the zip-file containing SPACAR (full) 2017 (see link at the top of this page). It is recommended that you extract this into a new folder spacar
, located in the default user work folder of MATLAB. The spacar
folder will contain some files and a private
folder. The folder structure would then look like:
[userpath]\spacar\spacar.mexw64 [userpath]\spacar\spacar.mexmaci64 [userpath]\spacar\spavisual.m [userpath]\spacar\stressbeam.m ... etc ... [userpath]\spacar\private\
Development is active and happening on GitHub. The latest version can be found there. In case of bug fixes and new features, that page will reflect the changes.
Download the 'Source code (zip)'-file of the most recent version. Extract this in the same spacar
folder as in the previous step. The following files should now also be present:
[userpath]\spacar\spacarlight.m [userpath]\spacar\spacarexample.m
(The README.md
file and .gitignore
file can be ignored.)
To test the installation, the spacarexample.m
file is provided (and located in the [userpath]\spacar
folder, as per step 3). Open this file in MATLAB and hit Run. If this produces a new Spavisual window, without errors in the MATLAB command window, it is likely that SPACAR Light is installed correctly.
Running SPACAR on macOS for the first time may trigger Gatekeeper, displaying a message that spacar.mexmaci64
cannot be opened because the developer cannot be verified. This is to be expected and can be dealt with by clicking Cancel (not Move to Trash). Then, go to System Preferences, Security & Privacy, tab General, and click Open Anyway. Now, again run spacarexample.m
in MATLAB. The same message may appear once more for getfrsbf.mexmaci64
; follow the same steps. After that, SPACAR should run.
To keep all files of the SPACAR software bundle together, the spacar
folder was created within the userpath
in a previous step. It is recommended to keep user scripts for a particular model out of this folder, and store those at [userpath]\myscript.m
(or within a separate folder [userpath]\mymodel\myscript.m
).
When doing so and running myscript.m
, MATLAB is likely unable to find SPACAR Light without configuring the search path appropriately. This can be accomplished by simply adding the line
addpath('spacar')
to the top of myscript.m
(when it is indeed located at [userpath]\myscript.m
; otherwise see doc addpath
in the MATLAB command window.)