BHL Notes

MY LEARNING TRAJECTORY

0%

VTK Widget

In three-dimensional visualization applications, VTK Widgets allow users to interact with visible components. Users can manipulate 3D data and models through these widgets by clicking, dragging, and pressing keys. These widgets make user interactions in the 3D scene intuitive and straightforward.

Read more »

CMake presets

Introduction

CMake presets are a collection of configuration, build and test options for a CMake project. These options are described in two JSON files named CMakePreset.json and CMakeUserPresets.json respectively. They both live in the project’s root directory and have exactly the same schema. The difference between them is that the former is meant to specify project-wide build details, while the latter is meant for developers own local build details.

Read more »

Introduction

Consider the linear equation system

$$
\eqalign{\mathbf{Ax = b} }
$$

where $\mathbf{A} \in \mathcal{R}^{n \times n}$ is a nonsigular matrix and $\mathbf{x}$ , $\mathbf{b} \in \mathcal{R}^{n}$.

A large class of iterative methods for solving linear equation system involve splitting the matrix $\mathbf{A}$ into the difference between two new matrices $\mathbf{S}$ and $\mathbf{T}$ :

Read more »

Governing Equations

Governing equations are expressed by conservation of mass and momentum. The equations are:

$$
\eqalign{ \frac{D\rho}{Dt}+\rho \nabla \cdot \mathbf{u} =0 }
$$

and

$$
\eqalign{ \frac{D \mathbf{u} }{Dt}=-\frac{1}{\rho}\nabla P +\nu \nabla^2 \mathbf{u} +\mathbf{f} }
$$

where $\rho$ indicates density, $P$ is the pressure, $\mathbf{u}$ the velocity and $\mathbf{f}$ the external force. It should be noted that the first equation is written in the form of compressible flow. In the MPS method, incompressibility is enforced by way of setting $\frac{ D \rho}{D t}=0$ at each particle at each calculation time step.

Read more »

Neural networks have been used for solving many problems such as sales forecasting, customer research, data validation, and risk management. As an universal function approximators, Neural networks can learn (fit) patterns from data with the complicated distribution. With the same concept, train a Neural network to fit the differential equations could also be possible. In this post, I want to show how to applied a simple feed-forward NNs to solve differential equations (ODE, PDE).

Read more »

Run-time data processing

When we want to process data during a simulation, they need to configure the case accordingly. The two possible configuration processes are shown as follows, using an example of monitoring flow rate at an outlet patch named outlet.

Read more »

There are a set of general post-processing functions for sampling data across the domain for graphs and visualization. In this article, we use the lid-driven cavity case set up in the tutorial to demonstrate these post-processing functions.

Read more »

Lid-driven cavity flow

The lid-driven cavity flow tutorial is the easiest and most well documented tutorial on OpenFOAM. A incompressible flow in a two-dimensional square domain is shown in figure below. The top wall moves in the $x$-direction at a speed of 1 m/s while the other 3 are stationary. Initially, the flow will be assumed laminar and will be solved on a uniform and non mesh using the icoFoam solver for laminar, isothermal, incompressible flow. Then, the effect of increased mesh resolution and mesh grading towards the walls will be investigated.

Read more »

Introduction

For many engineering problems, we cannot obtain analytical (true) solutions. That’s why we employ numerical methods to obtain the solutions.  However, the numerical methods or algorithms are usually accompanied by computing with finite precision and errors of approximation (rounding and truncation). Before we get into the details of the topic, it is important to distinguish between accuracy and precision.

Read more »