Computational Fluid Dynamics (CFD) with structured grids has been widely used in many engineering disciplines including Aerospace Engineering and Vehicle Design. Current grid partitioners in CFD are biased towards minimizing the communication volume, and rely on graph partition methods for complex multi-block structured grids. I propose novel algorithms specifically for multi-block structured grids and a new cost function which not only accounts for the communication volume and edge cuts but also factors in the network's latency and bandwidth. Coupled with an MPI+OpenMP Jacobi solver, the new partitioner outperforms the state-of-the-art by 1.5x to 3x on the Mira supercomputer. Current temporal tiling algorithms for stencil computations in CFD are mainly designed for a single block grid on shared-memory machines, whereas multi-block grids distributed across many nodes are the norm. I propose a pipelined distributed stencil algorithm called Pencil. Pencil identifies the optimal combination of MPI, OpenMP and temporal tiling, demonstrating up to 1.9x speedup over Pluto, the state-of-the-art polyhedral optimizer, and extends the tiling to multi-block structured girds. Furthermore, Pencil pipelines the communication and computation for overlap and obtains 1.33x to 3.41x speedup over MPI+OpenMP with space tiling on 32 Broadwell nodes, and excellent weak and strong scaling on 16 to 128 nodes. The state-of-the-art neural network-based CFD solvers are typically unable to predict the solution for geometries unseen during the training. I am developing a network that understands the local patterns of fluid dynamics. Coupled with an iterative scheme to combine local patterns, it can predict flow in/over arbitrary geometries.