Pre-compiled binary releases for Linux and Windows are available under GitHub Releases.
| Platform | File | Quick Run Command |
|---|---|---|
| Linux (All Distros) | ncmcma-v0.1.0-alpha-linux-x64.tar.gz |
Copy this whole command in terminal: cd Downloads && tar -xzvf ncmcma-v0.1.0-alpha-linux-x64.tar.gz && ./ncmcma-v0.1.0-alpha-linux-x64/run.sh |
| Windows (10/11 x64) | ncmcma-v0.1.0-alpha-win64.zip |
Extract .zip and run ncmcma.exe |
nCMCMA is designed for the structural modal analysis and dynamic response simulation of 3D non-continuous material cube structures (mass-spring lattice models).
The software constructs global Mass (
Calculates natural frequency with iteration, older verison were calculating all natural frequencies but this takes too much time and really high RAM usage and segmentation faults (for massNum = 16 -> ~19GB, but now it takes a few houndred MB). This iteration results may looks like natural freq. values too close but this is not a mistake. This model is not fem(finite element method). The lattice structure causes this. Still if you increase massNum, time increase exponentally but ram usage is npt that much because of the iteration algotihm.
The simulation may not show the springs but I draw an example.
Below is an illustration of a
If you increase lattice size (massNum) more than 16, probably your memory won't be enough and you will take a crash after half an hour. So, consider that this simulatin is only for experimental. Performance and resource usage is not worked on well area. There is a reposity I am working on currently, it will be better about that, actually it will be a finished fem engine, so this project is made for test-education purpose.
-
3D Mass-Spring Lattice Generation: Flexible setup for
$N \times N \times N$ discrete cube structures with 6 DOFs per node (3 translational + 3 rotational). -
State-Space Formulation: Conversion of system matrices into
$2N \times 2N$ state-space representation for precise eigenvalue and natural frequency extraction. -
Rayleigh Damping Integration: Material-specific Rayleigh damping matrix calculation (
$\mathbf{C} = \alpha \mathbf{M} + \beta \mathbf{K}$ ). -
Receptance Matrix Computation: Computes frequency-dependent transfer function matrices
$\boldsymbol{\alpha}(\omega) = (\mathbf{K} - \omega^2 \mathbf{M} + i \omega \mathbf{C})^{-1}$ using Eigen'sFullPivLUsolver. -
Dynamic Load Response (
$q = \alpha(\omega) Q$ ): Calculates complex spatial displacements and magnitudes across all DOFs under applied dynamic forces. - Multi-Threaded Parallel Execution: Utilizes OpenMP and Eigen parallelization, automatically scaled to half of system hardware threads for optimal performance and thermal efficiency.
- Visualization: with imgui and opengl, colored spheres according to their displacement. Shows element has higher displacement red (doesn't animates strings for better look, only sphere mass-elements)
nCMCMA/
├── CMakeLists.txt # Build configuration with C++23, Eigen3 & OpenMP
├── main.cpp # Application entry point & parallel analysis runner
├── 2_2_2_cubeSample.png # Sample lattice model diagram
└── src/
├── engine
│ ├── simEngine.cpp # parallel analysis runner
│ └── simEngine.h
├── gui
│ ├── gui.cpp # visualize the results
│ └── gui.h
├── matrixOperations/
│ ├── stdEigenValueSolver.h
│ └── stdEigenValueSolver.cpp # Eigen-based eigenvalue solver & frequency extractor
└── modalAnalysis/
├── massMatrix.h
├── massMatrix.cpp # Mass matrix generation (6 DOF / node)
├── stiffMatrix.h
└── stiffMatrix.cpp # Stiffness matrix assembly
- C++ Compiler: C++23 support (e.g.,
g++ 12+orclang 14+) - Build System: CMake
3.22or higher - Libraries:
- Eigen 3.3+ (Linear algebra library)
- OpenMP (Multi-threading support)
There are 4 dependencies: openGL for animation, imGui for gui, Eigen for matrix computations, openMP for multithreading.
sudo apt update
sudo apt install -y build-essential cmake ninja-build g++-13 libeigen3-dev libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev libomp-devsudo dnf check-update
sudo dnf install -y @development-tools cmake ninja-build gcc-c++ eigen3-devel glfw-devel mesa-libGL-devel mesa-libGLU-devel libomp-devel glew-devel freeglut-devel
sudo dnf install wayland-devel libwayland-client libwayland-cursor libwayland-egl libxkbcommon-devel
sudo dnf install libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel libXext-develwarning: I did not check all of them is necessary or not and asked AI and it gave me those, probably most of them is unnecesary. I'm sorry to not checking but fedora feels a bit weird to me about packages.
sudo pacman -Syu --needed base-devel cmake ninja gcc eigen glfw-x11 mesa openmpin PowerShell
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg integrate install.\vcpkg install eigen3:x64-windows
.\vcpkg install glfw3:x64-windows
.\vcpkg install glad:x64-windowscmake -B build -S .
cmake --build buildfor windows
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake"
cmake --build build --config Debug./build/ncmcma-
Governing Equation:
$$\mathbf{M} \ddot{\mathbf{x}}(t) + \mathbf{C} \dot{\mathbf{x}}(t) + \mathbf{K} \mathbf{x}(t) = \mathbf{Q}(t)$$ -
Receptance Matrix (
$\boldsymbol{\alpha}(\omega)$ ):$$\boldsymbol{\alpha}(\omega) = \left( \mathbf{K} - \omega^2 \mathbf{M} + i \omega \mathbf{C} \right)^{-1}$$ -
Dynamic Response Calculation (
$q$ ):$$\mathbf{q}(\omega) = \boldsymbol{\alpha}(\omega) \cdot \mathbf{Q}(\omega)$$

