*Article* **A Hierarchical Grid Solver for Simulation of Flows of Complex Fluids**

**Antonio Castelo 1,\* ,†, Alexandre M. Afonso 2,† and Wesley De Souza Bezerra 3,†**


**Abstract:** Tree-based grids bring the advantage of using fast Cartesian discretizations, such as finite differences, and the flexibility and accuracy of local mesh refinement. The main challenge is how to adapt the discretization stencil near the interfaces between grid elements of different sizes, which is usually solved by local high-order geometrical interpolations. Most methods usually avoid this by limiting the mesh configuration (usually to graded quadtree/octree grids), reducing the number of cases to be treated locally. In this work, we employ a moving least squares meshless interpolation technique, allowing for more complex mesh configurations, still keeping the overall order of accuracy. This technique was implemented in the HiG-Flow code to simulate Newtonian, generalized Newtonian and viscoelastic fluids flows. Numerical tests and application to viscoelastic fluid flow simulations were performed to illustrate the flexibility and robustness of this new approach.

**Keywords:** finite difference methods; meshless interpolation; numerical solution; polymer flows; viscoelastic flows
