Giter Club home page Giter Club logo

musen's Introduction

MUSEN - GPU-accelerated DEM simulation framework

Requirements

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.

Compilation on Windows

A fully functional version can be compiled and built with Microsoft Visual Studio 2019.

Requirements on Windows

Build on Windows

  1. 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.

  2. 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.

  3. Prepare third-party statically linked libraries: zlib, protobuf. To do this, navigate to X:/path/to/msolids/MUSEN/ExternalLibraries/ and execute files RunZLibCompile.bat and RunProtobufCompile.bat. They will download and build all the required libraries by executing files CompileZLib.ps1, CompileProtobuf.ps1.

  4. Open X:/path/to/msolids/MUSEN/MUSEN/musen.sln file with Visual Studio and build the solution.

Compilation for Linux on Windows with WSL (Windows Subsystem for Linux)

A fully functional version can be compiled and built in WSL.

Build in WSL:

  1. Enable the Windows Subsystem for Linux. Open PowerShell and run:
wsl --install

Additional information here.

  1. Install Ubuntu
wsl --install -d Ubuntu-22.04
  1. Launch the installed distribution and follow the instructions for initial setup.

  2. Login to your distribution and update it by running:

sudo apt update
sudo apt upgrade
  1. Install all required tools and libraries, as described in Build on Linux.

  2. Compile MUSEN either with Visual Studio (step 6.a) or directly in Ubuntu (step 6.b)

    6.a Open .../musen/musen.sln file with Visual Studio 2019. In Solution Explorer under Installers folder select LinuxBuildWSL 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 project LinuxBuildWSL (Build → Build Selection).

    6.b Compile MUSEN as described in Build on Linux.

  3. The built executables will be placed in ...musen/Installers/Installers/.

Compilation on Linux

A fully functional version can be compiled and built with cmake and gcc.

Minimum requirements on Linux

  • gcc-7.5, g++-7.5
  • cmake 3.0.0
  • protobuf 3.0.0
  • qt 5.9.5
  • cuda 9.1 The versions of CUDA and C++ compiler must be compatible. See compatibility list e.g. here.

Build on Linux

Tested on Ubuntu 18.04, 20.04, 22.04.

  1. Change the current working directory to the desired location and download the MUSEN code:
cd /path/to/desired/location/
git clone --depth 1 https://github.com/msolids/musen.git
cd musen
  1. Install required tools and libraries.
sudo apt install build-essential cmake zlib1g-dev libprotobuf-dev protobuf-compiler libqt5opengl5-dev
  1. Install CUDA
sudo apt install nvidia-cuda-toolkit

or in case of compatibility issues (usually on Ubuntu 22.04), using official installation guide or running the script for Ubuntu:

./scripts/install_cuda.sh
exec bash
  1. Build MUSEN
mkdir install
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=../install
cmake --build . --parallel $(nproc)
make install
  1. Built executables can be found in
cd ../install

Code organization

  • CMusen - command-line version of MUSEN
  • Databases - agglomerates, geometries and materials databases
  • Documentation - manuals
  • ExternalLibraries - external libraries used in MUSEN on Windows (zlib and protobuf)
  • GeneralFunctions - main functions and types used in MUSEN
  • Installers - scripts and data needed to build installers on Windows
  • Models - contact models (particle-particle, particle-wall, solid bonds, etc.)
  • Modules\BondsGenerator - generate bonds between particles
  • Modules\ContactAnalyzer - functions for contacts detection
  • Modules\FileManager - set of functions to convert, merge or modify .mdem files with simulation results
  • Modules\GeneralSources - general components
  • Modules\Geometries - set of classes and functions to work with geometrical objects
  • Modules\ObjectsGenerator - dynamic particles or agglomerates generator
  • Modules\PackageGenerator - generate packing of particles prior simulation
  • Modules\ResultsAnalyzer - analyzer of simulation results (export necessary data to csv files)
  • Modules\ScriptInterface - analyze input scripts for command-line version
  • Modules\SimplifiedScene - simplified entity generated from SystemStructure and which is used during simulation
  • Modules\SimResultsStorage - low-level functions for data handling (load and save data)
  • Modules\Simulator - CPU and GPU simulators
  • Modules\SystemStructure - main entity which stores the information about whole scene
  • MusenGUI - graphical version of MUSEN
  • QTDialog - Qt-based dialogs for graphical user interface
  • Version - version information

Third-party tools and libraries

musen's People

Contributors

dostamax avatar vasylskorych avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

musen's Issues

Issue with 'as multisphere'

Hello, I want to implement Multisphere in 'Agglomerate', but the option is greyed out, how can I solve this issue?

error during compilation in VS2017

Hi,
Thanks for this nice code! A pleasure to work with. We face a problem of compilation in VS2017, not finding GeneratedFiles directory (Everything is installes properly, CUDA, QT, etc....).
Thanks for your help

Best regards

