원시데이터 수집 시스템
선정목록으로

Highly parallelisable simulations of time-dependent viscoplastic fluid flow simulations with structured adaptive mesh refinement

관련 수소연료전지 · (5) 연료전지용 수분제어장치(가습기)

기본 정보

저자
  1. Sverdrup, Knut
  2. Nikiforakis, Nikolaos
  3. Almgren, Ann
DOI
10.17863/cam.27305
저널
Apollo (University of Cambridge)
발행년도
2018
발행기관
University of Cambridge
피인용수
0
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://www.repository.cam.ac.uk/handle/1810/279937
토픽
Composite Material Mechanics
OpenAlex ID
W6906698494

평가 내용

관련도
관련
사업분야
수소연료전지 · (5) 연료전지용 수분제어장치(가습기)
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '수소연료전지 > 연료전지용 수분제어장치(가습기)' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

We present the extension of an efficient and highly parallelisable framework for incompressible fluid flow simulations to viscoplastic fluids. The system is governed by incompressible conservation of mass, the Cauchy momentum equation and a generalised Newtonian constitutive law. In order to simulate a wide range of viscoplastic fluids, we employ the Herschel-Bulkley model for yield-stress fluids with nonlinear stress-strain dependency above the yield limit. We utilise Papanastasiou regularisation in our algorithm to deal with the singularity in apparent viscosity. The resulting system of partial differential equations is solved using the IAMR code (Incompressible Adaptive Mesh Refinement), which uses second-order Godunov methodology for the advective terms and semi-implicit diffusion in the context of an approximate projection method to solve on adaptively refined meshes. By augmenting the IAMR code with the ability to simulate regularised Herschel-Bulkley fluids, we obtain efficient numerical software for time-dependent viscoplastic flow in three dimensions, which can be used to investigate systems not considered previously due to computational expense. We validate results from simulations using this new capability against previously published data for Bingham plastics and power-law fluids in the two-dimensional lid-driven cavity. In doing so, we expand the range of Bingham and Reynolds numbers which have been considered in the benchmark tests. Moreover, extensions to time-dependent flow of Herschel-Bulkley fluids and three spatial dimensions offer new insights into the flow of viscoplastic fluids in this test case, and we provide missing benchmark results for these extensions.

본문 82,394자

