Challenge

Week 4 Challenge- Compiling C++ libraries

1.

The challenge I faced during this was I was trying to compile the solver which was generating the executable in $FOAM_USER_APPBIN. After thinking and opening other files I realised that the objective is to compile the Turbulence Model by running the "wmake libso" command in the location shown in the image above. The image shows the "wmake libso" command being executed. After executing the command the resulting .so file can be found in $FOAM_USER_LIBBIN folder 

2.

  • Simple (2 2 1): The "simple" decomposition is a straightforward way to break down the computational domain. It divides the domain into blocks along specified directions. The notation (2 2 1) implies he domain will be divided into 2 parts along the x-direction, 2 parts along the y-direction and 1 part along the z-direction. So, if you had a rectangular 3D domain and applied simple (2 2 1) decomposition, you'd end up with 4 equal-sized 3D rectangular sub-domains.
  • Scotch: Scotch is a graph-based decomposition algorithm. Rather than dividing the domain uniformly like the simple method, Scotch aims to find an optimal division based on the underlying computational mesh and its connectivity. How scotch works:
    • First, the computational mesh is transformed into a graph. Each cell becomes a node, and edges are created based on neighboring cell relationships.
    • The goal of Scotch is to divide this graph into parts of roughly equal size (corresponding to the number of computational cores) while minimizing the number of "cut" edges between these parts. Minimizing the cut edges helps reduce communication between computational cores during parallel processing.
    • Scotch uses a combination of recursive bisection and multi-level methods to achieve this optimal partitioning.
    • In essence, Scotch takes into account the mesh's topology to ensure efficient load balancing across cores and minimal inter-core communication.
  • Hierarchical: The domain is first divided into a smaller number of parts using one decomposition method, often a simple method like simple and then Each of these coarsely decomposed parts is then further subdivided using another decomposition method. The second method can be more intricate, like the scotch decomposition method, which seeks to minimize communication between processors. For example if you have 8 processors to work with, a domain will be divided in 4 parts using simple and then each of those will be divided in 2 using scotch. 

3.

simple:

 scotch:

Scotch is a graph partitioning tool used in OpenFOAM for domain decomposition. It represents the computational mesh as a graph, aiming to balance the computational load across processors. The partitioning minimizes inter-processor communication by reducing boundary cells between subdomains. This method ensures efficient parallel processing with reduced communication overhead.

 hierarchal

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.