PreVABS is a preprocessing tool for VABS and SwiftComp. It helps users to create cross-sections and write input files.
Online documentation: https://wenbinyugroup.github.io/prevabs/
Prebuilt release packages are intended to run without a full source build toolchain. The sections below describe what is already bundled and what users still need to install manually.
Bundled in the package:
prevabs.exegmsh-<major>.<minor>.dllMaterialDB.xmlREADME.mdLICENSELICENSE-gmsh.txtCREDITS-gmsh.txt
Manual installation still required:
- Microsoft Visual C++ Redistributable for Visual Studio 2022 (x64), if not already installed on the target machine
- VABS and/or SwiftComp, if you want PreVABS to execute those solvers with
--execute
Usage:
- Unzip the package
- Run
prevabs.exefrom the package root, or add that directory toPATH
Includes everything in the runtime package, plus:
gmsh/gmsh.exegmsh/onelab.pywhen present in the SDK
This package is useful when users want the standalone Gmsh application in addition to the PreVABS runtime.
Bundled in the package:
prevabslibgmsh.so*MaterialDB.xmlREADME.mdLICENSELICENSE-gmsh.txtCREDITS-gmsh.txt
Manual installation still required:
- System runtime libraries required by Gmsh/OpenGL/X11 if they are not already
present on the machine. On Ubuntu/Debian, these typically include
libglu1-mesa,libgl1,libx11-6,libxrender1,libxft2,libxcursor1,libxfixes3,libxinerama1, andlibfontconfig1. - VABS and/or SwiftComp, if you want PreVABS to execute those solvers with
--execute
Bundled in the package:
prevabslibgmsh.so*MaterialDB.xmlREADME.mdLICENSELICENSE-gmsh.txtCREDITS-gmsh.txt
Manual installation still required:
- System runtime libraries required by Gmsh/OpenGL/X11 if they are not already
present on the machine. On RHEL/Rocky 9, these typically include
mesa-libGLU,libglvnd-glx,libX11,libXrender,libXft,libXcursor,libXfixes,libXinerama, andfontconfig. - VABS and/or SwiftComp, if you want PreVABS to execute those solvers with
--execute
prevabs-<ver>-examples.zip contains only example input files. It does not
contain the executable or runtime libraries.
prevabs -i <main_input.xml> [options]
Options
Required arguments
------------------
-i, --input <file> Input XML file (required)
Analysis mode (exactly one required)
------------------------------------
--hm, --homogenization Homogenization (build cross section and generate input)
--dh, --dehomogenization Dehomogenization (recovery - read 1D beam analysis results)
--fs, --failure-strength Initial failure strength analysis (SwiftComp only)
--fe, --failure-envelope Initial failure envelope (SwiftComp only)
--fi, --failure-index Initial failure indices and strength ratios
Analysis tool (optional)
-------------------------
--vabs Use VABS format (default)
--sc Use SwiftComp format
Additional options
------------------
--ver <version> Tool version (e.g. 3.0)
--integrated Use integrated solver (implies --execute)
-e, --execute Execute VABS/SwiftComp after generating input
-v, --visualize Visualize meshed cross section or contour plots
--gmsh-verbosity <n> Gmsh log verbosity (0=silent, 1=errors, 2=warnings, 3=info, 5=debug)
-d, --debug Debug mode
- Compiler: C and C++ (C++11)
- CMake 3.14 or higher
- Libraries
-
Setup Gmsh
- Download the Gmsh SDK from https://gmsh.info/
- Unzip to a directory
- No SDK header renaming is needed; PreVABS selects
gmsh.h_cwrapautomatically on Windows builds - Set environment variable
Gmsh_ROOTto the Gmsh SDK root directory
-
Build PreVABS
# Full clean build powershell.exe -NoProfile -ExecutionPolicy Bypass -File tools\build-msvc.ps1 full # Incremental rebuild powershell.exe -NoProfile -ExecutionPolicy Bypass -File tools\build-msvc.ps1 fast
The executable will be at build_msvc\Release\prevabs.exe.
Build the Windows MSVC executable from within WSL without switching to a
Windows terminal. Requires powershell.exe to be accessible from WSL
(standard on Windows 10/11).
-
Follow the Windows (MSVC) Gmsh setup step above.
-
Run the WSL build script from the repo root:
# Full clean build bash tools/build-wsl.sh full # Incremental rebuild (default) bash tools/build-wsl.sh fast # Remove build directory bash tools/build-wsl.sh clean
The executable will be at build_msvc\Release\prevabs.exe (Windows path).
-
Unpack the source and change to the package root.
-
The default compiler is GCC. To use a different compiler, edit the
-DCMAKE_C_COMPILER/-DCMAKE_CXX_COMPILERoptions intools/build_linux_64.sh. -
Run the build script:
./tools/build_linux_64.sh
-
Add the output directories to your environment:
export PATH=<PREVABS_DIR>/bin:$PATH export LD_LIBRARY_PATH=<PREVABS_DIR>/lib:$LD_LIBRARY_PATH
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Release packages also include:
- this project's
LICENSE - the bundled Gmsh license and credits files when Gmsh binaries are included