1>------ Début de la génération : Projet : MaterialsDatabase, Configuration : Debug x64 ------
1>BaseProperty.cpp
1>Compound.cpp
1>ConstProperty.cpp
1>Correlation.cpp
1>MaterialsDatabase.pb.cc
1>Interaction.cpp
1>MaterialsDatabase.cpp
1>Mixture.cpp
1>c1xx : fatal error C1083: Impossible d'ouvrir le fichier source : 'GeneratedFiles\MaterialsDatabase.pb.cc' : No such file or directory
1>d:\musen\musen-master\musen-master\databases\materialsdatabase\definesmdb.h(15): fatal error C1083: Impossible d'ouvrir le fichier include : 'GeneratedFiles/MaterialsDatabase.pb.h' : No such file or directory (compilation du fichier source BaseProperty.cpp)
1>d:\musen\musen-master\musen-master\databases\materialsdatabase\definesmdb.h(15): fatal error C1083: Impossible d'ouvrir le fichier include : 'GeneratedFiles/MaterialsDatabase.pb.h' : No such file or directory (compilation du fichier source Compound.cpp)
1>d:\musen\musen-master\musen-master\databases\materialsdatabase\definesmdb.h(15): fatal error C1083: Impossible d'ouvrir le fichier include : 'GeneratedFiles/MaterialsDatabase.pb.h' : No such file or directory (compilation du fichier source ConstProperty.cpp)
1>d:\musen\musen-master\musen-master\databases\materialsdatabase\definesmdb.h(15): fatal error C1083: Impossible d'ouvrir le fichier include : 'GeneratedFiles/MaterialsDatabase.pb.h' : No such file or directory (compilation du fichier source MaterialsDatabase.cpp)
1>d:\musen\musen-master\musen-master\databases\materialsdatabase\definesmdb.h(15): fatal error C1083: Impossible d'ouvrir le fichier include : 'GeneratedFiles/MaterialsDatabase.pb.h' : No such file or directory (compilation du fichier source Mixture.cpp)
1>d:\musen\musen-master\musen-master\databases\materialsdatabase\definesmdb.h(15): fatal error C1083: Impossible d'ouvrir le fichier include : 'GeneratedFiles/MaterialsDatabase.pb.h' : No such file or directory (compilation du fichier source Interaction.cpp)
1>TPProperty.cpp

and so on....

Export as text inaccuracy

Hi Vasyl,

i noticed a accuracy problem when using the "Export as text" function. I used the Package Generator to fill a scene with particles. I set the max_overlap to 1e-05 mm. After generating, I checked the max_overlap in the object editor, which reads 9.8e-06. Than I use the "export as text" function and reload the saved file with the "import from text" function. Checking the object editor again, the maximum overlap now is 0.00012.

Can you check what is going on please?

I am using Musen 1.73.1 Build 230120.161242.409f6bc3.open running with Windows 10.

Issue with collision saving

Hello,

I'm using MUSEN 1.73.1 on windows 10 entreprise
Here are my computer spec :
11th Gen Intel(R) core(TM) i7 - 11850H @ 2.50GHz
Intel(R) UHD Graphics

I'm trying to launch a simple simulation with 20 particles and save collisions
First of all, I don't find "save collision" in the graphical user interface. Is-it in Start simulation Window ?

My CMUSEN launch.txt is just below :

**_JOB
SOURCE_FILE test_collision.mdem
RESULT_FILE test_collision_result.mdem
COMPONENT SIMULATION

SIMULATION_STEP 0.00000008
SAVING_STEP 0.001
END_TIME 0.1
SAVE_COLLISIONS YES
SIMULATOR_TYPE CPU
MODEL_PP ModelPPJKR
MODEL_PW ModelPWHertzMindlin
EXT_ACCEL 0 0 -9.81
SIMULATION_DOMAIN -0.00012 -0.00012 -0.00012 0.00012 0.00012 0.00015_**

I have previously created an empty "test_collision_result.coll" in order to store collisions DATA.

When I launch the simulation, save collisions is taken into acount but simulation is aborted, as seen bellow. Moreover the same simulation without save collisions is running well.

_**Number of jobs: 1

//////////////////// Start processing job: 1 ////////////////////
Source file: test_collision.mdem
Result file: test_collision_result.mdem
Selected component: Simulator

Loading source file ... complete
Creating result file ... complete
Simulator type: CPU
Initial simulation time step [s]: 8e-08
Saving time step [s]: 0.001
End time [s]: 0.1
Variable simulation time step: No
Particle-particle contacts: JKR
Particle-wall contacts: Hertz-Mindlin
Auto-adjust Verlet distance: Yes
Initial Verlet coefficient: 2
Max Verlet cell number: 50
Consider particles anisotropy: No
Extended contact radius: No
Collisions saving: Yes
Selective saving: No
Periodic boundaries: Yes
Periodic boundaries enabled (X:Y:Z): No : Yes : No
Periodic boundary domain Y [m]: -7.5e-05 to 7.5e-05
External acceleration (X:Y:Z) [m/s^2]: 0 : 0 : -9.81
Simulation domain X [m]: -0.00012 to 0.00012
Simulation domain Y [m]: -0.00012 to 0.00012
Simulation domain Z [m]: -0.00012 to 0.00015

