/MechanicsPrograms

Mechanics simulations and structural engineering models

Primary LanguageC++MIT LicenseMIT

Introduction

This is the collection of various applications for mechanics simulations and structural engineering models.

Getting Started

All projects use CMake as build system. C++ code compatibility is tested with gcc and Microsoft Visual Studio.

Built With

  • CMake - Build system.
  • FLTK - Minimalistic cross-platform GUI toolkit with OpenGL capabilities.
  • Armadillo - Linear algebra library (for FEMSolve)

Environment Setup

Debian-based Systems

The following instructions are applied to these operating systems:

  • Ubuntu 18.04
  • Ubuntu 16.04
  • Debian 9
sudo apt-get install -y \
    build-essential \
    cmake \
    libarmadillo-dev \
    libfltk1.3-dev \
    libfltk1.3-compat-headers

RedHat-based Systems

The following instructions are applied to these operating systems:

  • Fedora >=22
sudo dnf groupinstall -y \
    "Development Tools" \
    "Development Libraries"
sudo dnf install -y \
    gcc-c++ \
    cmake \
    fltk \
    fltk-devel \
    fltk-fluid \
    armadillo \
    armadillo-devel

Building Projects

The set of programs is built with the commands below.

cd MechanicsPrograms
mkdir build && cd build
cmake ..
make
make install

After the successful build and running make install all binaries of will end up in bundle directory. E.g. binary of FEMSolve can be launched from the source directory with the command

./bundle/FEMSolve

Structure

FEMSolve

Finite element method solver for 1D and 2D models with GUI. Example models are written in plain-text format and can be found in models subdirectory.

FEMSolve screenshot FEMSolve report screenshot

FinitElem

Minimalistic Finite element method solver from FEMSolve in a form of console application.

FluidView

Graphical solver for fluid flow q and lambda functions that uses Newton's method.

FluidView screenshot

HazeDyn

Calculator for fluid flow functions and reverse calculator for finding lambda parameter based on function value.

HazeDyn direct functions screenshot HazeDyn reverse functions screenshot

MediaWave

Graphical demonstration of fluid mechanics problem of haze in a tube of limited length with various initial boundary conditions for the tube edges (e.g. closed, opened, with friction) as well as for pressure and velocity of a fluid.

MediaWave simulation screenshot MediaWave settings screenshot

GraphView

Methods of one-dimensional minimization (optimization) for finding a local minimum of a function:

GraphView screenshot

SimplexView

GUI tool originally designed for demonstration of Nelder–Mead optimization method using triangle simplex for functions with two parameters (hence the name). Later several other methods of function minimizaion were added. Now the following methods are supported with graphical demonstration for each of them:

Left mouse click on the 2D plot sets the new starting point for optimization method for the next scan.

SimplexView screenshot

WaveView

Graphical demonstration of fluid mechanics problem of a fluid in rectangular channel of infinite length.

WaveView screenshot