  Writing high performance solvers for engineering applications is a delicate
task. These codes are often developed on an application to application basis,
highly optimized to solve a certain problem. Here, we present our work on
developing a general simulation framework for efficient computation of time
resolved approximations of complex industrial flow problems - Complex Unified
Building cubE method (Cube). To address the challenges of emerging, modern
supercomputers, suitable data structures and communication patterns are
developed and incorporated into Cube. We use a Cartesian grid together with
various immersed boundary methods to accurately capture moving, complex
geometries. The asymmetric workload of the immersed boundary is balanced by a
predictive dynamic load balancer, and a multithreaded halo-exchange algorithm
is employed to efficiently overlap communication with computations. Our work
also concerns efficient methods for handling the large amount of data produced
by large-scale flow simulations, such as scalable parallel I/O, data
compression and in-situ processing.
