Andrew Moa Blog Site

Exploring Rust Graphical Interface Libraries

Recently, I plan to refactor the code I wrote previously using Rust, which involves the question of how to choose a GUI interface. Rust has only been officially released for ten years, and is not as good as the old C/C++ in GUI development. There are many well-known and time-tested GUI interface libraries such as wxWidgets, qt, gtk+, etc. This article selects several Rust GUI libraries and simply implements a boundary layer calculator for horizontal comparison.
15 minutes to read
Andrew Moa

Use VSCode to develop STAR-CCM+ user library: build dynamic link library through Fortran

Although the official STAR-CCM+ documentation specifically states that FORTRAN is not supported under Windows1. But in fact, as long as the compiler supports it, user library compiled using Fortran under Windows can be loaded and run normally in STAR-CCM+.

1. Build CMake Project

First, we refer to the tutorial case in the official documentation 2 and build a CMake project. The project structure is as follows:

STARCCM_FORTRAN_SAMPLE
   CMakeLists.txt	# CMake Configuration File
   README.md	# Description document, not required
├───.vscode
      launch.json	# Automatically generated file when starting debug mode, not required
      settings.json	# Define CMake related variables
└───src
        initVelocity.f
        StarReal.f.in
        sutherlandViscosity.f
        uflib.f
        zeroGradT.f

The main content of CMake configuration file CMakeLists.txt is as follows:

7 minutes to read
Andrew Moa

Use VSCode to develop STAR-CCM+ user library: Calculate physical properties through CoolProp

STAR-CCM+ user program (user library)1 is a dynamic link library compiled and constructed according to certain rules by an external compiler (usually C/C++, but also supports Fortran in Linux). By registering the constructed dynamic link library in the sim file, certain custom functions can be implemented. A user library usually contains one or more user-defined functions, which are generally used to implement special configuration or field functions.

Uer library need to register dynamic link libraries before they can be called, and the format of dynamic link libraries is often closely related to the operating system, hardware platform, etc. Therefore, user library are usually compiled for specific platforms and cannot run across platforms.

14 minutes to read
Andrew Moa