Total number of particles: 20
Total number of walls: 8636
Total number of solid bonds: 0
Total number of liquid bonds: 0

==================== Simulation started ====================

C:\Users\ms266161\Desktop\calculMUSEN>CMUSEN.exe lancement_etalement.txt
+---- Start creating thread pool ----+
Creating thread pool ... successful
Cores allowed by system: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
No user parameters for affinities present. Using system parameters.
Number of parallel threads created: 16
Threads pinned to cores: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Affinities set successfully
+---- Thread pool created ----+

Script name: lancement_etalement.txt
Number of jobs: 1

//////////////////// Start processing job: 1 ////////////////////
Source file: test_collision.mdem
Result file: test_collision_result.mdem
Selected component: Simulator

Loading source file ... complete
Creating result file ... complete
Simulator type: CPU
Initial simulation time step [s]: 8e-08
Saving time step [s]: 0.001
End time [s]: 0.1
Variable simulation time step: No
Particle-particle contacts: JKR
Particle-wall contacts: Hertz-Mindlin
Auto-adjust Verlet distance: Yes
Initial Verlet coefficient: 2
Max Verlet cell number: 50
Consider particles anisotropy: No
Extended contact radius: No
Collisions saving: Yes
Selective saving: No
Periodic boundaries: Yes
Periodic boundaries enabled (X:Y:Z): No : Yes : No
Periodic boundary domain Y [m]: -7.5e-05 to 7.5e-05
External acceleration (X:Y:Z) [m/s^2]: 0 : 0 : -9.81
Simulation domain X [m]: -0.00012 to 0.00012
Simulation domain Y [m]: -0.00012 to 0.00012
Simulation domain Z [m]: -0.00012 to 0.00015

Total number of particles: 20
Total number of walls: 8636
Total number of solid bonds: 0
Total number of liquid bonds: 0

==================== Simulation started ====================

C:\Users\ms266161\Desktop\calculMUSEN>**_

Please do you have an idea of the problem ?
Thank you !

Maxime

Rotatory and translatory mesh motion

Hi everyone,

I am trying to simulate a gear-like disc with both rotational and translational motion interacting with an agglomerate. The goal is for the geometry to rotate around its center. I have selected the appropriate option in the time-dependent motion setup. However, when I run the simulation, the geometry wobbles around its center.

I am unsure whether the geometry center is recalculated at each time step or only at the first time step. Regardless, it appears that the calculation of the geometry center is causing the wobbling issue.

To investigate, I created a test case using a cylinder geometry, which behaves as expected without any wobbling. However, when I load my gear-like geometry, the wobbling occurs.

Setup Details

  • Time-dependent motion:

    • Checked "Rotate around center"
    • Translational velocity (x) = 1 m/s
    • Rotational velocity (z) = 600 rad/s
  • Test Cases:

    • Cylinder (radius = 75 mm, height = 8 mm) at position (0, 0, 0)
    • Gear-like geometry (Rotation_Test2.STL) at position (0, 0, 0)
  • Simulation Setup:

    • Simulation step: 2.5e-8 s
    • CPU mode
    • Interparticle contact model/Particle wall contact model: Hertz-Mindlin
  • Simulation Domain:

    • min_x, min_y, min_z, max_x, max_y, max_z = [-1000, -1000, -1000, 1000, 1000, 1000] (in mm)
  • Environment:

    • Tested on Windows 10
    • MUSEN version 1.74.0 installed via open setup installer

I would greatly appreciate it if someone could verify the problem or point out any mistakes in my setup.

Many thanks and greetings.

Geometry example

disc_example
test_geometry.zip

Windows build issue

I am trying to build MUSEN v1.71.5 on Windows 11 and I have followed the precise steps provided on git. When I initially opened the musen.sln - I got almost 816 errors, mostly related to "cannot open ...". I was able to get rid of most of them by assigning "inherit from Project default" under Additional include directories.
I still have 28errors that I have listed below. Any clues to what might resolve these will be very useful.

image

Issue with Dynamic generator with GPU

I am using Musen v 1.71.5 on Windows with NVIDEA GeForce GTX 1650 Ti graphics card. Dynamic Generator does not seem to work, i.e. produce particle, with GPU selected for solution. The same model works fine on CPU. See below:

image

image

Issue with 'verlet coefficient'

Hi I've recently been using musen for DEM simulations and I've noticed that my models run out differently at different 'verlet coefficients'(without auto adjust verlet distance). Is there any problem with this please?

Geometries not exist

dear @dostamax ,
thank you for releasing such an amazing tool. I have just finished installing it on Linux 20.04 LTS and I have noticed when I started to navigate to the geometries the panel was empty. is it a bug ?
Regards

material.mbd structure

Hello, thank you for your useful tool !

I would like to create an automated program, which will be used to convert PSD instrument DATA to .mbd directly useable.
I understand how the mixture DATA is stored but instead of numerical value, there are letters and punctuations.
So I don't understand how to write my values, can you enlighten me ?

Thank you,

Maxime

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.