- For more information, please check the documentation.
- Video introduction
- To refer MUSEN please use Dosta et al., 2020.
- New versions and updates.
MUSEN should install and work on all latest versions of Windows or Linux (Ubuntu or Red Head). Requires Visual C++ Redistributable for Visual Studio 2019 to run on Windows.
A fully functional version can be compiled and built with Microsoft Visual Studio 2019.
- Microsoft Visual Studio 2019
- Qt 5.15.2 msvc2019_64
- Qt Visual Studio Tools for Visual Studio 2019
- CUDA 11.2
- Git
- CMake
- (optional) MATLAB R2019a
-
Download and install all requirements on your computer.
1.1. Microsoft Visual Studio: select "Desktop Development with C++" when choosing what components to install.
1.2. Qt: You will need to create a free Qt-account to run installation. When selecting components, choose Qt → Qt 5.15.2 → MSVC 2019 64-bit.
1.3. CUDA: Download the specified version of CUDA and install the configuration proposed by the setup utility.
1.4. Use the last available version of CMake and select the option "Add to system path" if available during installation.
1.5. Use the last available version of Git.
-
Setup Qt Visual Studio Tools extension to point to the installed Qt libraries. In Visual Studio 2019, go to Extensions → Qt VS Tools → Qt Options → Add → ... → Navigate in the Qt installation directory to
X:/path/to/Qt/5.15.2/msvc2019_64
→ OK. -
Prepare third-party statically linked libraries: zlib, protobuf. To do this, navigate to
X:/path/to/msolids/MUSEN/ExternalLibraries/
and execute filesRunZLibCompile.bat
andRunProtobufCompile.bat
. They will download and build all the required libraries by executing filesCompileZLib.ps1
,CompileProtobuf.ps1
. -
Open
X:/path/to/msolids/MUSEN/MUSEN/musen.sln
file with Visual Studio and build the solution.
A fully functional version can be compiled and built with cmake and gcc in WSL.
- Enable the Windows Subsystem for Linux. Open PowerShell as Administrator and run:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
-
Upgrade to WSL 2. Requirements: Windows Version 1903 or higher, with Build 18362 or higher. If you don't want to upgrade, restart your computer and move to step 3.
2.1. Enable Virtual Machine feature. Open PowerShell as Administrator and run:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
2.2. Download and install the latest Linux kernel update package.
2.3. Set WSL 2 as your default version. Open PowerShell as Administrator and run:
wsl --set-default-version 2
-
Open the Microsoft Store and install Ubuntu 20.04 LTS distribution.
-
Launch the installed distribution and follow the instructions for initial setup.
-
Login to your distribution and update it by running:
sudo apt update
sudo apt upgrade
- Install all required tools and libraries. E.g. if the project is located at
C:/Projects/msolids/
:
cd /mnt/c/Projects/msolids/MUSEN_Linux
sudo chmod +x ./install_prerequisites_host.sh
sudo ./install_prerequisites_host.sh
-
Compile MUSEN either with Visual Studio (step 7.a) or directly in Ubuntu (step 7.b)
7.a Open
C:/Projects/msolids/MUSEN/MUSEN/musen.sln
file with Visual Studio. In Solution Explorer underInstallers
folder selectLinuxBuildWSL
project, then from the main menu navigate to (Project → Properties → Configuration Properties → Linux Build Settings) and select MUSEN versions that you want to build. Run building projectLinuxBuildWSL
(Build → Build Selection).7.b Compile MUSEN by running:
sudo chmod +x ./compile_on_host.sh ./compile_on_host.sh --target=cli --target=gui
-
The built executables will be placed in
C:/Projects/msolids/MUSEN_Linux/compiled/
.
A fully functional version can be compiled and built with cmake and gcc.
- gcc-9, g++-9
- cmake 3.18.0
- qt 5.15.2 gcc_64
- cuda 11.2
- zlib 1.2.11
- protobuf 3.14.0
- (optional) MATLAB R2019a
- Navigate to
/path/to/msolids/MUSEN_Linux/
- Install all required build tools and third-party libraries executing
./install_prerequisites_host.sh
Alternatively, install all required build tools (gcc, cmake, cuda) either manually or executing
./install_gcc.sh
./install_cmake.sh
./install_cuda
then compile all third-party libraries executing
./install_zlib.sh
./install_protobuf.sh
./install_qt.sh
- Start compilation by executing
./compile_on_host.sh --target=cli --target=gui
- Built executables can be found in
/path/to/msolids/MUSEN_Linux/compiled
.
- Install required additional libraries
sudo apt install libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0
- Extract the compiled GUI version, e.g.
tar xfvz /path/to/msolids/MUSEN_Linux/compiled/vX.X.X_name/musen_gui.tar.gz
- Run the startup script
sudo chmod +x musen_gui/musen.sh
musen_gui/musen.sh
- Databases - agglomerates, geometries and materials databases
- ExternalLibraries - external libraries used in MUSEN (zlib and protobuf)
- GeneralFunctions - main functions and types used in MUSEN
- GeneralFunctions\SimResultsStorage - low-level functions for data handling (load and save data)
- MUSEN
- MUSEN\CMusen - command-line version of MUSEN
- MUSEN\Models - contact models (particle-particle, particle-wall, solid bonds, ...)
- MUSEN\Modules
- MUSEN\Modules\BondsGenerator - generate bonds between particles
- MUSEN\Modules\ContactAnalyzer - general functions for fast contacts detection
- MUSEN\Modules\FileManager - set of functions to convert, merge or modify .mdem files with simulation results
- MUSEN\Modules\Geometries - set of classes and functions to work with geometrical objects
- MUSEN\Modules\ObjectsGenerator - dynamically generates particles or agglomerates during simulation
- MUSEN\Modules\PackageGenerator - generate packing of particles prior simulation
- MUSEN\Modules\ResultsAnalyzer - analyzer of simulation results (export necessary data to csv files)
- MUSEN\Modules\ScriptInterface - analyze input scripts for command-line version
- MUSEN\Modules\SimplifiedScene - simplified entity generated from SystemStructure and which is used during simulation
- MUSEN\Modules\Simulator - CPU and GPU simulators
- MUSEN\Modules\SystemStructure - main entity which stores the information about whole scene
- MUSEN\QTDialog - Qt dialog for main window
- MUSEN_Linux - set of scripts to compile MUSEN for linux
- QTDialogs - different Qt-based dialogs of GUI
- CUDA 11.2 – Nvidia Corporation – NVIDIA License
- Inno Setup 6.1.2 – Jordan Russell – Modified BSD License
- Protobuf 3.14.0 – Google Inc. – BSD License
- Qt 5.15.2 – The Qt Company – LGPLv3 License
- Visual Studio Community 2019 – Microsoft Corporation – Microsoft Software License Terms
- zlib v1.2.11 – Jean-loup Gailly and Mark Adler – zlib License