본문 펼치기
## Highly parallelisable simulations of time-dependent viscoplastic fluid flow simulations with structured adaptive mesh refinement Knut Sverdrup, <sup>1, a)</sup> Nikolaos Nikiforakis, <sup>1</sup> and Ann Almgren <sup>2</sup> 1) _Cavendish_ _Laboratory,_ _University_ _of_ _Cambridge,_ _CB3_ _0HE,_ _UK_ 2) _Lawrence_ _Berkeley_ _National_ _Laboratory,_ _CA_ _94720,_ _USA_ (Dated: 21 August 2018) We present the extension of an efficient and highly parallelisable framework for incompressible fluid flow simulations to viscoplastic fluids. The system is governed by incompressible conservation of mass, the Cauchy momentum equation and a generalised Newtonian constitutive law. In order to simulate a wide range of viscoplastic fluids, we employ the Herschel-Bulkley model for yield-stress fluids with nonlinear stress-strain dependency above the yield limit. We utilise Papanastasiou regularisation in our algorithm to deal with the singularity in apparent viscosity. The resulting system of partial differential equations is solved using the IAMR code (Incompressible Adaptive Mesh Refinement), which uses second-order Godunov methodology for the advective terms and semi-implicit diffusion in the context of an approximate projection method to solve on adaptively refined meshes. By augmenting the IAMR code with the ability to simulate regularised Herschel-Bulkley fluids, we obtain efficient numerical software for time-dependent viscoplastic flow in three dimensions, which can be used to investigate systems not considered previously due to computational expense. We validate results from simulations using this new capability against previously published data for Bingham plastics and powerlaw fluids in the two-dimensional lid-driven cavity. In doing so, we expand the range of Bingham and Reynolds numbers which have been considered in the benchmark tests. Moreover, extensions to time-dependent flow of Herschel-Bulkley fluids and three spatial dimensions offer new insights into the flow of viscoplastic fluids in this test case, and we provide missing benchmark results for these extensions. Keywords: Viscoplasticity, Herschel-Bulkley fluids, Papanastasiou regularisation, lid-driven cavity, adaptive mesh refinement, high performance computing I. INTRODUCTION Viscoplastic fluids are non-Newtonian fluids which are characterised by a minimum induced stress necessary for flow to occur. For this reason they are also commonly referred to as yield-stress fluids. When the imposed stress does not exceed the threshold value, the material is modelled as a rigid solid. In regions where the yield stress is exceeded, however, the material flows like a fluid. The ability of the material to support a stress under certain circumstances gives rise to phenomena such as non-flat surfaces at rest under gravity and the coexistence of yielded (flowing) and unyielded (rigid) regions within the fluid. The former can be demonstrated by distorting the surface of mayonnaise in a jar: gravity alone is not strong enough to surpass the yield stress, and the surface remains in its distorted state. In addition to being fundamentally interesting from the perspectives of rheology, fluid mechanics and mathematical modelling, yield stress fluids occur naturally and are paramount to the success of animals such as mudskippers <sup>1</sup> and snails <sup>2</sup> . Their importance a)Electronic mail: [ksk38@cam.ac.uk](mailto:ksk38@cam.ac.uk) 2 in industries ranging from medicine <sup>3–6</sup> to oil and gas exploration <sup>7–9</sup> has led to extensive research contributions in the field. Just as for Newtonian fluids, the pursuit of knowledge about viscoplastic fluids has relied heavily on computational methods in the last fifty years. Compared to the Newtonian case, however, the numerical simulations are much more demanding in terms of processing time. This is largely due to the existence of a yield stress, since this results in a singularity at zero strain rate for the apparent viscosity of the fluid. Traditional methods for computing the solution are rendered useless for this case, since infinite viscosities cannot be represented in the unyielded regions. There are now two main branches of algorithms designed to deal with this problem. The first utilises mathematical regularisation to approximate the viscosity function in the low-strain limit. In doing so, the rigid body approximation is effectively replaced by a fluid with very high viscosity in the unyielded regions. A regularisation parameter controls how close this approximation is to the idealised viscoplastic case. On the other hand, the problem can be reformulated in the framework of non-smooth optimisation theory, and solved using augmented Lagrangians. Such methods can solve the unregularised problem without introducing any approximations, but generally require more computational resources to find the solution <sup>10</sup> . The regularisation approach was first explored by Bercovier and Engelman in 1980 <sup>11</sup>, who utilised a simple yet efficient work-around by adding a small constant to the computed strain-rate, so that even in the zero-strain limit the viscosity would remain finite. An alternative method proposed by Tanner and Milthorpe a few years later was the bi-viscosity model <sup>12</sup>, in which the viscoplastic fluid is characterised by a separate, large viscosity when the strain-rate is below a given threshold (see e.g. Abhijit and Sayantan <sup>13</sup> ). An exponential regularisation factor was then introduced by Papanastasiou in 1987 <sup>14</sup>, and this method of regularisation is still widely used in modern codes which deal with viscoplasticity through regularisation. Important investigations based on Papanastasiou regularisation include those of Mitsoulis et al. <sup>15–18</sup> and Syrakos et al. <sup>19–21</sup> . Augmented Lagrangian methods were first applied to the viscoplastic flow problem in 1983 by Fortin and Glowinski <sup>22</sup>, but the variational formulation on which it relies was derived by Duvaut and Lions in 1976, who studied existence, uniqueness and regularity of solutions to the problem <sup>23</sup> . The augmented Lagrangian algorithm itself is due to Hestenes (1969) <sup>24</sup> . Although the simulation of viscoplastic flow using this optimisation technique constitutes an important milestone in the history of its numerical treatments, the regularisation approach was much more popular due to the large discrepancy in computational resource requirements. Advances in convex optimisation over the next few decades led to the work of Saramito and Roquet <sup>25</sup>, where significant improvements were achieved in terms of convergence rates, and hence, computational efficiency. Other contributions <sup>26</sup> further confirmed the potential, and in recent years state-of-the-art algorithms are actively being developed, notably by Treskatis et al. <sup>27</sup>, Saramito <sup>28</sup>, Bleyer <sup>29</sup> and Dimakopoulos et al. <sup>30</sup> . Due to the ability to solve the unregularised viscoplasticity problem, these methods have become increasingly popular since algorithmic advances have led to significant speedup of their runtime. It is important to note, however, that these methods are still more costly than regularised approaches, so although they allow computation of exact locations of yield surfaces, they are unnecessarily expensive when this is less important, and a general understanding of the flow field is desirable. An example is within cement displacement complexities for engineering purposes <sup>31</sup>, where the desirable insight is pressure distributions and the cement displacement efficiency <sup>32</sup> . Numerical treatment of viscoplastic flow problems has significantly improved over the last decades. Researchers interested in analysing such flows are, however, still limited by the computational cost associated with their solution. Notably, most research published in the field considers only two spatial dimensions and only steady-state solutions. Although opensource libraries such as FEniCS <sup>33</sup> and OpenFOAM <sup>34</sup> can be used to simulate regularised viscoplastic fluids in three dimensions, our contribution aims to provide a massively parallelisable tool for contemporary supercomputer architectures, with capabilities for structured AMR (Adaptive Mesh Refinement). In order to achieve this, we begin with the IAMR <sup>35</sup> 3 code, that uses a second-order accurate, approximate projection method to solve the incompressible Navier-Stokes equations. The code is built on the AMReX software framework for developing parallel block-structured AMR applications. We have implemented the Papanastasiou regularised Herschel-Bulkley model for the apparent viscosity function in IAMR so that it can be used to simulate generalised Newtonian fluids. As such, we are able to take advantage of modern supercomputer architectures in our simulation of viscoplastic fluids. For the first time, results are presented for the transient, three-dimensional lid-driven cavity problem for viscoplastic fluids. Notably, the evolution of the three-dimensional yield surface from rest to steady-state is tracked, before the lid velocity is set to zero, allowing cessation of the viscoplastic fluid. For further reading on developments in viscoplastic fluids, we refer the reader to the review papers by Barnes <sup>36</sup> and Balmforth et al. <sup>37</sup> . Additionally, two excellent review papers on advances in numerical simulations of these fluids appeared in a recent special edition of _Rheologica_ _Acta_ <sup>10,18</sup> . In section II, we will introduce the governing partial differential equations and discuss relevant fluid rheologies. Section III is devoted to the numerical algorithm employed to simulate the fluid flow, including the regularisation strategy. Thorough validation is performed in section IV, before we evaluate the code for Herschel-Bulkley fluids and three dimensions in section V. Section VI concludes the article. II. MATHEMATICAL FORMULATION Our domain Ω _⊂_ R <sup>_d_</sup> is either in two or three dimensions, i.e. _d_ _∈{_ 2 _,_ 3 _}_ . For rank-2 tensors, we prescribe the scaled Frobenius norm _|_ A _|_ = ~~�~~ <u>1</u> 2 <sup>tr(</sup> <sup>AA</sup> <sup>_⊤_</sup> <sup>)</sup> <sup>_,_</sup> (1) as is customary in viscoplastic fluid mechanics. We take the gradient of a vector _u_ as the tensor with components1 - ( _∇_ _u_ ) _ij_ = _∂uj/∂xi_, and the symmetric part of this gradient 2 _u_ . The divergence of a tensor field is defined such that is given by _D_ _u_ = _∇_ + _∇_ <sup>_⊤_</sup> <sup>�</sup> 21 - _u_ . The divergence of a tensor field is defined such that is given by _D_ _u_ = _∇_ + _∇_ <sup>_⊤_</sup> <sup>�</sup> ( _∇·_ A ) _j_ = <sup>�</sup> <sup>_d_</sup> _i_ =1 <sup>_∂Aij/∂xi_</sup> <sup>.</sup> <sup>Variables</sup> <sup>are</sup> <sup>functions</sup> <sup>of</sup> <sup>position</sup> <sup>_x_</sup> <sup>_∈_</sup> <sup>Ωand</sup> <sup>time</sup> <sup>_t ≥_</sup> <sup>0.</sup> <sup>_d_</sup> _i_ =1 <sup>_∂Aij/∂xi_</sup> <sup>.</sup> <sup>Variables</sup> <sup>are</sup> <sup>functions</sup> <sup>of</sup> <sup>position</sup> <sup>_x_</sup> <sup>_∈_</sup> <sup>Ωand</sup> <sup>time</sup> <sup>_t ≥_</sup> <sup>0.</sup> A. Governing partial differential equations We denote by _ρ ∈_ R the material density. The velocity field is introduced as _u_ ( _x_ _, t_ ) _∈_ R <sup>_d_</sup>, with components _u_, _v_ and _w_ . The Cauchy stress tensor _σ_ is defined as the sum of isotropic and deviatoric parts, _σ_ = _−p_ I + _τ_ . Here, the pressure _p_ ( _x_ _, t_ ) _∈_ R is multiplied by the identity tensor, while the deviatoric part of the stress tensor is denoted _τ_ ( _x_ _, t_ ) _∈_ R <sup>_d_</sup> sym <sup>_×d_</sup> <sup>.</sup> <sup>The</sup> fluid motion is then governed by incompressible mass conservation and momentum balance through the Cauchy equation: _∇·_ _u_ = 0 _,_ (2a) _<u>∂</u>_ _<u>u</u>_ _<u>∂∂t</u>_ _<u>u</u>_ <sup>+</sup> <sup>_u_</sup> <sup>_· ∇_</sup> <sup>_u_</sup> <sup>=</sup> _ρ_ <sup><u>1</u></sup> (2b) _ρ_ <sup><u>1</u></sup> <sup>(</sup> <sup>_−∇p_</sup> <sup>+</sup> <sup>_∇·_</sup> <sup>_τ_</sup> <sup>+</sup> <sup>_f_</sup> <sup>)</sup> <sup>_._</sup> Here, we have introduced _f_ to describe external body forces such as gravity acting on the fluid. Note that the mass conservation equation is simplified to (2a) due to incompressibility, i.e. constant density within a fluid parcel. B. Rheology We shall in the following restrict ourselves to relatively simple equations of state, of the form _τ_ = _τ_ ( ˙ _γ_ ), where the stress response is solely dependent on the rate-of-strain tensor 4 _γ_ ˙ = _D_ _u_ _∈_ Rsym <sup>_n×n_</sup> <sup>.</sup> <sup>Although</sup> <sup>the</sup> <sup>Herschel-Bulkley</sup> <sup>model</sup> <sup>captures</sup> <sup>all</sup> <sup>aspects</sup> <sup>of</sup> <sup>the</sup> <sup>fluids</sup> considered, references for validation are only available for power-law and Bingham fluids. For this reason, we introduce these simpler rheological models first, and illustrate how they can be combined. Newtonian flow is characterised by a dynamic coefficient of viscosity _µ_ _>_ 0 which is independent of the strain, yielding a linear relationship between rate-of-strain and stress in the rheological equation: _τ_ = 2 _µ_ _γ_ ˙ _._ (3) For fluids where the dependency of the stress on the rate-of-strain tensor is nonlinear, the apparent viscosity is a useful concept when considering rheological responses to strain. It is a generalisation of the constant viscosity for Newtonian flow, where we allow the viscosity to be a function of the magnitude of the rate-of-strain tensor. Denoting the apparent viscosity by _η_, we thus have (4) _η_ = <sup>_<u>|</u>_</sup> <sup>_<u>τ</u>_</sup> <sup>_<u>|</u>_</sup> 2 _|_ _γ_ ˙ _|_ <sup>_._</sup> Many fluids are accurately modelled by a non-Newtonian behaviour that captures sheardependency through a smooth increase or decrease in apparent viscosity. Such fluids include pseudoplastics (shear-thinning, _∂η/∂|_ _γ_ ˙ _| <_ 0) and dilatants (shear-thickening, _∂η/∂|_ _γ_ ˙ _| >_ 0). A model which captures this behaviour is the power-law fluid, with rheological equation (5) _τ_ = 2 <sup>_n_</sup> _µ|_ _γ_ ˙ _|_ <sup>_n−_</sup> <sup>1</sup> _γ_ ˙ _,_ and apparent viscosity _η_ = 2 <sup>_n−_</sup> <sup>1</sup> _µ|_ _γ_ ˙ _|_ <sup>_n−_</sup> <sup>1</sup> _._ (6) A specific power-law fluid is characterised by its flow behaviour index _n >_ 0 (and _µ_, which is usually referred to as the consistency for power-law fluids, and has units Pa s <sup>_n_</sup> ). From (5) it is immediately clear that the Newtonian case with _n_ = 1 separates pseudoplastics ( _n <_ 1) from dilatants ( _n >_ 1). Viscoplastic fluids have a stress threshold _τ_ 0 _>_ 0 (the yield stress), below which they do not flow. We note that it is possible to describe elastic deformation for materials which do not flow, but we shall be considering constitutive equations which assume a rigid body approximation, i.e. zero strain rate below the yield stress. The simplest type of viscoplastic fluid is the Bingham fluid <sup>38,39</sup>, characterised by zero strain rate below the yield stress. In the yielded region, however, the stress depends linearly on the rate-of-strain magnitude, just like a Newtonian fluid. The stress-strain curve thus intercepts the _|_ _τ_ _|_ -axis at the point (0 _, τ_ 0). As such, the Bingham fluid is a generalised Newtonian, with rheological equation - _γ_ ˙ = 0 if _|_ _τ_ _| ≤_ _τ_ 0 _τ_ = 2 _µ_ _γ_ ˙ + _|_ <sup>_<u>τ</u>_</sup> _γ_ ˙ <sup><u>0</u></sup> _|_ <sup>_γ_</sup> <sup>˙</sup> if _|_ _τ_ _| > τ_ 0 (7) and apparent viscosity _η_ = _µ_ + 2 <sup>_<u>τ</u>_</sup> _|_ _γ_ ˙ <sup><u>0</u></sup> _|_ <sup>_._</sup> (8) For Bingham plastics, we refer to _µ_ as the plastic viscosity, and note that _η_ has a singularity for _γ_ ˙ = 0, as expected. In many applications, it is desirable to capture both the yield stress of viscoplastic fluids and the power-law dependency occurring once the fluid starts flowing. A widely used rheological model for such fluids is due to Herschel and Bulkley <sup>40</sup> . The Herschel-Bulkley fluid facilitates a very general description of non-Newtonian fluids, as it is a yield stress 5 _|_ _τ_ _|_ (Pa) _τ_ 0 _n_ =1 _/_ 3 _n_ =1 _/_ 2 _n_ =1 _n_ =2 _η_ (Pa s) _|_ ˙ _γ_ _|_ (s <sup>_−_</sup> <sup>1</sup> ) _|_ ˙ _γ_ _|_ (s <sup>_−_</sup> <sup>1</sup> ) FIG. 1: Herschel-Bulkley fluid: stress magnitude (left) and apparent viscosity (right) as functions of the magnitude of the rate-of-strain tensor _γ_ ˙ . fluid with a nonlinear stress-strain dependency in the yielded region. As such, it can be thought of as a hybrid between Bingham plastics and power law fluids. The constitutive equation is - _γ_ ˙ = 0 if _|_ _τ_ _| ≤_ _τ_ 0 if _τ_ = 2 <sup>_n_</sup> _µ|_ _γ_ ˙ _|_ <sup>_n−_</sup> <sup>1</sup> _γ_ ˙ + _|_ <sup>_<u>τ</u>_</sup> _γ_ ˙ <sup><u>0</u></sup> _|_ <sup>_γ_</sup> <sup>˙</sup> _|_ _τ_ _| > τ_ 0 while the apparent viscosity is _,_ (9) (10) _η_ = 2 <sup>_n−_</sup> <sup>1</sup> _µ|_ _γ_ ˙ _|_ <sup>_n−_</sup> <sup>1</sup> + <sup>_<u>τ</u>_</sup> <sup><u>0</u></sup> 2 _|_ _γ_ ˙ _|_ <sup>_._</sup> Bingham plastics are a special case of Herschel-Bulkley fluids in exactly the same manner as Newtonian fluids follow a specific power-law constitutive equation. Plots of the rheological characteristic for Herschel-Bulkley fluids are shown in figure 1, for various values of _n_ . Note that the Bingham fluid is recovered for _n_ = 1. III. NUMERICAL ALGORITHM A. Incompressible flow solver An approximate projection method for solving the variable density incompressible NavierStokes equations on an adaptive mesh hierarchy has been implemented in the [IAMR](https://github.com/AMReX-Codes/IAMR) code. The algorithm was described for the constant viscosity case by Almgren et al. <sup>35</sup>, with extensions to low Mach number reacting flows with temperature-dependent viscosity provided by Pember et al. <sup>41</sup> and Day and Bell <sup>42</sup>, among others. In addition to solving the NavierStokes equations for velocity and pressure, the IAMR code allows for the (conservative or passive) advection of any number of scalar quantities. The implementation is such that the code can be run on architectures from single-core laptops through to massively parallel supercomputers. In the approximate projection method as implemented in IAMR, an advection-diffusion step is used to advance the velocity in time; the solution is then (approximately) projected onto the space of divergence-free fields. The motivation for an approximate rather than exact projection is covered in detail in the literature <sup>43–45</sup> . Velocity is defined at cell centres at integer time steps, and is denoted by _u_ <sup>_m_</sup> _i,j,k_ <sup>.</sup> <sup>The</sup> pressure, on the other hand, is specified at cell corners and is staggered in time, so that it is denoted _pm_ + 2 <sup><u>1</u></sup> _i_ + <sup><u>1</u></sup> 2 <sup>.</sup> <sup>When no subscript is given (e.g.</sup> <sup>_u_</sup> <sup>_m_</sup> <sup>), we address the distribution of</sup> Velocity is defined at cell centres at integer time steps, and is denoted by _u_ <sup>_m_</sup> _m_ + 2 <sup><u>1</u></sup> _i_ + <sup><u>1</u></sup> 2 denoted _pm_ + 2 <sup><u>1</u></sup> _i_ + <sup><u>1</u></sup> 2 <sup>_,j_</sup> <sup>+</sup> <sup><u>1</u></sup> 2 <sup>_,k_</sup> <sup>+</sup> <sup><u>1</u></sup> 2 <sup>.</sup> <sup>When no subscript is given (e.g.</sup> <sup>_u_</sup> <sup>_m_</sup> <sup>), we address the distribution of</sup> _u_ throughout the computational domain at time _t_ <sup>_m_</sup> . Considerations such as initialisation 6 and boundary treatments are ignored at present, and we set external forces equal to zero. Instead, we focus on the steps required in order to evolve the solution a single time step ∆ _t_ . The first part of the advection-diffusion step is to extrapolate normal velocity components to each cell face at time _t_ <sup>_m_</sup> <sup>+</sup> 2 <sup><u>1</u></sup> . This is done through a second-order Taylor series expansion. to each cell face at time _t_ <sup>_m_</sup> <sup>+</sup> 2 <sup><u>1</u></sup> . This is done through a second-order Taylor series expansion. Consider the cell centre ( _i, j, k_ ), and suppose we want to extrapolate the first velocity component _u_ to the face ( _i_ + 2 <sup><u>1</u></sup> <sup>_, j, k_</sup> <sup>).</sup> <sup>Then</sup> <sup>the</sup> <sup>truncated</sup> <sup>Taylor</sup> <sup>series</sup> <sup>is</sup> 2 <sup><u>1</u></sup> <sup>_, j, k_</sup> <sup>).</sup> <sup>Then</sup> <sup>the</sup> <sup>truncated</sup> <sup>Taylor</sup> <sup>series</sup> <sup>is</sup> - _m_ _i,j,k_ + <sup><u>∆</u></sup> <sup>_<u>t</u>_</sup> 2 - _m_ _i,j,k_ - _<u>∂u</u>_ _∂x_ - _<u>∂u</u>_ _∂t_ _m_ + <sup><u>1</u></sup> 2 _i_ + <sup><u>1</u></sup> 2 2 _u_ + <sup><u>1</u></sup> 2 <sup><u>1</u></sup> _i,j,k_ <sup>+</sup> <sup><u>∆</u></sup> 2 <sup>_<u>x</u>_</sup> 2 <sup>_,j,k_</sup> <sup>_≈_</sup> <sup>_um_</sup> _._ (11) Taking the first component of (2b), we have - _<u>∂u</u>_ - _m_ _∂t_ _i,j,k_ _−_ _−_ - _m_ _i,j,k_ - _v_ <sup>_<u>∂u</u>_</sup> _∂y_ - _v_ <sup>_<u>∂u</u>_</sup> = _−_ - _u_ <sup>_<u>∂u</u>_</sup> _∂x_ - _m_ _i,j,k_ - _m_ _i,j,k_ - _w_ <sup>_<u>∂u</u>_</sup> _∂z_ - _w_ <sup>_<u>∂u</u>_</sup> _−_ _ρ_ <sup><u>1</u></sup> 2 - _m−_ <sup><u>1</u></sup> _i,j,k_ - _<u>∂τ∂x</u>_ <u>11</u> <sup>+</sup> <sup>_<u>∂τ</u>_</sup> _∂y_ <sup><u>21</u></sup> <sup>_<u>∂τ</u>_</sup> _∂y_ <sup><u>21</u></sup> <sup>+</sup> <sup>_<u>∂τ</u>_</sup> _∂z_ <sup><u>31</u></sup> - _<u>∂p</u>_ _∂x_ + <sup><u>1</u></sup> _ρ_ _∂z_ <sup><u>31</u></sup> <sup>+</sup> - _m_ _i,j,k_ _,_ (12) which can be substituted into the last term of the Taylor expansion to avoid any dependence on temporal derivatives. In order to compute these extrapolated values, however, it is necessary to calculate discrete approximations of the spatial derivatives. This is done separately for each part. The first derivative of normal velocity is evaluated using a monotonicitylimited fourth-order slope approximation _S_ as introduced by Colella in 1985 <sup>46</sup> . Since the pressure field is defined at grid nodes, cell-centred approximations of the pressure gradient _G_ are computed by finite differences. Finally, transverse derivative terms such as _v∂u/∂y_ are evaluated by a separate extrapolation and subsequent upwinding procedure, _._ (13) - _m_ _i,j,k_ - _v_ <sup>_<u>∂u</u>_</sup> _∂y_ - _v_ <sup>_<u>∂u</u>_</sup> _≈_ - <u>�</u> _v_ <sup>_<u>∂u</u>_</sup> _∂y_ - <u>�</u> _v_ <sup>_<u>∂u</u>_</sup> - _m_ _i,j,k_ With these discrete representations in place, the intermediate normal velocity at face _i_ + <sup><u>1</u></sup> 2 can be approximated based on the cell to its left ( _i, j, k_ ) as ( _Su_ ) <sup>_m_</sup> _i,j,k_ ( _Su_ ) <sup>_m_</sup> _m_ + 2 <sup><u>1</u></sup> _m_ + 2 <sup><u>1</u></sup> <sup>_,L_</sup> _i_ + <sup><u>1</u></sup> 2 <sup>_,j,k_</sup> - <u>∆</u> _<u>x</u>_ _i,j,k_ 2 <sup>_−_</sup> <sup>_um_</sup> <u>∆</u> _<u>t</u>_ 2 _u_ 2 <sup><u>1</u></sup> <sup>_,L_</sup> <sup><u>1</u></sup> 2 <sup>_,j,k_</sup> <sup>=</sup> <sup>_u_</sup> _i,j,k_ <sup>_m_</sup> <sup>+</sup> _−_ <sup><u>∆</u></sup> 2 <sup>_<u>t</u>_</sup> _−_ <sup><u>∆</u></sup> 2 _ρ_ <sup>_<u>t</u>_</sup> - _m_ _i,j,k_ _−_ <sup><u>∆</u></sup> 2 <sup>_<u>t</u>_</sup> - <u>�</u> _v_ <sup>_<u>∂u</u>_</sup> - <u>�</u> _w_ <sup>_<u>∂u</u>_</sup> _∂z_ �� _−_ ( _G_ _xp_ ) _∂y_ - _m_ _i,j,k_ 2 _mi,j,k−_ <sup><u>1</u></sup> _i,j,k_ 2 _m−_ <sup><u>1</u></sup> _i,j,k_ <sup>+ (</sup> <sup>_D_</sup> <sup>_x_</sup> <sup>_τ_</sup> <sup>)</sup> _i,j,k_ <sup>_m_</sup> �� _._ (14a) Similarly, an approximation based on the state to its right ( _i_ + 1 _, j, k_ ) is <u>∆</u> _<u>t</u>_ 2 ( _Su_ ) <sup>_m_</sup> _i_ +1 _,j,k_ ( _Su_ ) <sup>_m_</sup> _i_ _m_ + 2 <sup><u>1</u></sup> _m_ + 2 <sup><u>1</u></sup> <sup>_,R_</sup> _i_ + <sup><u>1</u></sup> 2 <sup>_,j,k_</sup> - <u>∆</u> _<u>x</u>_ _i_ +1 _,j,k_ 2 <sup>+</sup> <sup>_um_</sup> _u_ 2 <sup><u>1</u></sup> <sup>_,R_</sup> <sup><u>1</u></sup> 2 <sup>_,j,k_</sup> <sup>=</sup> <sup>_u_</sup> _i_ <sup>_m_</sup> +1 _,j,k_ <sup>+</sup> _−_ <sup><u>∆</u></sup> 2 <sup>_<u>t</u>_</sup> - _m_ _i_ +1 _,j,k_ _−_ <sup><u>∆</u></sup> 2 <sup>_<u>t</u>_</sup> - <u>�</u> _v_ <sup>_<u>∂u</u>_</sup> _∂y_ - <u>�</u> _v_ <sup>_<u>∂u</u>_</sup> - _m_ _i_ +1 _,j,k_ - <u>�</u> _w_ <sup>_<u>∂u</u>_</sup> _∂z_ _−_ <sup><u>∆</u></sup> 2 _ρ_ <sup>_<u>t</u>_</sup> 2 _mi_ +1 _−_ <sup><u>1</u></sup> _i_ +1 _,j,k_ _−_ ( _G_ _xp_ ) 2 _m−_ <sup><u>1</u></sup> _i_ +1 _,j,k_ <sup>+ (</sup> <sup>_D_</sup> <sup>_x_</sup> <sup>_τ_</sup> <sup>)</sup> _i_ <sup>_m_</sup> _._ (14b) These extrapolations need to be computed for tangential velocity components as well. At each face we then have two extrapolated approximations for _u_ <sup>_m_</sup> <sup>+</sup> <sup><u>1</u></sup> 2, one from each cell 7 adjoining at the face. In order to pick the most accurate of these, we construct a face-based advection velocity _u_ <sup>adv</sup> . The final, upwinded, extrapolated approximation at each face is denoted _u_ ˜ <sup>_m_</sup> <sup>+</sup> <sup><u>1</u></sup> 2 . With these extrapolated and upwinded approximations in place, (2b) is discretised in time to construct a new-time provisional velocity field, _u_ <sup>_∗_</sup>, without enforcing (2a), i.e. we define _u_ <sup>_∗_</sup> using _<u>u</u>_ <sup>_<u>∗</u>_</sup> _<u>−</u>_ _<u>u</u>_ <sup>_m_</sup> ∆ _t_ = _−_ [ _u_ <sup>MAC</sup> _· ∇_ _u_ ˜] <sup>_m_</sup> <sup>+1</sup> <sup>_/_</sup> <sup>2</sup> + <sup><u>1</u></sup> _ρ_ - _,_ (15) _−_ _G_ _p_ <sup>_m−_</sup> <sup>1</sup> <sup>_/_</sup> <sup>2</sup> + <sup><u>1</u></sup> 2 <sup>(</sup> <sup>_∇·_</sup> <sup>_τ_</sup> <sup>(</sup> <sup>_u_</sup> <sup>_m_</sup> <sup>) +</sup> <sup>_∇·_</sup> <sup>_τ_</sup> <sup>(</sup> <sup>_u_</sup> <sup>_∗_</sup> <sup>)) +</sup> <sup>_f_</sup> <sup>_m_</sup> where _G_ _p_ <sup>_m−_</sup> <sup>1</sup> <sup>_/_</sup> <sup>2</sup> is a lagged approximation to the pressure gradient _∇p_ and the density _ρ_ is a constant <sup>47</sup> . The explicit viscous term, _τ_ ( _u_ <sup>_m_</sup> ) _,_ is evaluated using only the velocity components at time _t_ <sup>_m_</sup>, i.e. we define _γ_ ˙ <sup>_m_</sup> = _γ_ ˙ ( _u_ <sup>_m_</sup> ), _η_ <sup>_m_</sup> = _η_ ( ˙ _γ_ <sup>_m_</sup> ) and write _τ_ ( _u_ <sup>_m_</sup> ) = 2 _η_ <sup>_m_</sup> _γ_ ˙ <sup>_m_</sup> . The implicit term, _τ_ ( _u_ <sup>_∗_</sup> ) as well as _u_ <sup>_∗_</sup> itself, are solved for with the same _η_ <sup>_m_</sup>, through a tensor solve of the form - _u_ <sup>_∗_</sup> _−_ <sup><u>∆</u></sup> _ρ_ <sup>_<u>t</u>_</sup> - = _u_ <sup>_m_</sup> _−_ ∆ _t_ [ _u_ <sup>MAC</sup> _· ∇_ _u_ ˜] <sup>_m_</sup> <sup>+1</sup> <sup>_/_</sup> <sup>2</sup> <sup><u>∆</u></sup> _ρ_ <sup>_<u>t</u>_</sup> <sup>_∇·_</sup> <sup>(</sup> <sup>_ηm_</sup> <sup>_γ_</sup> <sup>˙</sup> <sup>_∗_</sup> <sup>)</sup> + <sup><u>∆</u></sup> <sup>_<u>t</u>_</sup> _ρ_ + <sup><u>∆</u></sup> <sup>_<u>t</u>_</sup> - _−_ _G_ _p_ <sup>_m−_</sup> <sup>1</sup> <sup>_/_</sup> <sup>2</sup> + _∇·_ ( _η_ <sup>_m_</sup> _γ_ <sup>_m_</sup> ) + _f_ <sup>_m_</sup> <sup>�</sup> _._ (16) Note that all velocity components are solved for simultaneously. The final part of the algorithm is the projection step and subsequent pressure update. The velocity field _u_ <sup>_∗_</sup> does not in general satisfy the divergence constraint as given by (2a). We solve _Lρφ_ = _D_ - ∆1 _t_ <sup>_u_</sup> <sup>_∗_</sup> <sup>+</sup> _ρ_ <sup><u>1</u></sup> <sup>_G_</sup> <sup>_pm−_</sup> <sup>1</sup> <sup>_/_</sup> <sup>2</sup> (17) where _D_ is a discrete divergence and _G_ a discrete gradient. _Lρ_ is a second-order accurate approximation to _∇·_ _ρ_ <sup><u>1</u></sup> <sup>_∇._</sup> <sup>The</sup> <sup>new-time</sup> <sup>velocity</sup> <sup>is</sup> <sup>then</sup> <sup>defined</sup> <sup>by</sup> _u_ <sup>_m_</sup> <sup>+1</sup> = _u_ <sup>_∗_</sup> _−_ ∆ _t_ _ρ_ <sup><u>1</u></sup> <sup>_G_</sup> <sup>_φ_</sup> (18) and the updated pressure by _p_ <sup>_m_</sup> <sup>+1</sup> <sup>_/_</sup> <sup>2</sup> = _φ_ _._ (19) The resulting approximate projection satisfies the divergence constraint to second-order accuracy and ensures stability for the algorithm. Given suitable initial and boundary conditions, this algorithm can be used to evolve the system in time. For time-dependent flows approaching a steady-state solution, we consider the system steady when max _<u>u</u>_ <sup>_m_</sup> <sup>+1</sup> _<u>−</u>_ _<u>u</u>_ <sup>_m_</sup> (20) ���� _u_ <sup>_m_</sup> ���� _<_ 10 _−_ 5 _._ For further detail on the algorithm, see the original paper by Almgren et al. <sup>35</sup> B. Regularisation of viscosity Equation (9) does not present any problems for unyielded regions ( ˙ _γ_ _>_ 0), but the apparent viscosity has a singularity when the strain rate approaches zero (and _|_ _τ_ _| →_ _τ_ 0). Computational schemes such as those implemented in IAMR cannot be used in the presence 8 _τ_ 0 _|_ _τ_ _|_ (Pa) _ε_ =10 <sup>_−_</sup> <sup>2</sup> s <sup>_−_</sup> <sup>1</sup> _ε_ =10 <sup>_−_</sup> <sup>3</sup> s <sup>_−_</sup> <sup>1</sup> _ε_ =10 <sup>_−_</sup> <sup>4</sup> s <sup>_−_</sup> <sup>1</sup> Bingham _η_ (Pa s) _|_ ˙ _γ_ _|_ (s <sup>_−_</sup> <sup>1</sup> ) _|_ ˙ _γ_ _|_ (s <sup>_−_</sup> <sup>1</sup> ) FIG. 2: Papanastasiou regularisation for the Bingham model: stress magnitude (left) and apparent viscosity (right) as functions of the magnitude of the rate-of-strain tensor _|_ _γ_ ˙ _|_ . For decreasing _ε_, we recover a closer approximation to the actual Bingham model. Note that logarithmic axes are employed in order to highlight the behaviour in the low-strain limit. of such singularities. Regularisation deals with the problem by replacing the ill-behaved apparent viscosity with a function that approximates the rheological behaviour, but which stays bounded for arbitrarily small _γ_ ˙ . This is done by introducing an additional parameter _ε_ to the apparent viscosity, which describes how big the effect of the regularisation is. A large value of _ε_ allows for inexpensive computations even near unyielded flow, while the limit _ε →_ 0 recovers the unregularised description. Note that one must be careful to choose a small enough value for _ε_, in addition to fine enough mesh resolutions and convergence criterion. Otherwise, the mathematical approximation will not hold. We employ the popular Papanastasiou regularisation <sup>14,48</sup>, which utilises an exponential relaxation according to <u>1</u> _._ (21) _|_ _γ_ ˙ _|_ <sup>_→_</sup> <sup><u>1</u></sup> <sup>_<u>−</u>_</sup> _|_ <sup>_<u>e</u>_</sup> _γ_ ˙ <sup>_<u>−|</u>_</sup> _|_ <sup>_γ_</sup> <sup>˙</sup> <sup>_<u>|/ε</u>_</sup> This is a good approximation for _|_ _γ_ ˙ _|/ε ≫_ 1, while in the small strain limit we have - _∞_ _k_ =0 = <sup><u>1</u></sup> (22) _ε_ <sup>_,_</sup> _|_ _γ_ ˙ _|→_ 0 1 _−_ <u>(</u> _<u>−|</u>_ _<u>γ</u>_ <u>˙</u> _<u>|/ε</u>_ <u>)</u> <sup>_k_</sup> _k_ ! lim _|_ _γ_ ˙ _|→_ 0 <u>1</u> _<u>−</u>_ _<u>e</u>_ <sup>_<u>−|</u>_</sup> <sup>_γ_</sup> <sup>˙</sup> <sup>_<u>|/ε</u>_</sup> _<u>e</u>_ <sup>_<u>−|</u>_</sup> <sup>_γ_</sup> <sup>˙</sup> <sup>_<u>|/ε</u>_</sup> = lim _|_ _γ_ ˙ _|_ _|_ _γ_ ˙ _|→_ <u>1</u> _|_ _γ_ ˙ _|_ so that it always remains bounded, and recovers the unregularised model in the limit _ε_ _→_ 0. Combination of (21) with the apparent viscosity as given in (9), gives the regularised viscosity as �� _._ (23) 1 _−_ _e_ <sup>_−|_</sup> <sup>_γ_</sup> <sup>˙</sup> <sup>_|/ε_</sup> <sup>�</sup> _η_ = �2 <sup>_n−_</sup> <sup>1</sup> _µ|_ _γ_ ˙ _|_ <sup>_n−_</sup> <sup>1</sup> + <sup>_<u>τ</u>_</sup> <sup><u>0</u></sup> 2 _|_ _γ_ ˙ _|_ The effect of varying the regularisation parameter _ε_ is shown in figure 2. In the Papanastasiouregularised Herschel-Bulkley model, the singularity in apparent viscosity is replaced by the limiting value lim 2 _ε_ <sup>_._</sup> (24) _|_ _γ_ ˙ _|→_ 0 <sup>_η_</sup> <sup>=</sup> <sup>_<u>τ</u>_</sup> <sup><u>0</u></sup> C. Adaptive mesh refinement For a vast range of flow problems, large computational domains are required even though we are only interested in small areas of the domain such as boundaries, interfaces or areas 9 where variables exhibit complex dynamic behaviour. Refining the computational mesh in these regions is a well-known technique in order to save memory and processing power, and it can be applied with various degrees of sophistication. Within [IAMR,](https://amrex-codes.github.io/IAMR/) and the [AMReX](https://amrex-codes.github.io/amrex/) framework in general, hierarchical structured AMR is employed, which allows for efficient local refinement by symmetrically splitting each cell into 2 <sup>_d_</sup> smaller ones, where _d_ is the dimensionality of the problem. Furthermore, the dynamic refinement is spatio-temporal, meaning that we employ subcycling in the discrete time steps to avoid setting global time step restrictions based on the smallest cells. This is crucial for dynamic AMR to be used efficiently. Tagging criteria are utilised in order for the code to determine which cells should be split or merged at a given refinement step, and these can depend on the values of any directly simulated or derived variables, in addition to spatial position and time. For details on the implementation of structured AMR in this code, we refer to the websites of AMReX [(https://amrex-codes.github.io/amrex/)](https://amrex-codes.github.io/amrex/) and IAMR [(https://amrex-](https://amrex-codes.github.io/IAMR/) [codes.github.io/IAMR/),](https://amrex-codes.github.io/IAMR/) where full documentation and source code is available. D. Parallel implementation [AMReX](https://github.com/AMReX-Codes/amrex) is a mature, open-source software framework for building massively parallel block-structured AMR applications. AMReX contains extensive software support for explicit and implicit grid-based operations. Multigrid solvers, including those for tensor systems, are included for cell-based and node-based data. AMReX uses a hybrid MPI/OpenMP approach for parallelization; in this model individual grids are distributed to MPI ranks, and OpenMP is used to thread over logical tiles within the grids. Applications based on AMReX have demonstrated excellent strong and weak scaling up to hundreds of thousands of cores <sup>49–52</sup> . IV. VALIDATION In order to validate our code, we consider the two-dimensional lid-driven cavity test case. It is a historically significant and widely used benchmark problem for viscous flow simulations, and consequently a large amount of reference results exist in the literature. Our domain is a square of side length _L_, i.e. Ω= [0 _, L_ ] <sup>2</sup>, and is filled with a fluid of constant density. Initially, the system is at rest. All walls except the top (the “lid”) are held fixed, so that the boundary conditions on these walls are _u_ = (0 _,_ 0). At time _t_ = 0, the lid is instantaneously prescribed the tangential velocity _U_, so that the relevant boundary condition for _t_ _>_ 0 is _u_ = ( _U,_ 0). Without any other external forces ( _f_ = 0), this drives a recirculating flow in the cavity, which reaches a steady-state solution for non-turbulent regimes. In order to obtain a dimensionless form of (2), we let _x_ ˆ = _x_ _/L_, _u_ ˆ = _u_ _/U_ and _t_ <sup>ˆ</sup> = _t/_ ( _L/U_ ). Additionally, we take _U/L_ as a characteristic strain-rate, and let _γ_ ˆ˙ = <sup>_<u>γ</u>_</sup> <sup><u>˙</u></sup> _<u>U</u>_ _L_ _<u>η</u>_ _,_ _η_ ˆ = <u>�</u> _n−_ 1 <sup>_,_</sup> (25) <u>�</u> _<u>n</u>_ _._ (26) _<u>p</u>_ _p_ ˆ = 2 <sup>_n−_</sup> <sup>1</sup> _µ_ <u>�</u> _<u>U</u>_ _L_ _<u>τ</u>_ <u>�</u> _<u>n</u>_ _,_ _τ_ ˆ = 2 <sup>_n−_</sup> <sup>1</sup> _µ_ <u>�</u> _<u>U</u>_ _L_ 2 <sup>_n−_</sup> <sup>1</sup> _µ_ <u>�</u> _<u>U</u>_ _<u>L</u>_ _<u>τ</u>_ By substituting these dimensionless variables into (2), we find that the governing equations in dimensionless form are _<u>∂</u>_ _<u>u</u>_ <u>ˆ</u> _<u>∂</u>_ _<u>u</u>_ <u>ˆ</u> _∂t_ <sup>ˆ</sup> <sup>+</sup> <sup>_u_</sup> <sup>ˆ</sup> <sup>_·_</sup> <sup>_∇_</sup> <sup>ˆ</sup> <sup>_u_</sup> <sup>ˆ =</sup> _Re_ <sup><u>1</u></sup> _Re_ 10 - _−∇_ <sup>ˆ</sup> _p_ ˆ + _∇·_ <sup>ˆ</sup> ˆ _τ_ _,_ (27a) _∇·_ ˆ _u_ ˆ = 0 _,_ (27b) _τ_ ˆ = 2ˆ _η_ _γ_ <sup>ˆ</sup> ˙ _,_ (27c) _|_ _γ_ <sup>ˆ</sup> ˙ _|_ _η_ ˆ = _|_ _γ_ <sup>ˆ</sup> ˙ _|_ <sup>_n_</sup> + <sup><u>1</u></sup> 2 - <u>1</u> _<u>−</u>_ _<u>e−Pa</u>_ _<u>|</u>_ _γ_ ˆ˙ _<u>|</u>_ <sup><u>1</u></sup> 2 <sup>_HB_</sup> _|_ _γ_ <sup>ˆ</sup> ˙ _|_ _,_ (27d) where we have introduced the dimensionless groups _Re_ = _<u>ρU</u>_ <sup>2</sup> 2 <sup>_n−_</sup> <sup>1</sup> _µ_ <u>�</u> _<u>U</u>_ _L_ _<u>τ</u>_ <u>0</u> <u>�</u> _<u>n</u>_ _,_ _HB_ = 2 <sup>_n−_</sup> <sup>1</sup> _µ_ <u>�</u> _<u>U</u>_ _L_ <u>�</u> _<u>n</u>_ _,_ (28) _Pa_ = <sup>_<u>U</u>_</sup> _εL_ <sup>_._</sup> <u>�</u> _<u>n</u>_ _,_ _Pa_ = <sup>_<u>U</u>_</sup> _ε_ The Reynolds number _Re_ is the ratio of inertial forces to (power-law) viscous ones, while the Herschel-Bulkley number _HB_ quantifies the effect of yield stress versus power-law viscosity. The Papanastasiou number _Pa_ measures the degree of regularisation employed in the apparent viscosity, with higher _Pa_ being a more accurate description of unregularised viscoplasticity. It is worth noting that the Reynolds number for Newtonian flow ( _n_ = 1) is _Re_ _N_ = _ρUL/µ_ . When we have information about the dimensionless apparent viscosity _η_ ˆ throughout our domain at a given time, we can compute the local Reynolds number field _ReL_ = _Re/η_ ˆ. This value, which is proportional to the inverse of the apparent viscosity, provides insight about which regions of the domain are dominated by the effects of viscoplasticity, and which ones have near-Newtonian behaviour. Finally, for the special case _n_ = 1, we introduce the Bingham number _Bi_ = _τ_ 0 _L/µU_, to allow comparisons with articles written on simulation of Bingham fluids. In the remainder of this section, we use _L_ = 1 m, _ρ_ = 1000 kg _/_ m <sup>3</sup>, _U_ = 1 m _/_ s and _Pa_ = 400. It is important to choose a high enough value of _Pa_ when using regularised schemes, and our choice is based on the arguments by Syrakos et al. <sup>19</sup>, who show that this value results in highly accurate simulations. The cavity is discretised spatially with 256 cells in each dimension. The lid-driven cavity flow is then uniquely defined by the choices of _µ_, _n_ and _τ_ 0. To the authors’ best knowledge, reference results for Herschel-Bulkley fluids have not been presented in the literature. There are, however, plenty of results for power-law fluids and Bingham plastics. Since these two characterise separate components of the HerschelBulkley model, we expect that validating each of them individually is a good test for our code. Evaluation of the full Herschel-Bulkley model, based on this validation, is given in section V. Power-law fluids have zero yield stress, and are different from the Newtonian case when the flow behaviour index is different from unity. They were studied using a least squares finite elements formulation by Bell and Surana in 1994 <sup>53</sup>, who presented results with _n_ = 1 _/_ 2 and _n_ = 3 _/_ 2. A third-order finite volume method with upwinding was then used to study the same problem by Neofytou in 2005 <sup>54</sup> . The classical way to compare results from the lid-driven cavity test case is to drive the system to steady state, and then look at the velocity profiles in each direction at slices perpendicular to the flow. This ensures that we can compare with results from codes that can only calculate steady-state solutions. Figure 3 shows our results for power-law fluid velocity profiles, and includes reference results from the aforementioned papers. Additionally, we include the Newtonian case with comparisons from the classical paper by Ghia et al. <sup>55</sup> . It is evident that decreasing _n_ results in less lid-induced kinetic energy propagating further down in the domain, whereas increasing it has the opposite effect. Our results align very well with those found in the literature, especially those due to Neofytou, which have the highest accuracy. We have also included the velocity profile for _n_ = 0 _._ 1, in order to illustrate the significant viscous resistance in the limit _n →_ 0. Present study, _n_ = 0 _._ 1 Present study, _n_ = 0 _._ 5 Bell et al. (1994), _n_ = 0 _._ 5 Neofytou (2005), _n_ = 0 _._ 5 Present study, _n_ = 1 Ghia et al. (1982), _n_ = 1 ~~Present~~ ~~study,~~ _~~n~~_ ~~=~~ ~~1~~ _~~.~~_ ~~5~~ Bell et al. (1994), _n_ = 1 _._ 5 Neofytou (2005), _n_ = 1 _._ 5 0 _._ 0 0 _._ 5 1 _._ 0 _u_ ˆ 11 0 _._ 0 0 _._ 2 0 _._ 4 0 _._ 6 0 _._ 8 1 _._ 0 _x_ ˆ 0 _._ 2 0 _._ 1 _v_ ˆ 0 _._ 0 _−_ 0 _._ 1 _−_ 0 _._ 2 _−_ 0 _._ 3 _y_ ˆ 1 _._ 0 0 _._ 8 0 _._ 6 0 _._ 4 0 _._ 2 0 _._ 0 FIG. 3: Velocity profiles for power-law fluids with _µ_ = 10 Pa s <sup>_n_</sup> . Left: First component of velocity through the vertical slice _x_ ˆ = 0 _._ 5. Right: Second component of velocity through the horizontal slice _y_ ˆ = 0 _._ 5. 1 _._ 0 Present study, _Bi_ = 0 _._ 1 Neofytou (2005), _Bi_ = 0 _._ 1 Chai et al. (2011), _Bi_ = 0 _._ 1 Present study, _Bi_ = 1 Neofytou (2005), _Bi_ = 1 Chai et al. (2011), _Bi_ = 1 <u>Present</u> <u>study,</u> _<u>Bi</u>_ <u>=</u> <u>10</u> Present study, _Bi_ = 100 Present study, _Bi_ = 1000 0 _._ 0 0 _._ 5 1 _._ 0 _u_ ˆ 0 _._ 1 0 _._ 0 _v_ ˆ _−_ 0 _._ 1 _−_ 0 _._ 2 0 _._ 0 0 _._ 2 0 _._ 4 0 _._ 6 0 _._ 8 1 _._ 0 _x_ ˆ _y_ ˆ 0 _._ 8 0 _._ 6 0 _._ 4 0 _._ 2 0 _._ 0 FIG. 4: Velocity profiles for Bingham fluids with _Re_ = 100. Left: First component of velocity through the vertical slice _x_ ˆ = 0 _._ 5. Right: Second component of velocity through the horizontal slice _y_ ˆ = 0 _._ 5. We recall that Bingham fluids have _n_ = 1 and non-zero yield stress _τ_ 0. Due to the importance of accurately capturing viscoplastic behaviour, we have performed extra validation tests for this model. Figure 4 depicts velocity profiles at various Bingham numbers, with comparison to the works of Neofytou <sup>54</sup> and Chai et al. <sup>56</sup> . In the latter reference, a multiplerelaxation-time lattice Boltzmann model was employed to simulate non-Newtonian fluids. We see that increasing the yield-stress has an effect on the velocity profiles similar to that of lowering _n_ for the power-law fluids, although the Bingham fluids have sharper transitions in the profile (especially noteworthy in the _x_ -velocity). Our results are in excellent agreement with the relevant references, and we have also extended the range of Bingham numbers beyond those for which velocity profiles are available in the literature. 12 The second method we use for validation is locating the position of the main vortex centre within the cavity, at steady-state. A comprehensive study exploring this dependency was performed in 2014 by Syrakos et al. <sup>20</sup> . We have performed simulations to steady-state for a large number of configurations of _Re_ and _Bi_, and the resulting vortex locations are depicted in figure 5, alongside the results of Syrakos et al. We reiterate what they found in their paper: increasing the Bingham number moves the vortex upwards and to the right, while increasing the Reynolds number moves the vortex first towards the right, and then downwards and left to the centre. Our results agree very well with the reference results for the range of ( _Re_, _Bi_ ) pairs covered in that study. Additionally, we have covered many more large Bingham numbers, obtaining results which follow the patterns to be expected. This illustrates the capability of our code to simulate fluids with very large yield stress. Please note that the number next to each point in the figure is the modified Reynolds number _<u>Re</u>_ _Re_ <sup>_∗_</sup> = ( _Bi_ + 1) <sup>_._</sup> (29) This is because, following Syrakos et al. <sup>21</sup>, it provides a more natural measure of the transition to turbulence in the high- _Bi_ region. For further discussions on choice of dimensionless parameters in viscoplastic fluid mechanics, we refer the reader to articles by de Souza Mendes <sup>57</sup> and Thompson and Soares <sup>58</sup> . The most important validation for viscoplastic fluids, is the accurate determination of yield surfaces. Regions where the stress satisfies _|_ _τ_ _|_ _≤_ _τ_ 0 are known as unyielded regions. The interface which separates yielded and unyielded regions is called the yield surface. Since the yield surface separates two fundamentally different states of matter (viscous fluid flow and rigid solid behaviour), locating it precisely is a valuable metric for evaluating numerical results. Finally, we would like to ensure that our time-marching scheme accurately captures the fluid movement. In order to validate both of these two attributes, we run a simulation starting from rest and evolving to the steady-state for the lid-driven cavity. Note that the criteria for the system having reached steady-state is that the maximum relative change in the velocity field from one iteration to the next is less than some tolerance (in our case 10 <sup>_−_</sup> <sup>5</sup> ). At this point, we set the lid velocity to zero, and let the system come to rest again through cessation. When the entire domain is an unyielded region, we stop the simulation. Although some authors have used time-stepping schemes to advance the system to steady-state <sup>59,60</sup>, we are not aware of any results illustrating the yield surface development for instantaneous start from rest. On the other hand, the latter half of this numerical experiment, i.e. cessation of Bingham fluids from the lid-driven steady-state, was studied numerically by Syrakos et al. in 2016 <sup>21</sup> . Comparisons with their yield surfaces and time measurements therefore serve as validation for our code. Results with _Re_ = 1 and _Bi_ = 10 are depicted in figure 6. The yield surface is illustrated as the single black contour line _|_ _τ_ _|_ = _τ_ 0, <sup>61</sup> while the heat map shows the local Reynolds number _Re_ _L_ . Note that the scaling of the heat map is logarithmic (see top of figure 6). For viscoplastic fluids, unyielded regions occur in two distinct manners. Firstly, there are so-called stagnant zones, which are connected to no-slip walls and in which the fluid has zero velocity. On the other hand, unyielded zones with non-zero velocity are referred to as plug zones. These are not in contact with the walls, and rotate in the interior of the cavity. In fact, these two types of unyielded zones can never be in contact with each other, but must be separated by a layer of yielded fluid. This is because a plug zone connected to a stagnant zone would by association itself be stagnant, and thus could not move. The first five plots (a)-(e) show the transition from rest to steady-state. It is clear that the fluid yields immediately at a very thin layer near the lid, since a large strain is applied here at _t_ <sup>ˆ</sup> = 0. Additionally, there are yielded regions which quickly propagate from the top corners and in towards the middle, eventually combining together and leaving an unyielded plug in the upper middle part of the cavity (a)-(c). This process occurs very quickly, in less than one percent of the time needed to reach steady-state, but should in fact happen instantaneously, following the discussion above. The initial connection between the stagnant zone at the bottom and the rotating plug is a spurious artefact due to the regularisation 13 ## 1 . 0 0 . 9 0 . 8 <u>5</u> <sup><u>10</u></sup> ~~<u>38</u>~~ ~~<u>50</u>~~ 25 <u>75</u> 100 1 25 1 <sup>10</sup> 20 30 40 <sup>45</sup> 10050 250 1000 1 <sup>7</sup> 10 <u>19</u> ~~28~~ ~~37~~ ~~46~~ 69 91 114 496 991 ~~199~~ _<u>Bi</u>_ <u>= 0</u> _Bi_ = 1 _Bi_ = 10 _Bi_ = 100 _~~Bi~~_ ~~= 1000~~ 20 50 ## y ˆ 10 75 <u>100</u> 182 ## 0 . 7 0 . 6 0 . 5 100 ~~150~~ 150 200 300 <u>500</u> 500 <u>250</u> 1000 2000 5000 1000 ~~2500~~ 455 ## 0 . 5 0 . 6 0 . 7 0 . 8 0 . 9 1 . 0 x ˆ FIG. 5: Vortex centre locations in the two-dimensional lid-driven cavity for Bingham fluids. Empty circles are results from Syrakos et al. <sup>20</sup>, while the remaining symbols are results from the present study. The number next to each point is the corresponding modified Reynolds number _Re_ <sup>_∗_</sup> . approach. Since we regularise the apparent viscosity, small but non-zero velocities are permissible in unyielded regions. The steady-state shape of the resulting plug, and the unyielded region at the bottom of the cavity (e), is characteristic for the chosen pair of Reynolds and Bingham numbers. Comparisons to results by Syrakos et al. show that the steady-state yield surfaces are indistinguishable. At this point ( _t_ <sup>ˆ</sup> = 0 _._ 020552), the lid is abruptly halted and held still. This removes the driving force for the flow from the system, and leads to cessation of the flow. Since cessation occurs in finite time for viscoplastic fluids, the cessation time _tc_, defined as the time until the entire cavity is in the unyielded state, is an important characteristic. In order to measure _t_ <sup>ˆ</sup> _c_, we introduce a new time _t_ <sup>˜</sup> = _t_ <sup>ˆ</sup> _−_ 0 _._ 0205552. We have chosen four times during flow cessation to compare with Syrakos et al. <sup>21</sup> and the flow patterns are very similar to their published results. Additionally, our simulations yield _t_ ˆ _c_ = 1 _._ 2844 _×_ 10 <sup>_−_</sup> <sup>3</sup>, which is a relative difference of less than 0 _._ 9% compared to the previously published results. Note also the unphysical connection between stagnant and plug zones in 14 (a) _t_ <sup>ˆ</sup> = 3 _._ 5 _×_ 10 <sup>_−_</sup> <sup>6</sup> (b) _t_ <sup>ˆ</sup> = 1 _._ 05 _×_ 10 <sup>_−_</sup> <sup>5</sup> (c) _t_ <sup>ˆ</sup> = 9 _._ 33 _×_ 10 <sup>_−_</sup> <sup>5</sup> (d) _t_ <sup>ˆ</sup> = 9 _._ 540 _×_ 10 <sup>_−_</sup> <sup>4</sup> (e) _t_ <sup>ˆ</sup> = 0 _._ 020555 _,_ _t_ ˜ = 0 (f) _t_ <sup>˜</sup> = 3 _._ 89 _×_ 10 <sup>_−_</sup> <sup>5</sup> (g) _t_ <sup>˜</sup> = 6 _._ 480 _×_ 10 <sup>_−_</sup> <sup>4</sup> (h) _t_ <sup>˜</sup> = 1 _._ 1664 _×_ 10 <sup>_−_</sup> <sup>3</sup> (i) _t_ <sup>˜</sup> = 1 _._ 2729 _×_ 10 <sup>_−_</sup> <sup>3</sup> FIG. 6: Yield surface and local Reynolds number for time-dependent flow in the 2D lid-driven cavity. The fluid is initially at rest, and gradually transitions to a steady state (a)-(e). At this point, the lid is stopped, allowing cessation in finite time (e)-(i). (i), which is in agreement with the results and discussions of Syrakos et al. <sup>21</sup> . In order to rectify these spurious artefacts, one would need a very high Papanastasiou number or use an unregularised approach. <sup>62</sup> . 15 V. EVALUATION A. Herschel-Bulkley fluids The results in section IV validate our code for fluids obeying power-law and Bingham rheologies, but there are no available comparisons in the literature for Herschel-Bulkley fluids, which exhibit power-law dependencies in addition to a non-zero yield stress. Consequently, simulations were performed for viscoplastic fluids with the flow index _n_ equal to 0.5 and 2.0. In order to cover a wide range of flow behaviours, we also chose to vary the HerschelBulkley number _HB_ and the modified Reynolds number _Re_ <sup>_∗_</sup>, as given by (29). For each combination of _n_, _HB_ and _Re_ <sup>_∗_</sup>, the system was advanced to steady-state, in order to obtain velocity profiles through the centre of the domain and the final location of the main vortex. These results can be used as benchmark references for codes simulating Herschel-Bulkley fluids. Figure 7 shows the steady-state velocity profiles for each different parameter combination. As expected, a small flow index enhances the effect of the yield stress, resulting in weak velocity variations. This leads to the largely overlapping _x_ -velocity profiles in the upper left plot, so that the _y_ -velocity profiles in the upper right one are more useful comparisons. In the lower plots, however, where the fluid acts as a dilatant above the yield criterion, there is a trade-off between the effects of flow index and yield stress, so that we obtain large velocity variations throughout the middle of the domain in both directions. In figure 8, we show the steady-state locations of the main vortex centres for each HerschelBulkley simulation. Comparing the results with figure 5, we see the same effects of increasing _HB_ as for _Bi_, i.e. vortex moving upwards and to the right. Similarly, increasing _Re_ <sup>_∗_</sup> results in the vortex moving first right and then down toward the cavity centre. Both of these observations are as expected, since the dimensionless groups capture similar aspects of the flow. Additionally, we note that decreasing the flow index _n_ has a similar effect as increasing the yield stress, moving the vortex centre upwards and to the right. These additional data points serve as further benchmarking results for Herschel-Bulkley fluids. B. Adaptive mesh refinement The use of AMR improves the efficiency of our algorithm in two different ways, depending on whether we are interested in steady-state results or transient behaviour. In the former case, we do not care about intermediate results, and would ideally employ a large time step. Unfortunately, due to the semi-implicit viscous solves employed in IAMR, we are unable to reach steady-state for highly resolved simulations by iterating with large time steps. The large system requires longer runtimes per time step, and the time step decreases proportionally with the grid size. On the other hand, we can rapidly advance a low-resolution simulation to steady-state, and then restart the simulation with one refinement level enabled throughout the entire domain. Due to the initial conditions, the finer resolution will converge after a much smaller amount of iterations. Subsequently, the simulation can be restarted again with a further level of refinement, and so on. In this manner, the computational expense associated with time-dependent simulation to a highly resolved steady-state is greatly reduced. As an example, advancing the 2D case with _Re_ = 1, _Bi_ = 10 to steady-state on a 16-core desktop computer took 83 minutes and 13 seconds when using a resolution of 256 <sup>2</sup> . By first advancing a low-resolution system with 64 <sup>2</sup> cells to steady-state (33 seconds), and then refining the entire domain with two levels, the runtime for obtaining the same steady-state result is reduced to just under 15 minutes. Due to the built-in checkpoint functionality in AMReX, restarting simulations with different runtime options in this manner is straightforward. In order to illustrate the usefulness of AMR in unsteady simulations, we refer to figure 9 (Multimedia view), which shows the full evolution of a Bingham fluid with _Re_ = 1000 and _Bi_ = 1 from rest to steady-state with AMR enabled. The base grid consists of 64 cells in 16 _HB_ = 10, _Re_ <sup>_∗_</sup> = 1 _HB_ = 10, _Re_ <sup>_∗_</sup> = 100 _<u>HB</u>_ <u>=</u> <u>10,</u> _<u>Re</u>_ <sup>_<u>∗</u>_</sup> <u>=</u> <u>500</u> _HB_ = 100, _Re_ <sup>_∗_</sup> = 1 _HB_ = 100, _Re_ <sup>_∗_</sup> = 100 _<u>HB</u>_ <u>=</u> <u>100,</u> _<u>Re</u>_ <sup>_<u>∗</u>_</sup> <u>=</u> <u>500</u> 0 _._ 00 0 _._ 25 0 _._ 50 0 _._ 75 1 _._ 00 _u_ ˆ _−_ 0 _._ 5 0 _._ 0 0 _._ 5 1 _._ 0 _u_ ˆ _y_ ˆ _y_ ˆ 1 _._ 0 0 _._ 8 0 _._ 6 0 _._ 4 0 _._ 2 0 _._ 0 1 _._ 0 0 _._ 8 0 _._ 6 0 _._ 4 0 _._ 2 0 _._ 0 _v_ ˆ 0 _._ 01 0 _._ 00 _−_ 0 _._ 01 _v_ ˆ _−_ 0 _._ 02 _−_ 0 _._ 03 _−_ 0 _._ 04 0 _._ 4 0 _._ 2 0 _._ 00 0 _._ 25 0 _._ 50 0 _._ 75 1 _._ 00 _x_ ˆ 0 _._ 00 0 _._ 25 0 _._ 50 0 _._ 75 1 _._ 00 _x_ ˆ 0 _._ 0 _−_ 0 _._ 2 _−_ 0 _._ 4 _−_ 0 _._ 6 FIG. 7: Steady-state velocity profiles for Herschel-Bulkley fluids with _n_ = 0 _._ 5 (top) and _n_ = 2 _._ 0 (bottom), and various combinations of _HB_ and _Re_ <sup>_∗_</sup>, given in the legend in the top left plot. Note that for the dilatants with _HB_ = 100, several lines almost overlap. each direction, and two levels of refinement are used to achieve high resolution near the yield surface. This is done by tagging cells where _|_ _τ_ _|_ _≤_ 1 _._ 05 _τ_ 0 for refinement. Consequently, we only need to use large amounts of computational resources in some regions. Due to the blockstructured AMR implementation, the grid distribution is highly parallel. Additionally, the temporal subcycling in time ensures that we only need to decrease the step size in refined cells - not globally. C. Moving to three dimensions Since the augmented IAMR code is efficient and parallelises well, it is possible to run unsteady simulations of fully three-dimensional viscoplastic flows. As an extension of the lid-driven cavity for Bingham fluids in 2D, we consider a unit cube with stationary no-slip conditions on the floor and all four walls, while the lid (at _z_ ˆ = 1) drives the flow. We expect the results of such a simulation to be similar to the classical two-dimensional case, which 17 <u>1</u> <u>100</u> 1 100 1 <u>1</u> <u>500</u> ## y ˆ ## 1 . 0 0 . 9 0 . 8 0 . 7 0 . 6 0 . 5 100 100 <u>500</u> 500 500 _~~n~~_ ~~= 0~~ _~~.~~_ ~~5,~~ _~~HB~~_ ~~= 10~~ _n_ = 0 _._ 5, _HB_ = 100 _n_ = 2 _._ 0, _HB_ = 10 _n_ = 2 _._ 0, _HB_ = 100 ## 0 . 5 0 . 6 0 . 7 0 . 8 0 . 9 1 . 0 x ˆ FIG. 8: Steady-state vortex centres for Herschel-Bulkley fluids with different combinations of flow index _n_, Herschel Bulkley number _HB_ and modified Reynolds number _Re_ <sup>_∗_</sup> . The number next to each point is the corresponding _Re_ <sup>_∗_</sup> . means that we can compare the two and expect similar flow characteristics. However, we would only get identical results by using periodic boundary condition on the walls which are parallel to the flow vortices. Since we apply no-slip conditions, there will be threedimensional effects on the results, meaning that we can use them as separate reference results. The spatial domain is discretised using 256 cells in each directions, i.e. 16,777,216 cells in total. As before, the system is initially at rest. When steady-state is reached, we stop the motion of the lid and allow cessation to take place. Figure 10 illustrates how the yield surface evolves through time. Note that it is still computed as the contour _|_ _τ_ _|_ = _τ_ 0, but in 3D we can actually visualise it as a surface. The snapshot times in figure 10 are similar to those used in figure 6, but vary by small factors. Note also here the presence of numerical artefacts due to regularisation, demonstrated by connected stagnant and plug zones. Qualitatively, the resemblance with the 2D case is striking, as the flow clearly goes through the same steps to reach steady-state and cessation. Having said that, the third dimension allows a richer picture of the shape of the yield surface. Especially fascinating is the importance of the four vertical edges, which play a similar role as the 2D corners, 18 FIG. 9: Illustration of spatio-temporal adaptive mesh refinement for tracking the development of the yield surface, with _Re_ = 1000 and _Bi_ = 1. The coarsest grid discretises with cell spacing 1 _/_ 64, but the two refinement layers ensure that the effective resolution near the yield surface is 1 _/_ 256. (Multimedia view) and lead to the yield surface stretching out in four directions from the centre. It would not be possible to capture this type of yield surface shape without performing fully 3D fluid simulations. We emphasise that this is the first time fully three-dimensional yield surfaces have been presented for the lid-driven cavity case. Previously, the only 3D results are slices of rigid zones presented by Olshanskii <sup>63</sup> (finite differences, 262,144 cells), and the heatmap slices presented in the bi-viscosity simulations performed by Elias et al. <sup>64</sup>, (819,468 elements). In figure 11, steady-state yield surfaces are shown for various combinations of _Re_ and _Bi_ . Readers who are familiar with the two-dimensional test case (see e.g. Syrakos et al. <sup>20</sup> ) will recognise the similarity between those results and slices through these three-dimensional regions. Note that the slices are taken at a slight angle in the _xy_ -plane. These simulations illustrate the code’s ability to solve the governing PDEs for time-dependent three-dimensional flows of non-Newtonian fluids following the Herschel-Bulkley model. While the shapes of the three-dimensional yield surfaces shown in figures 10 and 11 pro 19 (a) _t_ <sup>ˆ</sup> = 1 _._ 0 _×_ 10 <sup>_−_</sup> <sup>6</sup> (b) _t_ <sup>ˆ</sup> = 1 _._ 00 _×_ 10 <sup>_−_</sup> <sup>5</sup> (c) _t_ <sup>ˆ</sup> = 6 _._ 82 _×_ 10 <sup>_−_</sup> <sup>5</sup> (d) _t_ <sup>ˆ</sup> = 8 _._ 438 _×_ 10 <sup>_−_</sup> <sup>4</sup> (e) _t_ <sup>ˆ</sup> = 1 _._ 4913 _×_ 10 <sup>_−_</sup> <sup>2</sup>, _t_ <sup>˜</sup> = 0 (f) _t_ <sup>˜</sup> = 3 _._ 97 _×_ 10 <sup>_−_</sup> <sup>5</sup> (g) _t_ <sup>˜</sup> = 4 _._ 847 _×_ 10 <sup>_−_</sup> <sup>4</sup> (h) _t_ <sup>˜</sup> = 7 _._ 706 _×_ 10 <sup>_−_</sup> <sup>4</sup> (i) _t_ <sup>˜</sup> = 1 _._ 0564 _×_ 10 <sup>_−_</sup> <sup>3</sup> FIG. 10: Three-dimensional time-evolution of the lid-driven cavity flow, with _Re_ = 1 and _Bi_ = 10. The system advances from an instantaneous start from rest to steady-state, before the lid motion ceases and the fluid stops. The lid moves in positive _x_ -direction. The shapes of three-dimensional plug regions of this sort have never been identified for the lid-driven cavity before. vide interesting insight about the three-dimensional effects, they do not provide quantitative comparisons for other codes for three-dimensional viscoplastic fluid flows. Consequently, we show the corresponding steady-state velocity profiles in figure 12. The first velocity component is considered on the line _x_ ˆ = 0 _._ 5, _y_ ˆ = 0 _._ 5, while the _x_ - and _z_ -directions are swapped for the third component. As is evident, there are notable similarities between the two-dimensional simulations, as expected. These profiles can act as benchmark results for future yield stress simulation codes. 20 (a) _Re_ = 1 _, Bi_ = 1 (b) _Re_ = 1 _, Bi_ = 10 (c) _Re_ = 1 _, Bi_ = 100 (d) _Re_ = 1000 _, Bi_ = 1 (e) _Re_ = 1000 _, Bi_ = 10 (f) _Re_ = 1000 _, Bi_ = 100 FIG. 11: Steady-state yield surface for Bingham fluids with various Reynolds and Bingham numbers in the three-dimensional lid-driven cavity. The lid moves in positive _x_ -direction. D. Parallel performance Among the most impressive attributes of codes built within the AMReX framework, is the intrinsic scalability on state-of-the-art computer architectures. Due to major advances within parallel computing in the last few decades, accurate measurement of how well-suited algorithms are for parallel processing has received a lot of attention. Moreland and Oldfield provide an excellent overview of contemporary formal metrics for such measurements <sup>65</sup> . Suppose we are trying to solve a computational problem of size _N_ . Then the speed-up of the parallel algorithm is given by the ratio of the parallel execution time to that of the best serial algorithm. The theoretically best possible speed-up occurs if the entire task can be divided into as many chunks of equal work as there are cores being used, so that it is distributed among the available cores without any overhead. In this utopian case, we have speed-up equal to the processor core count. Although speed-up is a useful metric for analysing the parallel performance of an algorithm, it has one caveat. Since the serial runtime is necessary in order to compute them, it quickly becomes impractical for analysis of large-scale applications. Computing the serial runtime for very large _N_ takes far too long. Scaling where the problem size is kept fixed, and the amount of allocated resources is increased, is known as strong scaling. On the other hand, the problem size can be scaled so that it is proportional to the core amount. If one core is used to solve the problem with size _N_ <sup>_∗_</sup>, one would then ideally expect the parallel runtime of a problem with size _PN_ <sup>_∗_</sup> to remain constant when deployed on _P_ cores. This type of analysis is called weak scaling. Finally, it may in some case be difficult to keep the problem size proportional to the job size, so that weak scaling analysis becomes difficult to obtain. However, one can measure the amount of work done per time, referred to as the rate. The rate is computed as the ratio of problem size to parallel runtime, and thus removes the weak scaling dependency _<u>Re</u>_ <u>= 1,</u> _<u>Bi</u>_ <u>= 1</u> _Re_ = 1, _Bi_ = 10 _Re_ = 1, _Bi_ = 100 _~~Re~~_ ~~= 1000,~~ _~~Bi~~_ ~~= 1~~ _Re_ = 1000, _Bi_ = 10 _Re_ = 1000, _Bi_ = 100 0 _._ 0 0 _._ 5 1 _._ 0 _u_ ˆ 21 0 _._ 0 0 _._ 2 0 _._ 4 0 _._ 6 0 _._ 8 1 _._ 0 _x_ ˆ _z_ ˆ 1 _._ 0 0 _._ 8 0 _._ 6 0 _._ 4 0 _._ 2 0 _._ 0 _w_ ˆ 0 _._ 2 0 _._ 1 0 _._ 0 _−_ 0 _._ 1 _−_ 0 _._ 2 _−_ 0 _._ 3 _−_ 0 _._ 4 FIG. 12: Velocity profiles in the centre of the three-dimensional cavity, provided as reference solutions for 3D viscoplastic solvers. The effect of Reynolds and Bingham numbers is clear. Note that the two cases with _Bi_ = 100 are indistinguishable. between problem size and core amount. Sampling the rate across a selection of problem sizes and core amounts can thus help the simulation runner pick runtime parameters which yield a high computational efficiency. Our main interest lies in ensuring that the scalability is unaffected by the extension to generalised Newtonian fluids. As such, we run a test-suite with varying problem sizes and processor cores for the 3D lid-driven cavity test when the domain is filled by a Bingham fluid with _Re_ = 1 and _Bi_ = 10. In order to avoid the problems associated with strong and weak scaling, we vary the number of cores and problem resolution, but only use few cores for smaller problems and many cores for larger ones. Subsequently, we compute the rate for the cell updates, which gives proper insight into the resulting computational efficiency. In order to evaluate the parallel performance rather than the effect of system state, we use a constant time step, advect the system by 100 time steps, and measure the average runtime per time step for the next ten. Figure 13 illustrates the results of average runtimes and rate for the scaling test. For a given problem size, the reduction in runtime (and increase in rate) is basically optimal until a core limit is reached. At this point, the MPI communication overhead becomes too large for further parallelisation, since the grid has already been broken down too far. However, as the problem gets bigger this core limit naturally increases, so that the computational rate can continue increasing as long as larger problems are solved. When simulating at a given problem resolution, it is therefore best to choose the lowest amount of cores which maximise the rate. Note that these tests do not utilise OpenMP tiling and have not been optimised in terms of runtime parameters for parallelisation (such as maximum size for subgrids), and still the scalability is excellent. VI. CONCLUSIONS The publicly available software suite IAMR facilitates rapid simulations of incompressible fluids governed by the Navier-Stokes equations in a structured, adaptive framework with state-of-the-art parallelisation on contemporary supercomputer architectures. By augmenting this code, originally designed for Newtonian flows, we allow it to deal with generalised Newtonian fluids using a regularised Herschel-Bulkley model. In doing so, we provide a 22 _N_ = 64 <sup>3</sup> _N_ = 128 <sup>3</sup> _N_ = 256 <sup>3</sup> _N_ = 512 <sup>3</sup> 10 <sup>0</sup> 10 <sup>1</sup> 10 <sup>2</sup> 10 <sup>3</sup> Cores 10 <sup>1</sup> 10 <sup>0</sup> 10 <sup>_−_</sup> <sup>1</sup> 40 30 20 10 0 10 <sup>0</sup> 10 <sup>1</sup> 10 <sup>2</sup> 10 <sup>3</sup> Cores FIG. 13: Strong scaling results for a Bingham-fluid in the lid-driven cavity. The left plot shows the reduction in runtime per time step as the amount of processor cores is increased, for various problem sizes. The right plot shows how the corresponding computation rate grows. Note that both axes are logarithmic in the left plot, while only the primary axis employs logarithmic scaling in the right one. code capable of simulating large-scale viscoplastic fluid systems efficiently enough to investigate three-dimensional, time-dependent systems. Thorough validation is performed through comparisons with results from peer-reviewed studies of the lid-driven cavity problem, and these benchmark results are expanded upon through a wider range of Reynolds and Bingham numbers. Finally, we have evaluated the ability of the code to deal with Herschel-Bulkley fluids, and investigated three-dimensional yield surfaces in the lid-driven cavity. For both Herschel-Bulkley fluids and Bingham fluids in three dimensions, reference results are provided for the first time. ACKNOWLEDGMENTS K. S. would like to acknowledge the EPSRC Centre for Doctoral Training in Computational Methods for Materials Science for funding under grant number EP/L015552/1. Additionally, he acknowledges the funding and technical support from BP through the BP International Centre for Advanced Materials (BP-ICAM) which made this research possible. 1S. S. Pegler and N. J. Balmforth, “Locomotion over a viscoplastic film,” Journal of Fluid Mechanics 727, 1–29 (2013). 2M. W. Denny, “A quantitative model for the adhesive locomotion of the terrestrial slug, ariolimax columbianus,” Journal of experimental Biology 91, 195–217 (1981). 3A. J. Apostolidis and A. N. Beris, “Modeling of the blood rheology in steady-state shear flows,” Journal of Rheology 58, 607–633 (2014). 4A. J. Apostolidis, M. J. Armstrong, and A. N. Beris, “Modeling of human blood rheology in transient shear flows,” Journal of Rheology 59, 275–298 (2015). 5A. J. Apostolidis and A. N. Beris, “The effect of cholesterol and triglycerides on the steady state shear rheology of blood,” Rheologica Acta 55, 497–509 (2016). 6A. J. Apostolidis, A. P. Moyer, and A. N. Beris, “Non-Newtonian effects in simulations of coronary arterial blood flow,” Journal of Non-Newtonian Fluid Mechanics 233, 155–165 (2016). 7S. Bittleston and D. Guillot, “Mud removal: research improves traditional cementing guidelines,” Oilfield Review 3, 44–54 (1991). 8S. Taghavi, K. Alba, M. Moyers-Gonzalez, and I. Frigaard, “Incomplete fluid–fluid displacement of yield stress fluids in near-horizontal pipes: experiments and theory,” Journal of Non-Newtonian Fluid Mechanics 167, 59–74 (2012). 23 9I. A. Frigaard, K. G. Paso, and P. R. de Souza Mendes, “Bingham’s model in the oil and gas industry,” Rheologica Acta 56, 259–282 (2017). 10P. Saramito and A. Wachs, “Progress in numerical simulation of yield stress fluid flows,” Rheologica Acta 56, 211–230 (2017). 11M. Bercovier and M. Engelman, “A finite-element method for incompressible non-Newtonian flows,” Journal of Computational Physics 36, 313–326 (1980). 12R. Tanner and J. Milthorpe, “Numerical simulation of the flow of fluids with yield stress,” in _Proceedings_ _of_ _Third_ _International_ _Conference_ _on_ _Numerical_ _Methods_ _in_ _Laminar_ _and_ _Turbulent_ _Flow_, edited by C. Taylor, C. Johnson, and I. Smith (Pineridge Press, Swansea, UK, 1983) pp. 680–690. 13A. Guha and S. Sengupta, “Analysis of von k´arm´ans swirling flow on a rotating disc in Bingham fluids,” Physics of Fluids 28, 013601 (2016). 14T. C. Papanastasiou, “Flows of materials with yield,” Journal of Rheology 31, 385–404 (1987). 15E. Mitsoulis and T. Zisis, “Flow of Bingham plastics in a lid-driven square cavity,” Journal of NonNewtonian Fluid Mechanics 101, 173–180 (2001). 16T. Zisis and E. Mitsoulis, “Viscoplastic flow around a cylinder kept between parallel plates,” Journal of Non-Newtonian Fluid Mechanics 105, 1–20 (2002). 17E. Mitsoulis, “On creeping drag flow of a viscoplastic fluid past a circular cylinder: wall effects,” Chemical Engineering Science 59, 789–800 (2004). 18E. Mitsoulis and J. Tsamopoulos, “Numerical simulations of complex yield-stress fluid flows,” Rheologica Acta 56, 231–258 (2017). 19A. Syrakos, G. C. Georgiou, and A. N. Alexandrou, “Solution of the square lid-driven cavity flow of a Bingham plastic using the finite volume method,” Journal of Non-Newtonian Fluid Mechanics 195, 19–31 (2013). 20A. Syrakos, G. C. Georgiou, and A. N. Alexandrou, “Performance of the finite volume method in solving regularised Bingham flows: Inertia effects in the lid-driven cavity flow,” Journal of Non-Newtonian Fluid Mechanics 208, 88–107 (2014). 21A. Syrakos, G. C. Georgiou, and A. N. Alexandrou, “Cessation of the lid-driven cavity flow of Newtonian and Bingham fluids,” Rheologica Acta 55, 51–66 (2016). 22M. Fortin and R. Glowinski, “Chapter III: On decomposition-coordination methods using an augmented Lagrangian,” in _Augmented_ _Lagrangian_ _Methods:_ _Applications_ _to_ _the_ _Numerical_ _Solution_ _of_ _Boundary-_ _Value_ _Problems_, Studies in Mathematics and Its Applications, Vol. 15, edited by M. Fortin and R. Glowinski (Elsevier, 1983) pp. 97 - 146. 23G. Duvaut and J. L. Lions, _Inequalities_ _in_ _Mechanics_ _and_ _Physics_ (Springer, 1976). 24M. R. Hestenes, “Multiplier and gradient methods,” Journal of Optimization Theory and Applications 4, 303–320 (1969). 25P. Saramito and N. Roquet, “An adaptive finite element method for viscoplastic fluid flows in pipes,” Computer Methods in Applied Mechanics and Engineering 190, 5391–5412 (2001). 26D. Vola, L. Boscardin, and J. Latch´e, “Laminar unsteady flows of Bingham fluids: a numerical strategy and some benchmark results,” Journal of Computational Physics 187, 441–456 (2003). 27T. Treskatis, M. A. Moyers-Gonzalez, and C. J. Price, “An accelerated dual proximal gradient method for applications in viscoplasticity,” Journal of Non-Newtonian Fluid Mechanics 238, 115–130 (2016). 28P. Saramito, “A damped Newton algorithm for computing viscoplastic fluid flows,” Journal of NonNewtonian Fluid Mechanics 238, 6–15 (2016). 29J. Bleyer, “Advances in the simulation of viscoplastic fluid flows using interior-point methods,” Computer Methods in Applied Mechanics and Engineering 330, 368–394 (2018). 30Y. Dimakopoulos, G. Makrigiorgos, G. Georgiou, and J. Tsamopoulos, “The PAL (Penalized Augmented Lagrangian) method for computing viscoplastic flows: a new fast converging scheme,” Journal of NonNewtonian Fluid Mechanics (2018). 31S. Enayatpour and E. van Oort, “Advanced modeling of cement displacement complexities,” in _SPE/IADC_ _Drilling_ _Conference_ _and_ _Exhibition_ (Society of Petroleum Engineers, 2017). 32P. Tardy, N. Flamant, E. Lac, A. Parry, C. Sutama, S. Almagro, _et_ _al._, “New generation 3D simulator predicts realistic mud displacement in highly deviated and horizontal wells,” in _SPE/IADC_ _Drilling_ _Conference_ _and_ _Exhibition_ (Society of Petroleum Engineers, 2017). 33M. Alnæs, J. Blechta, J. Hake, A. Johansson, B. Kehlet, A. Logg, C. Richardson, J. Ring, M. E. Rognes, and G. N. Wells, “The FEniCS project version 1.5,” Archive of Numerical Software 3, 9–23 (2015). 34H. Jasak, A. Jemcov, Z. Tukovic, _et_ _al._, “OpenFOAM: A C++ library for complex physics simulations,” in _International_ _workshop_ _on_ _coupled_ _methods_ _in_ _numerical_ _dynamics_, Vol. 1000 (IUC Dubrovnik, Croatia, 2007) pp. 1–20. 35A. Almgren, J. Bell, P. Colella, L. Howell, and M. Welcome, “A conservative adaptive projection method for the variable density incompressible Navier–Stokes equations,” Journal of Computational Physics 142, 1–46 (1998). 36H. A. Barnes, “The yield stress - a review or _παντα_ _ρει_ - everything flows?” Journal of Non-Newtonian Fluid Mechanics 81, 133–178 (1999). 37N. J. Balmforth, I. A. Frigaard, and G. Ovarlez, “Yielding to stress: recent developments in viscoplastic fluid mechanics,” Annual Review of Fluid Mechanics 46, 121–146 (2014). 38E. C. Bingham, “An investigation of the laws of plastic flow,” Bulletin of the Bureau of Standards 13, 309–353 (1916). 24 39J. Oldroyd, “A rational formulation of the equations of plastic flow for a Bingham solid,” in _Mathematical_ _Proceedings_ _of_ _the_ _Cambridge_ _Philosophical_ _Society_, Vol. 43 (Cambridge University Press, 1947) pp. 100– 105. 40W. H. Herschel and R. Bulkley, “Konsistenzmessungen von Gummi-benzoll¨osungen,” Colloid & Polymer Science 39, 291–300 (1926). 41R. B. Pember, L. H. Howell, J. B. Bell, P. Colella, W. Y. Crutchfield, W. Fiveland, and J. Jessee, “An adaptive projection method for unsteady, low-mach number combustion,” Combustion Science and Technology 140, 123–168 (1998). 42M. S. Day and J. B. Bell, “Numerical simulation of laminar reacting flows with complex chemistry,” Combustion Theory and Modelling 4, 535–556 (2000). 43M. Lai, J. Bell, and P. Colella, “A projection method for combustion in the zero Mach number limit,” in _11th_ _Computational_ _Fluid_ _Dynamics_ _Conference_ (1993) p. 3369. 44A. S. Almgren, J. B. Bell, and W. G. Szymczak, “A numerical method for the incompressible NavierStokes equations based on an approximate projection,” SIAM Journal on Scientific Computing 17, 358– 369 (1996). 45D. F. Martin and P. Colella, “A cell-centered adaptive projection method for the incompressible Euler equations,” Journal of Computational Physics 163, 271–312 (2000). 46P. Colella, “A direct Eulerian MUSCL scheme for gas dynamics,” SIAM Journal on Scientific and Statistical Computing 6, 104–117 (1985). 47IAMR is designed for more general flows with variable density; however for the flows considered in this paper the density is constant in space and time. 48S. Mirzaagha, R. Pasquino, E. Iuliano, G. DAvino, F. Zonfrilli, V. Guida, and N. Grizzuti, “The rising motion of spheres in structured fluids with yield stress,” Physics of Fluids 29, 093101 (2017). 49A. Almgren, V. Beckner, J. Bell, M. Day, L. Howell, C. Joggerst, M. Lijewski, A. Nonaka, M. Singer, and M. Zingale, “CASTRO: A new compressible astrophysical solver. I. Hydrodynamics and self-gravity,” The Astrophysical Journal 715, 1221 (2010). 50A. S. Almgren, J. B. Bell, M. J. Lijewski, Z. Luki´c, and E. Van Andel, “Nyx: A massively parallel AMR code for computational cosmology,” The Astrophysical Journal 765, 39 (2013). 51A. Dubey, A. Almgren, J. Bell, M. Berzins, S. Brandt, G. Bryan, P. Colella, D. Graves, M. Lijewski, F. L¨offler, B. O’Shea, E. Schnetter, B. Van Straalen, and K. Weide, “A survey of high level frameworks in block-structured adaptive mesh refinement packages,” Journal of Parallel and Distributed Computing 74, 3217–3227 (2014). 52S. Habib, A. Pope, H. Finkel, N. Frontiere, K. Heitmann, D. Daniel, P. Fasel, V. Morozov, G. Zagaris, T. Peterka, V. Vishwanath, Z. Luki´c, S. Sehrish, and W.-k. Liao, “HACC: Simulating sky surveys on state-of-the-art supercomputing architectures,” New Astronomy 42, 49–65 (2016). 53B. C. Bell and K. S. Surana, “ _p_ -version least squares finite element formulation for two-dimensional, incompressible, non-Newtonian isothermal and non-isothermal fluid flow,” International Journal for Numerical Methods in Fluids 18, 127–162 (1994). 54P. Neofytou, “A 3rd order upwind finite volume method for generalised Newtonian fluid flows,” Advances in Engineering Software 36, 664–680 (2005). 55U. Ghia, K. N. Ghia, and C. Shin, “High-Re solutions for incompressible flow using the Navier-Stokes equations and a multigrid method,” Journal of Computational Physics 48, 387–411 (1982). 56Z. Chai, B. Shi, Z. Guo, and F. Rong, “Multiple-relaxation-time lattice Boltzmann model for generalized Newtonian fluid flows,” Journal of Non-Newtonian Fluid Mechanics 166, 332–342 (2011). 57P. R. de Souza Mendes, “Dimensionless non-Newtonian fluid mechanics,” Journal of Non-Newtonian Fluid Mechanics 147, 109–116 (2007). 58R. L. Thompson and E. J. Soares, “Viscoplastic dimensionless numbers,” Journal of Non-Newtonian Fluid Mechanics 238, 57–64 (2016). 59E. J. Dean, R. Glowinski, and G. Guidoboni, “On the numerical simulation of Bingham visco-plastic flow: old and new results,” Journal of Non-Newtonian Fluid Mechanics 142, 36–62 (2007). 60L. Muravleva, “Uzawa-like methods for numerical modeling of unsteady viscoplastic Bingham medium flows,” Applied Numerical Mathematics 93, 140–149 (2015). 61This simple method for determining the yield surface can be improved upon for regularised constitutive equations, see e.g. the work of Liu, Muller and Denn <sup>66</sup> . 62Y. Dimakopoulos and J. Tsamopoulos, “Transient displacement of a viscoplastic material by air in straight and suddenly constricted tubes,” Journal of Non-Newtonian Fluid Mechanics 112, 43–75 (2003). 63M. A. Olshanskii, “Analysis of semi-staggered finite-difference method with application to Bingham flows,” Computer Methods in Applied Mechanics and Engineering 198, 975–985 (2009). 64R. N. Elias, M. A. Martins, and A. L. Coutinho, “Parallel edge-based solution of viscoplastic flows with the SUPG/PSPG formulation,” Computational Mechanics 38, 365–381 (2006). 65K. Moreland and R. Oldfield, “Formal metrics for large-scale parallel performance,” in _International_ _Conference_ _on_ _High_ _Performance_ _Computing_ (Springer, 2015) pp. 488–496. 66B. T. Liu, S. J. Muller, and M. M. Denn, “Interactions of two rigid spheres translating collinearly in creeping flow in a Bingham material,” Journal of Non-Newtonian Fluid Mechanics 113, 49–67 (2003).

섹션 본문

섹션 본문이 없습니다.

참고문헌

참고문헌 정보가 없습니다.