CMB 3D modeling

Good news. Success! Here is what is working on all the ubuntus we use. (22.04.4 LTS, 23.10 Desktop, 23.10 WSL)

sudo apt install cmake cmake-curses-gui libboost-all-dev libfreetype-dev qtbase5-dev libqt5svg5-dev libqt5x11extras5-dev libqt5help5 qttools5-dev libclang-dev libxkbcommon-x11-dev qtxmlpatterns5-dev-tools libqt5webkit5-dev libxcursor-dev libbz2-dev ninja-build build-essential libxml2-dev libglvnd-dev gcc-12 g++-12

Followed by:

git clone https://gitlab.kitware.com/cmb/cmb-superbuild.git
cd cmb-superbuild/
git checkout master
git submodule update --init
cd ..

Which was then configured with:

mkdir build
cd build

CC=/usr/bin/gcc-12 \
CXX=/usr/bin/g++-12 \
cmake -GNinja -Wno-dev \
	-DBUILD_TESTING=0 \
	-DDEVELOPER_MODE_cmb=0 \
	-DDEVELOPER_MODE_smtk=0 \
	-DENABLE_cmbworkflows=1 \
	-DENABLE_DOCUMENTATION=0 \
	-DUSE_SYSTEM_boost=0 \
	-DUSE_SYSTEM_bzip2=1 \
	-DUSE_SYSTEM_freetype=1 \
	-DUSE_SYSTEM_hdf5=0 \
	-DUSE_SYSTEM_libxml2=1 \
	-DUSE_SYSTEM_netcdf=0 \
	-DUSE_SYSTEM_pkgconf=1 \
	-DUSE_SYSTEM_png=1 \
	-DUSE_SYSTEM_python3=0 \
	-DUSE_SYSTEM_qt5=1 \
	-DENABLE_qt5=0 \
	-DUSE_SYSTEM_sqlite=0 \
	-DUSE_SYSTEM_zlib=1 \
	-DENABLE_pythonsetuptoolsscm=1 \
	-DCMAKE_INSTALL_PREFIX=/home/pete/local \
	-DENABLE_vtk=1 \
	../cmb-superbuild/

ninja -j8

This worked also for Gentoo, although the libraries were already installed via emerge and I thus don’t have a concise minimum list of packages in that setting.

Subsequently I have been able to launch modelbuilder! Now we learn to incorporate this tool into our workflow.

Many thanks for your support, I am continually impressed by Kitware.
Pete

Thanks for reporting back the good news, Pete!

We especially appreciate you listing the packages and build incantations, so that we won’t have to go through the long discovery process with others or when upgrading OS ourselves.

We would also be interested in knowing more about your workflow. If you can share any info on your application and use cases, please tell us more! either here or by DM.

Thanks again,
john

Hello @johnt, thank you so much once again for the help provided, and I´m sorry it took so long to reply. After finally being able to get the CMB superbuild to run, my next goal would be to be able to do something similar to the CMB2d example, but for general 3d models. The 2d example uses:

  • Aquaveo XMS Mesher

  • MinimalFEM

Which I assume would have to be changed in order to work with 3d models. Is there any example that I could base my work on? Any tips are appreciated as I´m trying to work out the intricacies of the software.

Best regards,
Tomas

Good to hear from you, Tomas.

Your approach for 3D depends in part on the modeling, meshing and solver software you intend to use. For CAD applications, the modeling is typically done outside CMB and imported into modelbuilder. Meshers and solvers are typically external executables launched from modelbuilder as separate processes.

You can see an example is the CMB Wind Tunnel application, which uses OpenFOAM for both mesher and solver. The docs for this version of modelbuilder are at https://cmb-wind-tunnel.readthedocs.io/ and the plugin that implements the CMB-OpenFOAM interface is at https://gitlab.kitware.com/cmb/plugins/openfoam-windtunnel .

For CAD modeling, we can import a number of formats including vtk and Exodus. We also have an OpenCascade plugin at https://gitlab.kitware.com/cmb/plugins/opencascade-session

Let me know if you are thinking of using the Gmsh mesh generator. I should be able to get you some code for interfacing that with CMB/modelbuilder.

And if you are curious about the XMS mesher, the plugin that interfaces it to CMB is at https://gitlab.kitware.com/cmb/plugins/xmsmeshoperation.

Hello @johnt. My initial idea, as a solver, would be to integrate Calculix, and as a mesher, Gmsh. However, I am open to suggestions about which CAD modeler, mesher and solver would be better to implement, as I am new to this and have little idea about how challenging it is to implement all of them.

Best regards,
Tomas

Hi @Tomas_Ribeiro

I should forewarn you that extending CMB/modelbuilder is a significant undertaking. Generally, CMB developers from outside Kitware are doing so for commercial organizations that contract with Kitware for training and consulting services (thousands of dollars). I am presuming you are either in academia or learning about CMB for personal/hobbyist reasons, and wouldn’t be in a position to make an investment like that.

So to explore CMB development on your own, I recommend first taking the time to read through the SMTK documentation at https://smtk.readthedocs.io/ . SMTK is the internal library that does most of the preprocessing functionality you see in modelbuilder. Read the SMTK User’s Guide first and then go through the five Tutorial examples and see if you can implement them.

If you want to develop a CMB application and aren’t set on a specific solver, I would take a look at OpenRadioss (https://openradioss.org/) which is an FEM solver mainly used for dynamic modeling. It would be a big job for an individual to learn CMB/SMTK and develop an application like this, but if you can produce a system with reasonable quality, I think they would welcome it.