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

A multi-scale method for complex flows of non-Newtonian fluids

간접 관련 엔지니어링 플라스틱 · (23) 컴파운드 (21) 에폭시수지(20) 페놀수지

기본 정보

저자
  1. Francesca Tedeschi — Department of Mathematics "Tullio Levi-Civita", University of Padua, via Trieste 63, 35131, Padova, Italy
  2. Giulio G. Giusteri — Department of Mathematics "Tullio Levi-Civita", University of Padua, via Trieste 63, 35131, Padova, Italy
  3. Leonid Yelash — Institute of Mathematics, Johannes Gutenberg University of Mainz, Staudingerweg 9, 55128, Mainz, Germany
  4. Mária Lukáčová–Medvid’ová — Department of Mathematics|||Institute of Mathematics, Johannes Gutenberg University of Mainz, Staudingerweg 9, 55128, Mainz, Germany
DOI
10.3934/mine.2022050
저널
Padua Research Archive (University of Padova)
발행년도
2021
발행기관
University of Padua
피인용수
7
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
http://hdl.handle.net/11577/3439033
토픽
Composite Material Mechanics
OpenAlex ID
W3217747118

평가 내용

관련도
간접 관련
사업분야
엔지니어링 플라스틱 · (23) 컴파운드
부 분야
(21) 에폭시수지, (20) 페놀수지
R&D 측면
분석·모델링
확신도
0.80
근거 용어
non-Newtonian fluids, polymeric fluids, rheology, multi-scale method, viscosity
판단 근거
이 논문은 고분자 유체(polymeric fluids)의 비뉴턴 유체 역학적 거동을 시뮬레이션하기 위한 멀티스케일 모델링 기법을 다룹니다. 이는 코오롱인더스트리의 엔지니어링 플라스틱(23)이나 화학 수지(20, 21) 제조 공정 중 용융 수지의 흐름(flow) 및 유변학적 특성을 분석하고 공정을 최적화하는 데 간접적으로 활용될 수 있습니다.
R&D 활용 포인트
고분자 컴파운드나 수지 제조 시 압출(extrusion) 및 성형 공정에서 발생하는 복잡한 유체 흐름을 예측하고, 점도 및 탄성 특성을 시뮬레이션하여 공정 설계 및 품질 제어에 활용 가능함.
평가 입력
본문 62,435자 중 30,032자 발췌

초록

We introduce a new heterogeneous multi-scale method for the simulation of flows of non-Newtonian fluids in general geometries and present its application to paradigmatic two-dimensional flows of polymeric fluids. Our method combines micro-scale data from non-equilibrium molecular dynamics (NEMD) with macro-scale continuum equations to achieve a data-driven prediction of complex flows. At the continuum level, the method is model-free, since the Cauchy stress tensor is determined locally in space and time from NEMD data. The modelling effort is thus limited to the identification of suitable interaction potentials at the micro-scale. Compared to previous proposals, our approach takes into account the fact that the material response can depend strongly on the local flow type and we show that this is a necessary feature to correctly capture the macroscopic dynamics. In particular, we highlight the importance of extensional rheology in simulating generic flows of polymeric fluids.

본문 62,435자

본문 펼치기
## A multi-scale method for complex flows of non-Newtonian fluids Francesca Tedeschi <sup>1</sup>, Giulio G. Giusteri <sup>1*</sup>, Leonid Yelash <sup>2</sup>, M´aria Luk´aˇcov´a-Medvid’ov´a <sup>2</sup> 1 _Department of Mathematics “Tullio Levi-Civita”, University of Padua, via Trieste 63, 35131, Padova, Italy_ 2 _Institute of Mathematics, Johannes Gutenberg University of Mainz, Staudingerweg 9, 55128, Mainz, Germany_ Abstract We introduce a new heterogeneous multi-scale method for the simulation of flows of non-Newtonian fluids in general geometries and present its application to paradigmatic two-dimensional flows of polymeric fluids. Our method combines micro-scale data from non-equilibrium molecular dynamics (NEMD) with macro-scale continuum equations to achieve a data-driven prediction of complex flows. At the continuum level, the method is model-free, since the Cauchy stress tensor is determined locally in space and time from NEMD data. The modelling effort is thus limited to the identification of suitable interaction potentials at the micro-scale. Compared to previous proposals, our approach takes into account the fact that the material response can depend strongly on the local flow type and we show that this is a necessary feature to correctly capture the macroscopic dynamics. In particular, we highlight the importance of extensional rheology in simulating generic flows of polymeric fluids. ### 1 Introduction Modelling and computational simulation of non-Newtonian fluids is a challenging problem, since these fluids exhibit complex effects, such as shear thinning or thickening, viscoelasticity or flow-induced phase separation. A detailed analysis of the rheology of complex fluids can be obtained by particle-based simulations. Clearly, such micro-scale description is accurate but computationally very expensive and cannot be applied to engineering-scale problems. Consequently, new mathematical algorithms and hybrid multi-scale approaches have been proposed in recent years. In the literature, we can find several hybrid models combining particle dynamics with a macroscopic continuum model, such as the heterogeneous multi-scale methods [7, 10, 9, 12, 16, 34], the triple-decker atomistic-mesoscopic-continuum method [14, 15], the seamless multi-scale methods [8, 11, 13], the equationfree multi-scale methods [22, 21, 20] or the internal-flow multi-scale method [1, 2]. In [28] software requirements and design principles are presented and illustrated for a prototype coupling between molecular dynamics and Lattice Boltzmann methods. Note that, in general, hybrid multi-scale approaches are successful when processes occurring on a small scale are only loosely coupled with the large-scale behavior, that is, in the presence of an effective scale separation. In keeping with this, our method is applicable when the local flow conditions experienced by a fluid element change on a much larger timescale than the microscopic relaxation time necessary to achieve a statistically steady state of the molecular conformation and interactions. The aim of this paper is to illustrate a new heterogeneous multi-scale method for the simulation of flows of complex fluids in generic geometries and different conditions of motion. We extend and generalize the idea presented in [32], where a heterogeneous multi-scale method is developed for polymeric solutions subjected to simple shear flows. Simple shear is very well investigated for it is more easily realized in experiments than other flows. It provides fundamental information that is often sufficient to characterize *giulio.giusteri@math.unipd.it 1 simple fluids. However, complex fluids show a molecular structure that is able to change with respect to different conditions of motion, geometries, but also time scales and deformation rates. Therefore, to retrieve important rheological information about the stress response of such fluids, their behavior is studied under conditions of flow different from steady simple shear, for example extensional motions, startup flows and oscillating shear [27]. Moreover, it is also fundamental, for these types of materials, to consider flows in complex geometries that contain holes, barriers, contractions or other irregular features, because in close proximity of these structures the fluid is subject to local motions that are not equivalent to simple shear and can manifest some unexpected behavior. We focus our efforts on the development of a method to link the micro-scale rheological information, available from simulations in different local flow types, to macro-scale flows in complex geometries. The main aim of this work is to show that it is necessary to correctly take into account the local flow type, which plays an important role in modifying the stress response in non-viscometric flows of non-Newtonian fluids featuring a flow-type dependent rheology, such as polymeric fluids. While simulations based on constitutive assumptions do take into account, by construction, the possible flow type dependence incorporated at the level of constitutive laws, multi-scale methods for fluid mechanics application has so far considered simple shear flows as the only source of information for the micro-to-macro coupling. With our approach, we overcome this severe limitation. The method is applied to planar flows, but it can be extended to more general three-dimensional flows. The most challenging task for such an extension will be to implement MD simulations under arbitrary local flow conditions. The paper is organized in the following way. Section 2 discusses the essential question that arises in building a heterogeneous multi-scale method. Namely, how micro- and macroscopic models are linked together. Section 3 is devoted to the description of micro-scale simulations with an emphasis on the decomposition of the average stress tensor and the reconstruction of data-driven material functions. For the macroscopic simulation of incompressible flows we use, as described in Section 4, a numerical method based on a semi-implicit time evolution scheme and mixed P2-P0 finite elements for the approximation of the velocity-pressure pair under the incompressibility constraint. Results of numerical simulations obtained by our heterogeneous multi-scale method in different geometries are presented in Section 5. The paper is closed by Section 6 with an outlook on future research. ### 2 Link between micro-scale data and macro-scale simulations At the heart of our proposal there is the understanding that the local kinematics of a generic planar flow must be identified by _at_ _least_ two parameters, one measuring the speed of the deformation and the other measuring the local flow type (see [25, Chapter 1.4] for a discussion of this point). We introduce the symmetrized gradient D ≡ <sup><u>1</u></sup> 2 <sup>(∇</sup> <sup>_u_</sup> <sup>+ ∇</sup> <sup>_u_</sup> <sup>T) of the velocity field</sup> <sup>_u_</sup> <sup>and, for the case of planar flows in which</sup> <sup>_e_</sup> <sup>3</sup> is normal to the flow plane, we can define the kinematic parameters |ε˙| ≡ ~~�~~ <u>tr</u> <u>D</u> <sup>2</sup> <u>1</u> and β3 ≡ 2 2|ε˙| <sup>∇×</sup> <sup>_u_</sup> <sup>·</sup> <sup>_e_</sup> <sup>3.</sup> While there is ample agreement about measuring the deformation rate in generic situations by means of ε˙, different choices can be made for the flow-type parameter, depending on the type of material response that we envision (see [18], Sec. III). Here we choose β3 for its simplicity and we stress that, to make it a frame-indifferent parameter, we consider it as measured relative to the vanishing spin of a fixed inertial frame of reference. In other contexts, different choices may be appropriate (such as the relative rotation rate proposed by Schunk and Scriven [31]), but the structure of the scheme that we are going to present remains the same. The local kinematic parameters ε˙ and β3 are the macro-scale input of micro-scale simulations that will in turn give an ensemble-averaged stress tensor σ. To be able to use the micro-scale information encoded in σ we must express it in a form that is independent of the coordinates, because coordinates that are chosen for computational convenience cannot always be coherent when we pass from the micro- to the macro-scale simulation. We can achieve this independence by decomposing the stress on an orthogonal tensorial basis built upon D (see [18] for details and significance of this decomposition). For the case of 2 planar incompressible flows, we have where I is the identity tensor and σ = − _p_ I + 2η D + 2λ3 G 3, (1) G 3 = <sup><u>1</u></sup> 2 <sup>(</sup> <sup>AD</sup> <sup>−</sup> <sup>DA</sup> <sup>)</sup> with A = �0 −1� . (2) 1 0 The coefficients of the linear decomposition (1) represent a pressure, a generalized viscosity and a reorientation factor related to normal stress differences and can be retrieved from the computational data in any coordinates by computing _p_ = − <sup><u>σ</u></sup> ∥ I <sup><u>:</u></sup> ∥ <sup>2</sup> <sup><u>I</u></sup> <sup><u>1</u></sup> 3 <sup>tr</sup> <sup>(σ),</sup> η = <sup><u>1</u></sup> 2 <sup><u>1</u></sup> <u>σ :</u> <u>G</u> <u>3</u> 2 ∥ G 3∥ <sup>2</sup> <sup><u>σ</u></sup> ∥ I <sup><u>:</u></sup> ∥ <sup>2</sup> <sup><u>I</u></sup> <sup>= −</sup> <sup><u>1</u></sup> 3 <sup><u>1</u></sup> <u>σ :</u> <u>D</u> 2 ∥ D ∥ <sup>2</sup> ∥ G 3∥ <sup>2</sup> <sup>.</sup> (3) <u>σ :</u> <u>D</u> λ3 = <sup><u>1</u></sup> ∥ D ∥ <sup>2</sup> <sup>,</sup> 2 Here the double scalar product and the tensorial norm are defined by C : B ≡ tr ( C <sup>T</sup> B ) and ∥ B ∥≡ ~~√~~ B : B . For the sake of clarity, we indicate with η˜ and λ <sup>˜</sup> 3 the two material functions of the kinematic parameters (˙ε, β3), reconstructed by sampling the two-dimensional parameter space. In this way, we obtain from computational rheological measurements the constitutive expression σ = − _p_ I + 2˜η(˙ε, β3) D + λ <sup>˜</sup> 3(˙ε, β3) G 3 (4) for the stress tensor, that can be used in performing the macro-scale continuum simulations. There is no need to define a pressure function because it is determined, at the macro-scale, as the Lagrange multiplier of the incompressibility constraint. ### 3 Micro-scale simulation The NEMD simulation at the micro-scale is performed using LAMMPS [30, lammps.sandia.gov]. We consider both monomeric and polymeric aggregates in a three-dimensional computational domain with periodic boundary conditions and undergoing two different planar flows: simple shear and extensional flow. The average velocity field is imposed by suitably deforming the computational box and the canonical ensemble statistics of the velocity fluctuations is achieved via the classical Nos´e–Hoover thermostat [17]. For the case of simple shear we use the LAMMPS command `fix` `deform` in conjunction with the SLLOD algorithm [5], while the extensional flow is treated by means of the UEF package [29]. The latter implements boundary conditions developed by Dobson [6] and Hunt [19], that are an extension of the boundary conditions of Kraynik and Reinelt [23]. We will discuss results for monomers, _N_ pol = 1, and polymers, _N_ pol = 20, where _N_ pol is the number of monomers per molecule. 3.1 Interaction potentials We model polymers as bead-spring systems with two types of interaction potential. The first one is active between each pair of monomers and is the Weeks-Chandler-Andersen (WCA) potential, the repulsive part of <u>a</u> Lennard-Jones potential with minimum energy −ϵ when the centers of the beads are at distance _r_ = <sup>√</sup> 6 of <u>a</u> <sup>√</sup> 6 2σ: <sup>√</sup> 6 2σ �� <u>σ</u> 4ϵ _r_ 0 otherwise. - <u>σ</u> �6� + ϵ if _r_ < _r_ ϕWCA( _r_ ) ≡  �12 The second one, only active between successive monomers in a polymeric chain, is the Finitely Extensible Nonlinear Elastic (FENE) potential - _<u>r</u>_ _R_ 0 �2 <sup></sup> , ϕFENE( _r_ ) ≡−0.5 _KR_ <sup>2</sup> 0 <sup>ln</sup> ϕFENE( _r_ ) ≡−0.5 _KR_ <sup>2</sup> 0 1 − with _K_ the elastic constant and _R_ 0 the maximum extent of the bonds. 3 Figure 1: _The_ _monomeric_ _fluid_ _displays_ _almost_ _no_ _rate_ _dependence_ _and_ _very_ _little_ _flow-type_ _dependence_ _of the stress coe_ ffi _cients, while the polymeric fluid features rate dependence and a strong flow-type depen-_ _dence._ We compare the NEMD data for the stress coefficients η (top) and λ3 (bottom) against ε˙ obtained for the monomeric case with _N_ pol = 1 (left) and the polymeric case _N_ pol = 20 (right) under simple shear (circles and black dashed curves) and planar extension (diamonds and red solid curves). In the latter case, λ3 fluctuates around zero, that is the expected value based on symmetry considerations. The presence of a strong flow-type dependence for the polymeric fluid is a key feature, originated by the different conformations of the long molecules. Fitting curves are obtained as described in the text. 4 Figure 2: _The presence of a strong flow-type dependence for the polymeric fluid is a key feature, originated_ _by the di_ ff _erent conformations of the long molecules._ The probability distribution of radius _Rg_ of gyration (divided by the effective monomer radius) and asphericity α for the polymeric chains under simple shear and extensional flow is reported for different values of ε˙. The black bars indicate equal values for an easier comparison between the results under simple shear and planar extension. The curves are generated considering conformational data of five chains over 20,000 time steps of steady-state NEMD. 3.2 Average stress coe ffi cients We considered values of the deformation rate ε˙ ranging from 0.001 s <sup>−1</sup> to 1 s <sup>−1</sup> . For each value of ε˙ we performed 21 simulations with different initial configurations of the particles. At each time, the average stress given as output by LAMMPS is projected onto the basis tensors through the formulae (3) and these projections are averaged over time. Finally, a mean over all initial configurations is taken. Figure 1 presents the data obtained for the generalized viscosity η and the reorientation factor λ3. By fitting those data with Carreau and power functions we obtain, for the monomeric case with _N_ pol = 1, the curves λ3,ext(˙ε) = 0, ηext(˙ε) = 1.7/ <sup>�</sup> 1 + (0.108 ˙ε) <sup>1.05�2.276</sup>, <u>1.806</u> <u>1.7 −</u> <u>1.806</u> λ3,sh(˙ε) = 0.0706 ˙ε <sup>1.2</sup>, ηsh(˙ε) = <u>�1 + (1.6 ˙ε)1.65�0.191</u> <sup>+</sup> <u>�1 + (0.3 ˙ε)0.53�22</u> <sup>.</sup> For the polymeric case with _N_ pol = 20, the Gaussian Process Regression method (see Appendix A) was used to obtain the fitting curves. By comparing the results obtained under simple shear and planar extension for _N_ pol = 1 and _N_ pol = 20, we find that the former fluid displays almost no rate dependence and very little flow-type dependence of the stress coefficients, while the latter features rate dependence and a strong flow-type dependence (Figure 1). The statistics of interaction between monomers in the two types of flow does not differ significantly, leading to a quasi-Newtonian rheology. On the contrary, the fact that polymer chains are kept in an elongated state by extensional flows, while they tend to tumble and keep a spherical shape in simple shear, generates a richer phenomenology. In fact, the shear-thinning trend displayed in simple shear is qualitatively similar to that of monomeric fluids, while we find an opposite trend—a shear-thickening behavior—in extensional flows at small deformation rates, followed by a non-monotonic behavior of the viscosity. The elastic effects generated by the bonds are crucial in this case and give rise, in simple shear, to the normal stress differences associated with the coefficient λ3, also featuring a non-monotonic curve. The direct connection between the statistics of chain conformation in the polymeric case and the observed rheology can be evinced from the probability distribution, presented in Figure 2, of the normalized radius of gyration _Rg_ and asphericity α defined as follows. Let the components of the 3 × 3 gyration tensor 5 be R µν ≡ <sup><u>1</u></sup> _M_ 20 _i_ =1 _mi_ ( _r_ _i_ - _r_ cm)µ( _r_ _i_ - _r_ cm)ν, with _mi_ the mass of the _i_ -th monomer, _r_ _i_ its position, _M_ = <sup>�</sup> _i_ <sup>_m_</sup> _i_ <sup>, and</sup> <sup>_r_</sup> cm <sup>the center of mass of the polymeric</sup> chain. With _R_ 0 the effective monomer radius, we set <u>1</u> <sup>2</sup> _g_ <sup>≡</sup> _R_ <sup>2</sup> 0 _mi_ | _r_ _i_ - _r_ cm| <sup>2</sup> = <sup><u>tr</u></sup> <sup><u>R</u></sup> _R_ <sup>2</sup> _g_ <sup>2</sup> 0 <sup>_M_</sup> _i_ _R_ <sup>2</sup> 0 . <sup>2</sup> 0 Moreover, the asphericity is given by α ≡ <sup><u>1</u></sup> _R_ <sup>2</sup> 0 0 - _a_ 3 − <sup><u>1</u></sup>, 2 <sup>(</sup> <sup>_a_</sup> <sup>1 +</sup> <sup>_a_</sup> <sup>2)</sup> where _a_ 1 ≤ _a_ 2 ≤ _a_ 3 are the eigenvalues of the gyration tensor R . At low deformation rate, the distributions obtained in simple shear and extensional flows are almost identical (blue curves in Figure 2) because the chains are equally and mildly stretched by the imposed flow. As ε˙ grows larger, the extensional flow distributions feature a single peak that is progressively shifted rightward, toward more stretched configurations. On the other hand, in simple shear we notice a broadening of the distribution eventually leading to a doubly peaked shape (red curves in Figure 2). This indicates that chains spend roughly half of the time in a stretched configuration while frequently going back to a coiled configuration. In this very different microscopic behavior we find the origin of the strong flow-type dependence of the viscosity at larger ε˙. 3.3 Data-driven material functions Ideally, we would like to perform micro-scale simulations with many values of ε˙ and β3, since flows in generic geometries can easily feature variations of the flow type with β3 ranging from minus to plus infinity and values of ε˙ that cover many orders of magnitude. The implementation of simulation algorithms for mixed flows different from simple shear and planar extension is a nontrivial task that will be addressed in future works, but we still need, for our macro-scale simulations, a suitable definition of material functions that covers the whole range of kinematic parameters. We thus apply simple extrapolation strategies to build material functions out of the available computational data. Specifically, we extend the fitted curves ηsh(˙ε), ηext(˙ε), λ3,sh(˙ε) and λ3,ext(˙ε) out of their natural domains by taking constant values. Then we set η˜(˙ε, β3) ≡  (1 −|β3|)ηext(˙ε) + |β3|ηsh(˙ε), β3 ∈ [−1, 1] (5) ηsh(˙ε), |β3| > 1 that is an even function of β3 with ηext(˙ε) = η˜(˙ε, 0) and ηsh(˙ε) = η˜(˙ε, 1), and  λ˜ 3(˙ε, β3) ≡ β3λ3,sh(˙ε), β3 ∈ [−1, 1] (6) ± λ3,sh(˙ε), β3 ≷ ±1 that is an odd function of β3 and such that λ3,ext(˙ε) = λ <sup>˜</sup> 3(˙ε, 0) ≈ 0 and λ3,sh(˙ε) = λ <sup>˜</sup> 3(˙ε, 1). These operations in combination with (4) allow us to build a complete set of data for the stress tensor as a function of ε˙ and β3. ### 4 Macro-scale simulation We consider the flow of an incompressible fluid with constant density ρ and velocity vector _u_ . From the macroscopic point of view the continuum description leads to the conservation of mass and the balance of 6 linear momentum. In the incompressible case, they translate into the following partial differential equations on the domain Ω: ∇· _u_ = 0, (7) ρ - <u>∂</u> _<u>u</u>_ ∂ _t_ <sup>+ (</sup> <sup>_u_</sup> <sup>· ∇)</sup> <sup>_u_</sup> = ∇· σ( _u_, _p_ ). (8) Here σ denotes the Cauchy stress tensor and _p_ the pressure field. Equation (7) expresses the incompressibility constraint. We partition the boundary of the domain as disjoint union of inlet Γin, outlet Γout, and solid walls Γw, so that ∂Ω= Γin ∪ Γout ∪ Γw. As usual, _n_ is the outward unit normal to ∂Ω. A weak formulation of the problem is retrieved by multiplying equation (8) by a test function _v_ ∈ _H_ Γ <sup>1</sup> w <sup>(Ω)</sup> <sup>=</sup> <sup>�</sup> <sup>_f_</sup> <sup>∈</sup> <sup>_H_</sup> <sup>1(Ω)</sup> <sup>:</sup> <sup>_f_</sup> <sup>|Γw</sup> <sup>=</sup> <sup>0</sup> <sup>�</sup> <sup>and</sup> <sup>integrating</sup> <sup>over</sup> <sup>Ω.</sup> <sup>By</sup> <sup>applying</sup> <sup>Green’s</sup> <sup>formula,</sup> <sup>we</sup> <sup>obtain</sup> <sup>the</sup> _H_ Γ <sup>1</sup> w <sup>(Ω)</sup> <sup>=</sup> <sup>�</sup> <sup>_f_</sup> <sup>∈</sup> <sup>_H_</sup> <sup>1(Ω)</sup> <sup>:</sup> <sup>_f_</sup> <sup>|Γw</sup> <sup>=</sup> <sup>0</sup> <sup>�</sup> <sup>and</sup> <sup>integrating</sup> <sup>over</sup> <sup>Ω.</sup> <sup>By</sup> <sup>applying</sup> <sup>Green’s</sup> <sup>formula,</sup> <sup>we</sup> <sup>obtain</sup> <sup>the</sup> integral equation - - - ρ <sup><u>∂</u></sup> <sup>_<u>u</u>_</sup> ∂ _t_ Ω ρ( _u_ - ∇) _u_ - _v_ = σ _n_ - _v_ σ : ∇ _v_ . (9) Ω <sup>_<u>u</u>_</sup> ∂ _t_ <sup>·</sup> <sup>_v_</sup> <sup>+</sup> ∂Ω Ω 0 <sup>2(Ω) = �</sup> <sup>_g_</sup> <sup>∈</sup> <sup>_L_</sup> <sup>2(Ω) :</sup> Moreover, (7) can be multiplied by a scalar test function _q_ ∈ _L_ 0 <sup>2</sup> Moreover, (7) can be multiplied by a scalar test function _q_ ∈ _L_ 0 <sup>2(Ω) = �</sup> <sup>_g_</sup> <sup>∈</sup> <sup>_L_</sup> <sup>2(Ω) :</sup> �Ω <sup>_g_</sup> <sup>= 0�</sup> <sup>and integrated</sup> over Ω to give _q_ ∇· _u_ = 0. (10) Ω We decompose the Cauchy stress tensor in spherical and deviatoric parts by introducing the traceless extra stress τ such that σ = −( _p_ + _p_ ¯) I + τ, where _p_ ¯ ∈ _L_ 0 <sup>2(Ω)</sup> <sup>is</sup> <sup>a</sup> <sup>given</sup> <sup>pressure</sup> <sup>field</sup> <sup>used</sup> <sup>to</sup> <sup>impose</sup> <sup>a</sup> chosen pressure gradient from inlet to outlet. On top of the Dirichlet boundary conditions for _u_ on Γw we assume a form of periodicity for _u_ and _p_, requiring that they take the same values on Γin and Γout. Thanks to the independence of the test functions _v_ and _q_, we can take the sum of (9) and (10) and substitute the expression for σ to obtain the complete weak formulation of the problem: _Find_ _u_ ∈ _L_ <sup>2</sup> (R <sup>+</sup> ; _H_ Γ <sup>1</sup> w <sup>(Ω))</sup> <sup>_and_</sup> <sup>_p_</sup> <sup>∈</sup> <sup>_L_</sup> <sup>2(R+;</sup> <sup>_L_</sup> 0 <sup>2(Ω)),</sup> <sup>_such that for any suitable test functions_</sup> <sup>_v_</sup> <sup>_and q we_</sup> _have_ _Find_ _u_ ∈ _L_ <sup>2</sup> (R <sup>+</sup> ; _H_ Γ <sup>1</sup> Γ <sup>1</sup> w <sup>(Ω))</sup> <sup>_and_</sup> <sup>_p_</sup> <sup>∈</sup> <sup>_L_</sup> <sup>2(R+;</sup> <sup>_L_</sup> 0 <sup>2</sup> Ω Ω ρ <sup><u>∂</u></sup> <sup>_<u>u</u>_</sup> ∂ _t_ <sup>·</sup> <sup>_v_</sup> <sup>+</sup> ρ( _u_ - ∇) _u_ - _v_ + Ω Ω τ : ∇ _v_ + _q_ ∇· _u_ Ω ( _p_ + _p_ ¯)∇· _v_ = Γin∪Γout _p_ ¯ _n_ - _v_ . (11) Equation (11) must be completed with suitable initial conditions for the velocity field, that we will assume to vanish identically at time _t_ = 0. To exploit the reflection symmetry of some domains, we will consider a fictitious boundary Γc corresponding to the symmetry axis. On this boundary we will assume that the normal component of the velocity field and the tangential component of the traction τ _n_ vanish. For the time integration of (11) we apply a semi-implicit Euler scheme. In particular, the nonlinear convective term is approximated explicitly, the rest is approximated implicitly. This approximation is suitable to simulate flows at sufficiently low Reynolds number. Consequently, we have Ω ρ <sup>_<u>u</u>_</sup> <sup>_n_</sup> ∆ _t_ <sup>·</sup> <sup>_v_</sup> <sup>−</sup> ρ( _u_ <sup>_n_</sup> ·∇) _u_ <sup>_n_</sup> - _v_ + Ω _p_ ¯ _n_ - _v_ (12) Ω ρ <sup>_<u>u</u>_</sup> <sup>_n_</sup> <sup>+1</sup> ∆ _t_ <sup>·</sup> <sup>_v_</sup> <sup>+</sup> <sup>_a_</sup> <sup>(</sup> <sup>_u_</sup> <sup>_n_</sup> <sup>+1,</sup> <sup>_v_</sup> <sup>)</sup> <sup>+</sup> <sup>_b_</sup> <sup>(</sup> <sup>_v_</sup> <sup>,</sup> <sup>_pn_</sup> <sup>+1 +</sup> <sup>_p_</sup> <sup>¯)</sup> <sup>−</sup> <sup>_b_</sup> <sup>(</sup> <sup>_u_</sup> <sup>_n_</sup> <sup>+1,</sup> <sup>_q_</sup> <sup>) =</sup> ρ <sup>_<u>u</u>_</sup> <sup>_n_</sup> ∆ _t_ Γin∪Γout with bilinear forms _b_ ( _u_, _q_ ) := − with bilinear forms _b_ ( _u_, _q_ ) := − �Ω <sup>_q_</sup> <sup>∇·</sup> <sup>_u_</sup> <sup>and</sup> <sup>_a_</sup> <sup>(</sup> <sup>_u_</sup> <sup>,</sup> <sup>_v_</sup> <sup>) :=</sup> �Ω <sup>τ(</sup> <sup>_u_</sup> <sup>) : ∇</sup> <sup>_v_</sup> <sup>. Note that the latter is already linearized</sup> since the (nonlinear) material functions in (4) are computed using _u_ <sup>_n_</sup> . For each time step, Equation (12) is discretized in space and solved, in a standard way, by means of mixed finite elements P2-P0 for the approximation of the velocity-pressure pair, which are known to satisfy the Ladyzhenskaya–Babuˇska–Brezzi inf-sup condition for a stable solution of the associated saddle-point problem [3]. The numerical method is implemented within the Python library FEniCS [26] and some details pertaining the micro-to-macro coupling through the dynamic reconstruction of the extra stress are given in Appendix B. ### 5 Numerical results for di ff erent geometries The aim of this section is to demonstrate the robustness and effectiveness of our heterogeneous multi-scale method by presenting the results of simulations in three different planar geometries: flows in a straight 7 Ω <sup>_q_</sup> <sup>∇·</sup> <sup>_u_</sup> <sup>and</sup> <sup>_a_</sup> <sup>(</sup> <sup>_u_</sup> <sup>,</sup> <sup>_v_</sup> <sup>) :=</sup> Figure 3: _Comparison of the horizontal velocity profile ux, local deformation rate_ ε˙ _, and viscosity_ η _for the_ _flow in a straight channel computed by our multi-scale method with a reference Newtonian solution._ In the case _N_ pol = 1, the non-Newtonian solution is extremely close to the Newtonian one, as expected from the mild rate dependence of the viscosity and the small values of λ3. In the case _N_ pol = 20, we observe a much larger deviation with a shear-thinning character expected from the rate dependence of the viscosity. channel, through a 4:1 contraction, and past a deep hole. These are paradigmatic geometries frequently used to test the non-Newtonian behavior of fluid models [4]. 5.1 Channel flow The multi-scale method is firstly tested on the classical case of a planar channel flow. The total length of the channel is _L_ = 5 m along the _x_ -axis and the system width is _W_ = 2 m along the _y_ -axis. Exploiting the reflection symmetry of the problem, we discretized only the upper half of the channel on a mesh with 100 triangular elements along the _x_ -axis and 20 elements along the _y_ -axis, for a total of 4000 triangles in the entire computational domain. On the fictitious boundary that corresponds to the center of the channel we impose a vanishing vertical velocity and a vanishing normal traction to respect the reflection symmetry of the problem. We consider a fluid with unit density and drive the flow by imposing a constant horizontal pressure gradient _C_ = 1 Pa/m. As for the velocity field _u_, we assume periodic boundary conditions so that the velocity at inlet and outlet is the same. The time step is ∆ _t_ = 1 × 10 <sup>−3</sup> s. We let the system evolve up to the time _T_ = 2 s to reach a steady state. The flow type is everywhere equivalent to that of a simple shear. Indeed, this is a viscometric flow with β3 = 1 in the top half of the domain and β3 = −1 in the other half. A discontinuity would appear at the midline of the channel consistent with the fact that β3 is not defined for ε˙ = 0. The homogeneity of the flow type makes the flow-type dependence of the stress tensor irrelevant. To assess the importance of non-Newtonian effects, we compare the solution obtained from the multi-scale approach with the analytical solution of a reference Newtonian model, represented by the classical stress-strain relation σ = − _p_ I + 2¯η D (13) 8 0.004 0.003 0.002 0.001 0.000 contraction deep hole 0.0 0.1 0.2 0.3 0.4 t (s) h <sup>1.0</sup> 10 <u>2</u> 10 <u>1</u> h (m) 10 4 10 5 Figure 4: _Time_ _convergence_ _of_ _the_ _numerical_ _solution_ _to_ _the_ _steady_ _flow_ _(left)_ _and_ _mesh_ _convergence_ _of_ _the_ _method_ _(right)._ The attainment of steady flow conditions is confirmed by the evolution of the flow rate _Q_ through vertical sections of the domain for the contraction and deep hole geometries (left, see legend) the dashed lines show the flow rate produced by the modified non-Newtonian model and highlight a measurable difference with the full model. The incremental correction obtained by successive mesh refinements is measured by the _L_ <sup>2</sup> norm of the difference of the corresponding velocity fields and features a linear scaling with the mesh size parameter _h_, thus showing convergence of the method in a situation in which all the non-Newtonian contributions are activated. with η¯ constant. We take η¯ = 1.7 Pa s for _N_ pol = 1 and η¯ = 10 Pa s for _N_ pol = 20, corresponding to the zero-rate limit of the interpolated shear viscosity from our NEMD simulations. The comparison of velocity, deformation rate, and viscosity profiles is reported in Figure 3. In the case _N_ pol = 1 the non-Newtonian solution is extremely close to the Newtonian one, as expected from the mild rate dependence of the viscosity and the small values of λ3. In the case _N_ pol = 20, we observe a much larger deviation that is small only around the center of the channel, where the shear rate vanishes and the viscosity approaches that of the reference Newtonian model. Due to the non-uniformity of the viscosity in the development of the flow and in its steady state, the characterization of the flow by means of dimensionless quantities such as the Reynolds number is not straightforward. Nevertheless, we can identify the range of local parameter values as follows. We take the channel width _W_ as reference length and _P_ = _CW_ as reference pressure drop. The local Reynolds number is then given by Re = <sup>_<u>W</u>_</sup> <sup>√ρ</sup> <sup>_<u>CW</u>_</sup> . η Another important dimensionless quantity is the reorientation angle ϕ, such that <u>λ3</u> tan ϕ = , η + ~~<u>�</u>~~ η <sup>2</sup> + λ <sup>2</sup> 3 3 which measures the rotation of the stress eigenvectors with respect to the eigenvectors of D . This geometric information is precisely the meaning of the first normal stress difference in simple shear flows, extended to generic local flows by the definition of λ3 and η [18]. In the monomeric case, we have ηmin = 1.6 Pa s and ηmax = 1.8 Pa s so that Re ∈ [1.57, 1.77], while ϕ is negligible. In the polymeric case, we have ηmin = 2 Pa s and ηmax = 10 Pa s so that Re ∈ [0.28, 1.41]. We can then consider our examples to be at low Reynolds number. Since ˙εmax = 0.24 s <sup>−1</sup>, we have ϕ ∈ [−22, 22] degrees, that includes quite significant values. 5.2 Flow through a contraction As a first example of flow in a complex geometry we consider the 4:1 contraction. This flow is characterized by the presence of different local flow types: simple shear in regions that are sufficiently far from the ends of the contraction, extensional and mixed motion in proximity of entrance and exit of the contraction, and 9 (a) (b) (c) _ux_ (m/s) _uy_ (m/s) _p_ (Pa) Figure 5: _The_ _geometry_ _of_ _the_ _domain_ _induces_ _a_ _flow_ _that_ _features_ _a_ _broad_ _spectrum_ _of_ _local_ _flow_ _types._ (a,b) The two components of the steady-state velocity field, _ux_ and _uy_, in the flow through a contraction show that we are in a stable laminar regime. (c) The pressure field features oblique isolines due to the presence of normal stress differences. mixed rotational flow near the corners of the domain. The spatial non-uniformity of the flow type must be taken into account to obtain a precise macro-scale description of the fluid motion. To show this, we compare the prediction of the full non-Newtonian model with that of a _modified_ non-Newtonian model, wherein the flow-type dependence is artificially suppressed. Specifically, β3 is replaced by the function sign(β3). In this way, only the micro-scale data obtained in simple shear (i.e., β3 = ±1) are used, but the results cannot properly reflect the fluid behavior. We discuss results obtained with a channel of length _L_ = 5 m and maximum width _W_ = 2 m, only in the polymeric case _N_ pol = 20, with time step ∆ _t_ = 10 <sup>−3</sup>, letting the system evolve to reach a steady state for _T_ = 0.2 s. We can appreciate the time convergence to the steady solution by looking at the evolution of the flow rate _Q_ through vertical sections of the domain, reported in Figure 4, left panel. The discretization employs an unstructured triangular mesh with average diameter of the triangles _h_ ≈ 0.03 m. The mesh convergence of the multi-scale method is assessed by considering the _L_ <sup>2</sup> norm of the difference between solutions obtained with mesh parameter _h_ and 2 _h_ . From the data reported in Figure 4, right panel, we see that the incremental correction scales linearly in _h_, thus showing convergence of our simulation. The pressure gradient that drives the flow is _C_ = 0.3 Pa/m. The velocity field _u_ is assumed periodic so that it is matched at inlet and outlet and, to exploit symmetry and compute the numerical solution only in the upper half of the domain, we use the same conditions as in the straight channel simulation, namely, vanishing vertical velocity and vertical traction at the center of the channel. The flow is laminar with the characteristic increase of horizontal velocity _ux_ in correspondence of the contraction. The pressure gradient is concentrated along the narrower portion of the domain and features oblique isolines due to the presence of normal stress differences in that region (Figure 5). The non-uniformity of the deformation rate ε˙ and of the flow-type parameter β3 has a strong influence on the local values of η, that range from 3.8 Pa s to 13 Pa s in the contracting region, and λ3, that range from −4 Pa s to 4 Pa s, considering also the lower half of the domain (see Figure 6). From these values and taking now _W_ /4 as reference length, we can estimate Re ∈ [0.015, 0.05] and ϕ ∈ [−23.5, 23.5] degrees. In this complex flow, the flow type measured by the parameter β3 varies significantly through the domain (Figure 6b), ranging from pure extension (β3 = 0) to simple shear (|β3| = 1) to more rotational flows (|β3| - 1). Regions of mixed and extensional motion cover a major part of the domain, going well 10 (a) (b) (c) (d) _"_ ˙ (1/s) _β_ 3 _⌘_ (Pa s) _λ_ 3 (Pa s) Figure 6: _The_ _non-uniform_ _flow_ _type_ _in_ _complex_ _flows_ _can_ _a_ ff _ect_ _significantly_ _the_ _rheological_ _response._ We measured (a) the deformation rate ε˙ and (b) the local flow type β3 in the flow through a contraction of a polymeric fluid ( _N_ pol = 20) and computed the local values of the material parameters (c) η and (d) λ3. In this case, they are strongly affected by changes in the flow type on top of the variations due to the deformation rate. within the contraction. Since the viscosity in the full non-Newtonian model is a function of ε˙ and β3, the effect of the flow type is clearly dominant in determining its value. The importance of correctly embedding the flow-type dependence in the multi-scale model can be highlighted by comparing the prediction of the full non-Newtonian model with that obtained from the modified non-Newtonian model (Figure 7). The viscosity in the modified model presents a very different profile in the extensional and mixed flow regions, where it happens to decrease instead of increasing, as predicted by the correct method and in line with the extensional rheology of the polymeric case. This has an immediate effect on the velocity profile, that features a more rapid flow and a clear asymmetry, due to the overemphasized role of the normal stress differences related to λ3 in the modified model. 5.3 Flow past a deep hole In this section we analyze a second example of flow in a complex geometry. We consider a channel of length _L_ = 5 m and width _W_ = 1 m. At a distance of 1.75 m from the inlet we find the hole of width _W_ hole = 1.5 m and depth _H_ = 5 m. The discretization employs an unstructured triangular mesh with average diameter of the triangles _h_ ≈ 0.06 m. The time step is ∆ _t_ = 10 <sup>−3</sup> and we let the system evolve to reach a steady state for _T_ = 0.4 s (see Figure 4, left panel). We present simulation results for the polymeric case _N_ pol = 20, driving the flow with an outlet-to-inlet pressure gradient _C_ = 0.3 Pa/m. The velocity field is again assumed to be periodic, and hence equal at inlet an outlet. The flow past a deep hole features a complex distribution of local flow types with a consequent variation 11 (a) (b) (c) (d) _⌘_ (Pa s) _ux_ (m/s) Figure 7: _The_ _dependence_ _of_ _the_ _stress_ _on_ _the_ _local_ _flow_ _type_ _must_ _be_ _taken_ _into_ _account_ _to_ _correctly_ _predict_ _the_ _fluid_ _behavior._ We compare the steady-state viscosity η and horizontal velocity _ux_ nearby the contraction, computed with (a,c) the full non-Newtonian model and (b,d) the modified one. The viscosity in the modified model presents a very different profile in the extensional and mixed flow regions, nearby entrance and exit of the restriction. This influences the velocity field, which features a clear asymmetry due to the overemphasized role of normal stress differences in the modified model. of the material response. Also in this case, a comparison of the viscosity and the horizontal velocity obtained with the full and the modified non-Newtonian models (Figure 8) confirms the need for a correct treatment of flow-type-dependent rheologies. The viscosity appears to be significantly different right above the deep hole. This has a mild but noticeable influence on the flow. The velocity depression is shifted rightward and, since the viscosity is lower, the flow is globally faster with the modified model, as seen also from the values of the flow rate reported in Figure 4. From the component _uy_ of the velocity (Figure 9a) we can clearly see the region where the deep hole modifies the flow in the upper channel. Moreover, the presence of a clockwise-rotating vortex can be inferred at the center of the shown portion of the hole. The deformation rate ε˙ and the flow-type parameter β3 highlight the presence of mixed flows and high-vorticity regions (Figure 9b and 9c). Specifically, β3 confirms the presence of a vortex in the hole. The sharp contrast between yellow and green regions nearby the openings of the upper channel indicates the viscometric nature of the flow far from the hole. The values of λ3 across the domain (Figure 9d) are a direct consequence of the non-Newtonian rheology and the complexity of the flow. The same applies to the viscosity shown in Figure 7c. For this flow, the relevant ranges of dimensionless parameters are Re ∈ [0.05, 0.12] and ϕ ∈ [−20.8, 20.8] degrees. Hence, we have significant non-Newtonian effects while turbulent motions are prevented. ### 6 Conclusions and outlook We have developed and tested a heterogeneous multi-scale method for the simulation of flows in arbitrary geometries for complex fluids by means of a data-driven reconstruction of the stress tensor. This is based on employing the results of micro-scale simulations according to a general decomposition of the stress [18] that allows to correctly align its different components in flows that display a broad spectrum of local flow types. We have shown that a proper treatment of the flow-type dependence, that was missing in previous multi-scale methods exclusively focused on simple shear rheology, is essential to capture the macroscopic dynamics. In our case, the micro-scale simulations are non-equilibrium molecular dynamics simulations of polymeric chains with internal FENE bonds and an effective Weeks-Chandler-Andersen interaction potential. Nevertheless, our coupling scheme does not rely on a specific simulation strategy neither at the micro-scale nor at the macro-scale. Indeed, we have chosen to implement the macroscopic continuum simulation with a well-established mixed finite element method based on P2-P0 elements for the velocity-pressure pair to deal with the incompressibility constraint and a semi-implicit time integration scheme, but any other computational method to solve for the continuum evolution can in principle be employed. Polymeric fluids are well known to display a significant degree of flow-type dependence in their rheo 12 (a) (b) (c) _⌘_ (Pa s) _ux_ (m/s) (d) _⌘_ (Pa s) _ux_ (m/s) Figure 8: _Also in the flow past a deep hole the presence of mixed and extensional flow regions requires a_ _proper_ _treatment_ _of_ _the_ _flow-type_ _dependence_ _of_ _the_ _stress._ We compare the steady-state viscosity η and horizontal velocity _ux_ computed with (a,c) the full non-Newtonian model and (b,d) the modified one. The viscosity appears to be significantly different right above the deep hole. The velocity depression is shifted rightward and the flow is globally faster. logical properties. In fact, the different average conformation of the long molecular chains in simple shear and extensional flows causes the same material to show opposite trends in the dependence of the viscosity on the rate of deformation. Our micro-scale simulations reproduce this feature. Hence, we were able to assess the relevance of properly taking into account the flow-type dependence of the stress in the macro-scale simulation. From the results obtained with our multi-scale approach in paradigmatic geometries, it is clear that the predictions of a model that suppresses the flow-type dependence are not reliable. We performed micro-scale simulations imposing simple shear and planar extension as average kinematic conditions under which we evaluate the stress response. From these, we constructed the rheological functions in mixed flows by means of a simple interpolation and extrapolation procedure. In view of the impact on macroscopic flows in non-viscometric geometries of the local flow conditions, we plan to expand the micro-scale simulations to obtain data under mixed and rotational flow conditions. This will require the implementation of a suitable generalization of the Kraynik–Reinelt boundary conditions. In fluids composed by molecules with longer microscopic relaxation times, it may happen that the local flow type experienced by a fluid element changes fast along streamlines. The method that we presented can in principle be extended to take this into account by devising MD simulations for which the flow type of the imposed background motion is slowly varying. The macroscopic material functions would then depend also on the derivative along streamlines of the flow-type parameter. Other directions for future work are the testing of our method in parameter ranges where elastic instabilities may be observed, that may lead to the presence of highly oscillatory material coefficients in space and time, and the implementation of an on-the-fly coupling between macro-scale and micro-scale simulations, to be able to sample the space of kinematic conditions in a problem-driven fashion. ### Acknowledgments G.G.G. and F.T. acknowledge the support of the Italian National Group of Mathematical Physics (GNFMINdAM) through the funding scheme _GNFM Young Researchers’ Projects 2020_ . The research of M.L.-M. and L.Y. was supported by the German Science Foundation (DFG) within the Project number 233630050 13 (a) (b) (c) _uy_ (m/s) _β_ 3 (d) _"_ ˙ (1/s) _λ_ 3 (Pa s) Figure 9: _The flow past a deep hole features a complex distribution of local flow types with a consequent_ _variation of the material response._ (a) From the component _uy_ of the velocity we can see the region where the deep hole modifies the flow in the upper channel. (b,c) The deformation rate ε˙ and the flow-type parameter β3 highlight the presence of mixed flows and high-vorticity regions. (d) The values of λ3 across the domain are a direct consequence of the non-Newtonian rheology and the complexity of the flow. TRR 146, C5 project. They also gratefully acknowledge the computing time granted on the HPC cluster Mogon at Johannes Gutenberg University Mainz. M.L.-M. is grateful to the Gutenberg Research College of the Johannes Gutenberg University Mainz for the research support. ### A Fitting procedure for the micro-scale NEMD data We report here the details about the fitting of micro-scale data that we performed using Gaussian Process Regression (GPR). Since some choices are involved in the procedure, it seems appropriate to give a brief account of ours. GPR is a Bayesian approach to regression based on machine learning techniques. The fitting is done through a Gaussian stochastic process _f_ ( _x_ ; w ) that evolves along the variable _x_ and depends on a list of hyper-parameters w . The observed data are a finite number _N_ of pairs ( _xi_, _yi_ ) _i_ <sup>_N_</sup> =1 <sup>.</sup> <sup>The functional</sup> form of the Gaussian process is specified by its mean and covariance functions, _m_ ( _x_ ; w ) = E[ _f_ ( _x_ ; w )] and _K_ ( _x_, _x_ <sup>′</sup> ; w ) = E <sup>��</sup> _f_ ( _x_ ; w ) − _m_ ( _x_ ; w ) <sup>��</sup> _f_ ( _x_ <sup>′</sup> ; w ) − _m_ ( _x_ <sup>′</sup> ; w ) <sup>��</sup>, where E denotes the expected value. A fundamental feature of GPR is that it does not produce a definite value of the fitting parameters w, but considers them random variables and seeks to determine suitable mean and variance for their distribution. This is achieved by an iterative optimization that takes into account the likelihood of the parameters distributions given the knowledge of the observed data [33]. What one needs to specify is the type of mean and covariance functions to be used for the GPR. Typical choices for the former are polynomial functions of _x_ with coefficients given by w, while for the latter are Radial Basis Functions _K_ RBF( _x_, _x_ <sup>′</sup> ; σ, _l_ ) ≡ σ <sup>2</sup> exp �− <sup>|</sup> <sup>_<u>x</u>_</sup> <sup>−</sup> <sup>_<u>x</u>_</sup> <sup>′|2</sup> 2 _l_ <sup>2</sup> with a set of two hyper-parameters w = (σ, _l_ ), or the Mat´ern covariance of degree ν given by _K_ M,ν( _x_, _x_ <sup>′</sup> ; σ, ϱ) ≡ σ <sup>2 21−ν</sup> Γ(ν) - √2ν <sup>|</sup> <sup>_<u>x</u>_</sup> <sup>−</sup> <sup>_<u>x</u>_</sup> <sup>′|</sup> ϱ �ν _K_ ν - √2ν <sup>|</sup> <sup>_<u>x</u>_</sup> <sup>−</sup> <sup>_<u>x</u>_</sup> <sup>′|</sup> ϱ , where Γ is the Euler gamma function and _K_ ν is the modified Bessel function of the second kind. In our 14 treatement, we took as _x_ variable the quantity ε˙ or log10(˙ε), as _y_ variable we took η, log10(η), or λ3. We tested regressions with mean function zero, constant, or polynomial up to degree four and, for the covariance function, RBF or Mat´ern kernel of degree up to 5 and picked the combinations that give the best results after optimization. ### B Multi-scale coupling in the code The purpose of this section is to present the portion of code that implements the multi-scale coupling in the context of an otherwise standard Finite Element simulation of the flow equations (see [24] for an introduction to the library FEniCS). The peculiarity of our method concerns the integration of NEMD data with the continuum solver and the construction of the stress tensor based on the general representation (4). In our code, `numpy` arrays contain the interpolated curves ηsh, λ3,sh and ηext, while λ3,ext is simply zero. In particular, the first column of the array `S` contains the values of ε˙ on which the Carreau function or GPR is sampled and the second column the corresponding expected values of ηsh. For an efficient use of those data in the stress computation, we transform them in projections on a Finite Element space defined on a one-dimensional mesh, the nodes of which are given by the sampled values of ε˙. Considering, for instance, the curve ηsh, it becomes the function `etas` in the space `E` of P1 elements defined on the mesh `mesh_etas` . Its construction is performed with the following lines of code. Similar commands are used to define the functions `etae` and `lambda3s` that represent ηext and λ3,sh. 1 <mark>`#`</mark> <mark>`1D`</mark> <mark>`mesh`</mark> <mark>`for`</mark> <mark>`eta_sh`</mark> 2 3 <mark>`import`</mark> <mark>`numpy`</mark> <mark>`as`</mark> <mark>`np`</mark> 4 <mark>`from`</mark> <mark>`mshr`</mark> <mark>`import`</mark> <mark>`*`</mark> 5 6 <mark>`nodes`</mark> <mark>`=`</mark> <mark>`S[:,0]`</mark> 7 <mark>`n_nodes`</mark> <mark>`=`</mark> <mark>`nodes.shape[0]`</mark> 8 <mark>`n_cells`</mark> <mark>`=`</mark> <mark>`n_nodes`</mark> <mark>`-`</mark> <mark>`1`</mark> 9 <mark>`cells`</mark> <mark>`=`</mark> <mark>`np.arange(n_cells)`</mark> 10 11 <mark>`#`</mark> <mark>`The`</mark> <mark>`geometry`</mark> <mark>`is`</mark> <mark>`inherited`</mark> <mark>`by`</mark> <mark>`a`</mark> <mark>`standard`</mark> <mark>`mesh`</mark> 12 <mark>`mesh0`</mark> <mark>`=`</mark> <mark>`UnitIntervalMesh(n_cells)`</mark> 13 <mark>`gdim`</mark> <mark>`=`</mark> <mark>`mesh0.geometry().dim()`</mark> 14 <mark>`tdim`</mark> <mark>`=`</mark> <mark>`mesh0.topology().dim()`</mark> 15 <mark>`c_type`</mark> <mark>`=`</mark> <mark>`mesh0.type`</mark> <mark>`()`</mark> 16 <mark>`c_str`</mark> <mark>`=`</mark> <mark>`CellType.type2string(c_type.cell_type())`</mark> 17 18 <mark>`#`</mark> <mark>`Mesh`</mark> <mark>`nodes`</mark> <mark>`are`</mark> <mark>`specified`</mark> <mark>`from`</mark> <mark>`data`</mark> 19 <mark>`mesh_etas`</mark> <mark>`=`</mark> <mark>`Mesh()`</mark> 20 <mark>`editor`</mark> <mark>`=`</mark> <mark>`MeshEditor()`</mark> 21 <mark>`editor.open(mesh_etas,`</mark> <mark>`c_str,`</mark> <mark>`tdim,`</mark> <mark>`gdim)`</mark> 22 <mark>`editor.init_vertices(n_nodes)`</mark> 23 <mark>`editor.init_cells(n_cells)`</mark> 24 <mark>`[editor.add_vertex(int(i),[n])`</mark> <mark>`for`</mark> <mark>`i,n`</mark> <mark>`in`</mark> <mark>`enumerate`</mark> <mark>`(nodes)]`</mark> 25 <mark>`[editor.add_cell(i,[i,i+1])`</mark> <mark>`for`</mark> <mark>`i`</mark> <mark>`in`</mark> <mark>`range(cells.shape[0])]`</mark> 26 <mark>`editor.close()`</mark> 27 28 <mark>`#`</mark> <mark>`Definition`</mark> <mark>`of`</mark> <mark>`FE`</mark> <mark>`space`</mark> <mark>`and`</mark> <mark>`function`</mark> 29 <mark>`E`</mark> <mark>`=`</mark> <mark>`FunctionSpace(mesh_etas,`</mark> <mark>`’P’,`</mark> <mark>`1)`</mark> 30 <mark>`etas=`</mark> <mark>`Function(E)`</mark> 31 <mark>`etas.vector().set_local(np.flip(S[:,1],`</mark> <mark>`axis=0))`</mark> 32 <mark>`etas.set_allow_extrapolation(True)`</mark> The second portion of code relevant to the multi-scale coupling is the local computation of the kinematic parameters ε˙ and β3 and the reconstruction, at each time step, of the spatial profile of the stress coefficients η and λ3 by means of the material functions η˜(˙ε, β3) and λ <sup>˜</sup> 3(˙ε, β3). This is accomplished through the following definitions, where `mesh` is the two-dimensional triangular mesh defined on the flow domain, and `u` is a three-component variable containing the velocity and pressure fields. 1 <mark>`from`</mark> <mark>`fenics`</mark> <mark>`import`</mark> <mark>`*`</mark> 2 3 <mark>`def`</mark> <mark>`Max(a,`</mark> <mark>`b):`</mark> 15 4 <mark>`return`</mark> <mark>`(a+b+abs(a-b))/Constant(2)`</mark> 5 6 <mark>`def`</mark> <mark>`Min(a,`</mark> <mark>`b):`</mark> 7 <mark>`return`</mark> <mark>`(a+b-abs(a-b))/Constant(2)`</mark> 8 9 <mark>`#`</mark> <mark>`Epsilondot`</mark> <mark>`from`</mark> <mark>`the`</mark> <mark>`velocity`</mark> <mark>`u`</mark> 10 <mark>`def`</mark> <mark>`eps(u):`</mark> 11 <mark>`return`</mark> <mark>`sqrt(0.5*((u[0].dx(0))2+(u[1].dx(1))2)+0.25*(u[1].dx(0)+u[0].dx(1))**2)`</mark> 12 13 <mark>`#`</mark> <mark>`Epsilondot`</mark> <mark>`truncated`</mark> <mark>`for`</mark> <mark>`viscosity`</mark> <mark>`in`</mark> <mark>`shear`</mark> 14 <mark>`def`</mark> <mark>`eps_es(u):`</mark> 15 <mark>`a`</mark> <mark>`=`</mark> <mark>`nodes[0]`</mark> 16 <mark>`b`</mark> <mark>`=`</mark> <mark>`nodes[-1]`</mark> 17 <mark>`return`</mark> <mark>`Max(a,Min(b,`</mark> <mark>`eps(u)))`</mark> 18 19 <mark>`#`</mark> <mark>`Epsilondot`</mark> <mark>`truncated`</mark> <mark>`for`</mark> <mark>`viscosity`</mark> <mark>`in`</mark> <mark>`extension`</mark> 20 <mark>`def`</mark> <mark>`eps_ee(u):`</mark> 21 <mark>`a`</mark> <mark>`=`</mark> <mark>`nodes_e[0]`</mark> 22 <mark>`b`</mark> <mark>`=`</mark> <mark>`nodes_e[-1]`</mark> 23 <mark>`return`</mark> <mark>`Max(a,Min(b,`</mark> <mark>`eps(u)))`</mark> 24 25 <mark>`#`</mark> <mark>`Epsilondot`</mark> <mark>`truncated`</mark> <mark>`for`</mark> <mark>`lambda_3`</mark> <mark>`in`</mark> <mark>`shear`</mark> 26 <mark>`def`</mark> <mark>`eps_ls(u):`</mark> 27 <mark>`a`</mark> <mark>`=`</mark> <mark>`nodes_l[0]`</mark> 28 <mark>`b`</mark> <mark>`=`</mark> <mark>`nodes_l[-1]`</mark> 29 <mark>`return`</mark> <mark>`Max(a,Min(b,`</mark> <mark>`eps(u)))`</mark> 30 31 <mark>`#`</mark> <mark>`Beta3`</mark> <mark>`from`</mark> <mark>`the`</mark> <mark>`velocity`</mark> <mark>`u`</mark> <mark>`truncated`</mark> <mark>`between`</mark> <mark>`-1`</mark> <mark>`and`</mark> <mark>`1`</mark> 32 <mark>`def`</mark> <mark>`beta(u):`</mark> 33 <mark>`ux`</mark> <mark>`=`</mark> <mark>`u[0]`</mark> 34 <mark>`uy`</mark> <mark>`=`</mark> <mark>`u[1]`</mark> 35 <mark>`uxy=`</mark> <mark>`ux.dx(1)`</mark> 36 <mark>`uyx=`</mark> <mark>`uy.dx(0)`</mark> 37 <mark>`rot=`</mark> <mark>`uyx`</mark> <mark>`-`</mark> <mark>`uxy`</mark> 38 <mark>`return`</mark> <mark>`Max(-1,`</mark> <mark>`Min(1,`</mark> <mark>`rot/(2*Max(1.e-12,`</mark> <mark>`eps(u)))))`</mark> 39 40 <mark>`#`</mark> <mark>`Initialize`</mark> <mark>`functions`</mark> 41 <mark>`Q`</mark> <mark>`=`</mark> <mark>`FunctionSpace(mesh,`</mark> <mark>`’P’,`</mark> <mark>`1)`</mark> 42 <mark>`epsilondot_`</mark> <mark>`=`</mark> <mark>`Function(Q)`</mark> 43 <mark>`beta3_`</mark> <mark>`=`</mark> <mark>`Function(Q)`</mark> 44 <mark>`eta`</mark> <mark>`=`</mark> <mark>`Function(Q)`</mark> 45 <mark>`lambda3`</mark> <mark>`=`</mark> <mark>`Function(Q)`</mark> At each time step, we need to compute the new stress coefficients based on the velocity field `u_n` obtained in the previous step. These will be used to update the stress. To this end, we apply the interpolation between simple shear and extensional data according to (5)–(6). 1 <mark>`#`</mark> <mark>`Within`</mark> <mark>`the`</mark> <mark>`time`</mark> <mark>`evolution`</mark> <mark>`loop`</mark> 2 <mark>`#`</mark> <mark>`Update`</mark> <mark>`kinematic`</mark> <mark>`parameters`</mark> 3 <mark>`edot_es=`</mark> <mark>`project(eps_es(u_n),`</mark> <mark>`Q).vector().get_local()`</mark> 4 <mark>`edot_ee=`</mark> <mark>`project(eps_ee(u_n),`</mark> <mark>`Q).vector().get_local()`</mark> 5 <mark>`edot_ls=`</mark> <mark>`project(eps_ls(u_n),`</mark> <mark>`Q).vector().get_local()`</mark> 6 <mark>`beta3=`</mark> <mark>`project(beta(u_n),`</mark> <mark>`Q).vector().get_local()`</mark> 7 <mark>`#`</mark> <mark>`Evaluate`</mark> <mark>`material`</mark> <mark>`functions`</mark> 8 <mark>`etas_temp=`</mark> <mark>`np.zeros(edot_es.shape[0])`</mark> 9 <mark>`etae_temp=`</mark> <mark>`np.zeros(edot_ee.shape[0])`</mark> 10 <mark>`eta_temp=`</mark> <mark>`np.zeros(edot_es.shape[0])`</mark> 11 <mark>`lambda3_temp=`</mark> <mark>`np.zeros(edot_ls.shape[0])`</mark> 12 <mark>`for`</mark> <mark>`i`</mark> <mark>`in`</mark> <mark>`range`</mark> <mark>`(edot_es.shape[0]):`</mark> 13 <mark>`etas_temp[i]=`</mark> <mark>`etas(edot_es[i])`</mark> 14 <mark>`etae_temp[i]=`</mark> <mark>`etae(edot_ee[i])`</mark> 15 <mark>`lambda3_temp[i]=`</mark> <mark>`lambda3s(edot_ls[i])`</mark> 16 <mark>`eta_temp=`</mark> <mark>`np.absolute(beta3)*etas_temp`</mark> <mark>`+`</mark> <mark>`(1-np.absolute(beta3))*etae_temp`</mark> 17 <mark>`lambda3_temp=`</mark> <mark>`beta3*lambda3_temp`</mark> 18 <mark>`#`</mark> <mark>`Casting`</mark> <mark>`the`</mark> <mark>`data`</mark> <mark>`into`</mark> <mark>`functions`</mark> <mark>`on`</mark> <mark>`the`</mark> <mark>`2D`</mark> <mark>`mesh`</mark> 19 <mark>`eta.vector().set_local(eta_temp)`</mark> 20 <mark>`lambda3.vector().set_local(lambda3_temp)`</mark> 16 ### References [1] M. Borg, D. Lockerby, and J. Reese. Fluid simulations with atomistic resolution: a hybrid multiscale method with field-wise coupling. _J. Comput. Phys._, 255:149–165, 2013. [2] M. Borg, D. Lockerby, and J. Reese. A hybrid molecular–continuum method for unsteady compress ible multiscale flows. _J. Fluid Mech._, 768:388–414, 2015. [3] F. Brezzi and M. Fortin. _Mixed and hybrid finite element methods_, volume 15. Springer Science & Business Media, 2012. [4] M. J. Crochet, A. R. Davies, and K. Walters. _Numerical simulation of non-Newtonian flow_ . Elsevier, 2012. [5] P. J. Daivis and B. Todd. A simple, direct derivation and proof of the validity of the sllod equations of motion for generalized homogeneous flows. _J. Chem. Phys._, 124(19):194103, 2006. [6] M. Dobson. Periodic boundary conditions for long-time nonequilibrium molecular dynamics simula tions of incompressible flows. _J. Chem. Phys._, 141(18):184103, 2014. [7] A. Donev, J. B. Bell, A. L. Garcia, and B. J. Alder. A hybrid particle-continuum method for hydro dynamics of complex fluids. _SIAM J. Multiscale Model. Simul._, 8:871–911, 2010. [8] W. E. Seamless multiscale modeling of complex fluids using fiber bundle dynamics. _Commun. Math._ _Sci._, 5(4):1027–1037, 2007. [9] W. E and B. Enquist. The heterogeneous mutli-scale method. _Commun. Math. Sci._, 1:87–133, 2003. [10] W. E and X. Li. Analysis of the heterogeneous multiscale method for gas dynamics. _Methods Appl._ _Anal._, 11(4):557–572, 12 2004. [11] W. E and J. Lu. Seamless multiscale modeling via dynamics on fiber bundles. _Commun. Math. Sci._, 5(3):649–663, 09 2007. [12] W. E, P. Ming, and P. Zhang. Analysis of the heterogeneous multiscale method for elliptic homoge nization problems. _J. American Math. Soc._, 18(01):121–157, 2005. [13] W. E, W. Ren, and E. Vanden-Eijnden. A general strategy for designing seamless multiscale methods. _J. Comput. Phys._, 228(15):5437–5453, 2009. [14] D. A. Fedosov and G. E. Karniadakis. Triple-decker: Interfacing atomistic–mesoscopic–continuum flow regimes. _J. Comput. Phys._, 228(4):1157–1171, 2009. [15] D. A. Fedosov, G. E. Karniadakis, and B. Caswell. Dissipative particle dynamics simulation of depletion layer and polymer migration in micro- and nanochannels for dilute polymer solutions. _J._ _Chem. Phys._, 128(14):144903, 2008. [16] E. G. Flekkoy, G.Wagner, and J. Feder. Hybrid model for combined particle and continuum dynamics. _Europhys. Lett._, 271:271–276, 2000. [17] D. Frenkel and B. Smit. _Understanding_ _molecular_ _simulation:_ _from_ _algorithms_ _to_ _applications_, volume 1. Elsevier, 2001. [18] G. G. Giusteri and R. Seto. A theoretical framework for steady-state rheometry in generic flow conditions. _J. Rheol._, 62(3):713–723, 2018. [19] T. A. Hunt. Periodic boundary conditions for the simulation of uniaxial extensional flow of arbitrary duration. _Molecular Simulation_, 42(5):347–352, 2016. [20] I. G. Kevrekidis, C. W. Gear, and G. Hummer. Equation-free: The computer-aided analysis of com plex multiscale systems. _AIChE J._, 50(7):1346–1355, 2004. 17 [21] I. G. Kevrekidis, C. W. Gear, J. M. Hyman, P. G. Kevrekidis, O. Runborg, and C. Theodoropoulos. Equation-free coarse-grained, multiscale computation: enabling microscopic simulators to perform system-level analysis. _Commun. Math. Sci._, 1(4):715–762, 2003. [22] I. G. Kevrekidis and G. Samaey. Equation-free multiscale computation: Algorithms and applications. _Ann. Rev. Phys. Chem._, 60(1):321–344, 2009. [23] A. Kraynik and D. Reinelt. Extensional motions of spatially periodic lattices. _Int. J. Multiph. Flow_, 18(6):1045–1059, 1992. [24] H. P. Langtangen and A. Logg. _Solving_ _PDEs_ _in_ _python:_ _the_ _FEniCS_ _tutorial_ _I_ . Springer Nature, 2016. [25] R. G. Larson. _The_ _structure_ _and_ _rheology_ _of_ _complex_ _fluids_, volume 150. Oxford university press New York, 1999. [26] A. Logg and G. N. Wells. Dolfin: Automated finite element computing. _ACM_ _Transactions_ _on_ _Mathematical Software (TOMS)_, 37(2):1–28, 2010. [27] M. Minale, P. Moldenaers, and J. Mewis. Effect of shear history on the morphology of immiscible polymer blends. _Macromolecules_, 30(18):5470–5475, 1997. [28] P. Neumann, W. Eckhardt, and H.-J. Bungartz. Hybrid molecular-continuum methods: from proto types to coupling software. _Comput. Math. Appl._, 67(2):272–281, 2014. [29] D. A. Nicholson and G. C. Rutledge. Molecular simulation of flow-enhanced nucleation in n-eicosane melts under steady shear and uniaxial extension. _J. Chem. Phys._, 145(24):244903, 2016. [30] S. Plimpton. Fast parallel algorithms for short-range molecular dynamics. _J._ _Comput._ _Phys._, 117(1):1–19, 1995. [31] P. Schunk and L. Scriven. Constitutive equation for modeling mixed extension and shear in polymer solution processing. _J. Rheol._, 34(7):1085–1119, 1990. [32] S. Stalter, L. Yelash, N. Emamy, A. Statt, M. Hanke, M. Luk´aˇcov´a-Medvid’ov´a, and P. Virnau. Molec ular dynamics simulations in hybrid particle-continuum schemes: Pitfalls and caveats. _Comput. Phys._ _Commun._, 224:198–208, 2018. [33] C. K. Williams and C. E. Rasmussen. Gaussian processes for regression. _Advances in Neural Infor-_ _mation Processing Systems_, 1996. [34] S. Yasuda and R. Yamamoto. Multiscale modeling and simulation for polymer melt flows between parallel plates. _Phys. Rev. E_, 81(3), 2010. 18

섹션 본문 117문단 · 69,423자

(제목 없음)

1We introduce a new heterogeneous multi-scale method for the simulation of flows of non-Newtonian fluids in general geometries and present its application to paradigmatic two-dimensional flows of polymeric fluids. Our method combines micro-scale data from non-equilibrium molecular dynamics (NEMD) with macro-scale continuum equations to achieve a data-driven prediction of complex flows. At the continuum level, the method is model-free, since the Cauchy stress tensor is determined locally in space and time from NEMD data. The modelling effort is thus limited to the identification of suitable interaction potentials at the micro-scale. Compared to previous proposals, our approach takes into account the fact that the material response can depend strongly on the local flow type and we show that this is a necessary feature to correctly capture the macroscopic dynamics. In particular, we highlight the importance of extensional rheology in simulating generic flows of polymeric fluids. * giulio.

Introduction

2Modelling and computational simulation of non-Newtonian fluids is a challenging problem, since these fluids exhibit complex effects, such as shear thinning or thickening, viscoelasticity or flow-induced phase separation. A detailed analysis of the rheology of complex fluids can be obtained by particle-based simulations. Clearly, such micro-scale description is accurate but computationally very expensive and cannot be applied to engineering-scale problems. Consequently, new mathematical algorithms and hybrid multi-scale approaches have been proposed in recent years.

3In the literature, we can find several hybrid models combining particle dynamics with a macroscopic continuum model, such as the heterogeneous multi-scale methods [7,10,9,12,16,34], the triple-decker atomistic-mesoscopic-continuum method [14,15], the seamless multi-scale methods [8,11,13], the equationfree multi-scale methods [22,21,20] or the internal-flow multi-scale method [1,2]. In [28] software requirements and design principles are presented and illustrated for a prototype coupling between molecular dynamics and Lattice Boltzmann methods. Note that, in general, hybrid multi-scale approaches are successful when processes occurring on a small scale are only loosely coupled with the large-scale behavior, that is, in the presence of an effective scale separation. In keeping with this, our method is applicable when the local flow conditions experienced by a fluid element change on a much larger timescale than the microscopic relaxation time necessary to achieve a statistically steady state of the molecular conformation and interactions.

4The aim of this paper is to illustrate a new heterogeneous multi-scale method for the simulation of flows of complex fluids in generic geometries and different conditions of motion. We extend and generalize the idea presented in [32], where a heterogeneous multi-scale method is developed for polymeric solutions subjected to simple shear flows. Simple shear is very well investigated for it is more easily realized in experiments than other flows. It provides fundamental information that is often sufficient to characterize simple fluids. However, complex fluids show a molecular structure that is able to change with respect to different conditions of motion, geometries, but also time scales and deformation rates. Therefore, to retrieve important rheological information about the stress response of such fluids, their behavior is studied under conditions of flow different from steady simple shear, for example extensional motions, startup flows and oscillating shear [27]. Moreover, it is also fundamental, for these types of materials, to consider flows in complex geometries that contain holes, barriers, contractions or other irregular features, because in close proximity of these structures the fluid is subject to local motions that are not equivalent to simple shear and can manifest some unexpected behavior.

5We focus our efforts on the development of a method to link the micro-scale rheological information, available from simulations in different local flow types, to macro-scale flows in complex geometries. The main aim of this work is to show that it is necessary to correctly take into account the local flow type, which plays an important role in modifying the stress response in non-viscometric flows of non-Newtonian fluids featuring a flow-type dependent rheology, such as polymeric fluids. While simulations based on constitutive assumptions do take into account, by construction, the possible flow type dependence incorporated at the level of constitutive laws, multi-scale methods for fluid mechanics application has so far considered simple shear flows as the only source of information for the micro-to-macro coupling. With our approach, we overcome this severe limitation. The method is applied to planar flows, but it can be extended to more general three-dimensional flows. The most challenging task for such an extension will be to implement MD simulations under arbitrary local flow conditions. The paper is organized in the following way. Section 2 discusses the essential question that arises in building a heterogeneous multi-scale method. Namely, how micro-and macroscopic models are linked together. Section 3 is devoted to the description of micro-scale simulations with an emphasis on the decomposition of the average stress tensor and the reconstruction of data-driven material functions. For the macroscopic simulation of incompressible flows we use, as described in Section 4, a numerical method based on a semi-implicit time evolution scheme and mixed P 2 -P 0 finite elements for the approximation of the velocity-pressure pair under the incompressibility constraint. Results of numerical simulations obtained by our heterogeneous multi-scale method in different geometries are presented in Section 5. The paper is closed by Section 6 with an outlook on future research.

Link between micro-scale data and macro-scale simulations

6At the heart of our proposal there is the understanding that the local kinematics of a generic planar flow must be identified by at least two parameters, one measuring the speed of the deformation and the other measuring the local flow type (see [25,Chapter 1.4] for a discussion of this point). We introduce the symmetrized gradient D ≡ 1 2 (∇u + ∇u T ) of the velocity field u and, for the case of planar flows in which e 3 is normal to the flow plane, we can define the kinematic parameters |ε| ≡ tr D 2 2 and

7While there is ample agreement about measuring the deformation rate in generic situations by means ofε, different choices can be made for the flow-type parameter, depending on the type of material response that we envision (see [18], Sec. III). Here we choose β 3 for its simplicity and we stress that, to make it a frame-indifferent parameter, we consider it as measured relative to the vanishing spin of a fixed inertial frame of reference. In other contexts, different choices may be appropriate (such as the relative rotation rate proposed by Schunk and Scriven [31]), but the structure of the scheme that we are going to present remains the same.

8The local kinematic parametersε and β 3 are the macro-scale input of micro-scale simulations that will in turn give an ensemble-averaged stress tensor σ. To be able to use the micro-scale information encoded in σ we must express it in a form that is independent of the coordinates, because coordinates that are chosen for computational convenience cannot always be coherent when we pass from the micro-to the macro-scale simulation. We can achieve this independence by decomposing the stress on an orthogonal tensorial basis built upon D (see [18] for details and significance of this decomposition). For the case of planar incompressible flows, we have

9where I is the identity tensor and

10The coefficients of the linear decomposition (1) represent a pressure, a generalized viscosity and a reorientation factor related to normal stress differences and can be retrieved from the computational data in any coordinates by computing

11Here the double scalar product and the tensorial norm are defined by

12For the sake of clarity, we indicate withη andλ 3 the two material functions of the kinematic parameters (ε, β 3 ), reconstructed by sampling the two-dimensional parameter space. In this way, we obtain from computational rheological measurements the constitutive expression

13for the stress tensor, that can be used in performing the macro-scale continuum simulations. There is no need to define a pressure function because it is determined, at the macro-scale, as the Lagrange multiplier of the incompressibility constraint.

Micro-scale simulation

14The NEMD simulation at the micro-scale is performed using LAMMPS [30, lammps.sandia.gov]. We consider both monomeric and polymeric aggregates in a three-dimensional computational domain with periodic boundary conditions and undergoing two different planar flows: simple shear and extensional flow. The average velocity field is imposed by suitably deforming the computational box and the canonical ensemble statistics of the velocity fluctuations is achieved via the classical Nosé-Hoover thermostat [17]. For the case of simple shear we use the LAMMPS command fix deform in conjunction with the SLLOD algorithm [5], while the extensional flow is treated by means of the UEF package [29]. The latter implements boundary conditions developed by Dobson [6] and Hunt [19], that are an extension of the boundary conditions of Kraynik and Reinelt [23]. We will discuss results for monomers, N pol = 1, and polymers, N pol = 20, where N pol is the number of monomers per molecule.

Interaction potentials

15We model polymers as bead-spring systems with two types of interaction potential. The first one is active between each pair of monomers and is the Weeks-Chandler-Andersen (WCA) potential, the repulsive part of a Lennard-Jones potential with minimum energy − when the centers of the beads are at distance r = 6 √ 2σ:

16The second one, only active between successive monomers in a polymeric chain, is the Finitely Extensible Nonlinear Elastic (FENE) potential

17with K the elastic constant and R 0 the maximum extent of the bonds. Figure 1: The monomeric fluid displays almost no rate dependence and very little flow-type dependence of the stress coefficients, while the polymeric fluid features rate dependence and a strong flow-type dependence. We compare the NEMD data for the stress coefficients η (top) and λ 3 (bottom) againstε obtained for the monomeric case with N pol = 1 (left) and the polymeric case N pol = 20 (right) under simple shear (circles and black dashed curves) and planar extension (diamonds and red solid curves). In the latter case, λ 3 fluctuates around zero, that is the expected value based on symmetry considerations. The presence of a strong flow-type dependence for the polymeric fluid is a key feature, originated by the different conformations of the long molecules. Fitting curves are obtained as described in the text.

Average stress coefficients

18We considered values of the deformation rateε ranging from 0.001 s −1 to 1 s −1 . For each value ofε we performed 21 simulations with different initial configurations of the particles. At each time, the average stress given as output by LAMMPS is projected onto the basis tensors through the formulae (3) and these projections are averaged over time. Finally, a mean over all initial configurations is taken. Figure 1 presents the data obtained for the generalized viscosity η and the reorientation factor λ 3 . By fitting those data with Carreau and power functions we obtain, for the monomeric case with N pol = 1, the curves

19For the polymeric case with N pol = 20, the Gaussian Process Regression method (see Appendix A) was used to obtain the fitting curves. By comparing the results obtained under simple shear and planar extension for N pol = 1 and N pol = 20, we find that the former fluid displays almost no rate dependence and very little flow-type dependence of the stress coefficients, while the latter features rate dependence and a strong flow-type dependence ( Figure 1). The statistics of interaction between monomers in the two types of flow does not differ significantly, leading to a quasi-Newtonian rheology. On the contrary, the fact that polymer chains are kept in an elongated state by extensional flows, while they tend to tumble and keep a spherical shape in simple shear, generates a richer phenomenology. In fact, the shear-thinning trend displayed in simple shear is qualitatively similar to that of monomeric fluids, while we find an opposite trend-a shear-thickening behavior-in extensional flows at small deformation rates, followed by a non-monotonic behavior of the viscosity. The elastic effects generated by the bonds are crucial in this case and give rise, in simple shear, to the normal stress differences associated with the coefficient λ 3 , also featuring a non-monotonic curve.

20The direct connection between the statistics of chain conformation in the polymeric case and the observed rheology can be evinced from the probability distribution, presented in Figure 2, of the normalized radius of gyration R g and asphericity α defined as follows. Let the components of the 3 × 3 gyration tensor be

21with m i the mass of the i-th monomer, r i its position, M = i m i , and r cm the center of mass of the polymeric chain. With R 0 the effective monomer radius, we set

22Moreover, the asphericity is given by

23where a 1 ≤ a 2 ≤ a 3 are the eigenvalues of the gyration tensor R. At low deformation rate, the distributions obtained in simple shear and extensional flows are almost identical (blue curves in Figure 2) because the chains are equally and mildly stretched by the imposed flow. Asε grows larger, the extensional flow distributions feature a single peak that is progressively shifted rightward, toward more stretched configurations. On the other hand, in simple shear we notice a broadening of the distribution eventually leading to a doubly peaked shape (red curves in Figure 2). This indicates that chains spend roughly half of the time in a stretched configuration while frequently going back to a coiled configuration. In this very different microscopic behavior we find the origin of the strong flow-type dependence of the viscosity at largerε.

Data-driven material functions

24Ideally, we would like to perform micro-scale simulations with many values ofε and β 3 , since flows in generic geometries can easily feature variations of the flow type with β 3 ranging from minus to plus infinity and values ofε that cover many orders of magnitude. The implementation of simulation algorithms for mixed flows different from simple shear and planar extension is a nontrivial task that will be addressed in future works, but we still need, for our macro-scale simulations, a suitable definition of material functions that covers the whole range of kinematic parameters. We thus apply simple extrapolation strategies to build material functions out of the available computational data.

25Specifically, we extend the fitted curves η sh (ε), η ext (ε), λ 3,sh (ε) and λ 3,ext (ε) out of their natural domains by taking constant values. Then we set

26that is an even function of β 3 with η ext (ε) =η(ε, 0) and η sh (ε) =η(ε, 1), and

27that is an odd function of β 3 and such that λ 3,ext (ε) =λ 3 (ε, 0) ≈ 0 and λ 3,sh (ε) =λ 3 (ε, 1). These operations in combination with (4) allow us to build a complete set of data for the stress tensor as a function ofε and β 3 .

Macro-scale simulation

28We consider the flow of an incompressible fluid with constant density ρ and velocity vector u. From the macroscopic point of view the continuum description leads to the conservation of mass and the balance of linear momentum. In the incompressible case, they translate into the following partial differential equations on the domain Ω:

29Here σ denotes the Cauchy stress tensor and p the pressure field. Equation (7) expresses the incompressibility constraint. We partition the boundary of the domain as disjoint union of inlet Γ in , outlet Γ out , and solid walls Γ w , so that ∂Ω = Γ in ∪ Γ out ∪ Γ w . As usual, n is the outward unit normal to ∂Ω.

30A weak formulation of the problem is retrieved by multiplying equation (8)

31and integrating over Ω. By applying Green's formula, we obtain the integral equation

32Moreover, (7) can be multiplied by a scalar test function q ∈ L 2 0 (Ω) = g ∈ L 2 (Ω) : Ω g = 0 and integrated over Ω to give

33We decompose the Cauchy stress tensor in spherical and deviatoric parts by introducing the traceless extra stress τ such that σ = −(p +p)I + τ, wherep ∈ L 2 0 (Ω) is a given pressure field used to impose a chosen pressure gradient from inlet to outlet. On top of the Dirichlet boundary conditions for u on Γ w we assume a form of periodicity for u and p, requiring that they take the same values on Γ in and Γ out . Thanks to the independence of the test functions v and q, we can take the sum of (9) and (10) and substitute the expression for σ to obtain the complete weak formulation of the problem:

34Find u ∈ L 2 (R + ; H 1 Γ w (Ω)) and p ∈ L 2 (R + ; L 2 0 (Ω)), such that for any suitable test functions v and q we have

35Equation (11) must be completed with suitable initial conditions for the velocity field, that we will assume to vanish identically at time t = 0. To exploit the reflection symmetry of some domains, we will consider a fictitious boundary Γ c corresponding to the symmetry axis. On this boundary we will assume that the normal component of the velocity field and the tangential component of the traction τn vanish. For the time integration of (11) we apply a semi-implicit Euler scheme. In particular, the nonlinear convective term is approximated explicitly, the rest is approximated implicitly. This approximation is suitable to simulate flows at sufficiently low Reynolds number. Consequently, we have

36with bilinear forms b(u, q) := − Ω q∇·u and a(u, v) := Ω τ(u) : ∇v. Note that the latter is already linearized since the (nonlinear) material functions in (4) are computed using u n . For each time step, Equation (12) is discretized in space and solved, in a standard way, by means of mixed finite elements P 2 -P 0 for the approximation of the velocity-pressure pair, which are known to satisfy the Ladyzhenskaya-Babuška-Brezzi inf-sup condition for a stable solution of the associated saddle-point problem [3]. The numerical method is implemented within the Python library FEniCS [26] and some details pertaining the micro-to-macro coupling through the dynamic reconstruction of the extra stress are given in Appendix B.

Numerical results for different geometries

37The aim of this section is to demonstrate the robustness and effectiveness of our heterogeneous multi-scale method by presenting the results of simulations in three different planar geometries: flows in a straight Figure 3: Comparison of the horizontal velocity profile u x , local deformation rateε, and viscosity η for the flow in a straight channel computed by our multi-scale method with a reference Newtonian solution. In the case N pol = 1, the non-Newtonian solution is extremely close to the Newtonian one, as expected from the mild rate dependence of the viscosity and the small values of λ 3 . In the case N pol = 20, we observe a much larger deviation with a shear-thinning character expected from the rate dependence of the viscosity. channel, through a 4:1 contraction, and past a deep hole. These are paradigmatic geometries frequently used to test the non-Newtonian behavior of fluid models [4].

Channel flow

38The multi-scale method is firstly tested on the classical case of a planar channel flow. The total length of the channel is L = 5 m along the x-axis and the system width is W = 2 m along the y-axis. Exploiting the reflection symmetry of the problem, we discretized only the upper half of the channel on a mesh with 100 triangular elements along the x-axis and 20 elements along the y-axis, for a total of 4000 triangles in the entire computational domain. On the fictitious boundary that corresponds to the center of the channel we impose a vanishing vertical velocity and a vanishing normal traction to respect the reflection symmetry of the problem. We consider a fluid with unit density and drive the flow by imposing a constant horizontal pressure gradient C = 1 Pa/m. As for the velocity field u, we assume periodic boundary conditions so that the velocity at inlet and outlet is the same. The time step is ∆t = 1 × 10 −3 s. We let the system evolve up to the time T = 2 s to reach a steady state.

39The flow type is everywhere equivalent to that of a simple shear. Indeed, this is a viscometric flow with β 3 = 1 in the top half of the domain and β 3 = −1 in the other half. A discontinuity would appear at the midline of the channel consistent with the fact that β 3 is not defined forε = 0. The homogeneity of the flow type makes the flow-type dependence of the stress tensor irrelevant. To assess the importance of non-Newtonian effects, we compare the solution obtained from the multi-scale approach with the analytical solution of a reference Newtonian model, represented by the classical stress-strain relation withη constant. We takeη = 1.7 Pa s for N pol = 1 andη = 10 Pa s for N pol = 20, corresponding to the zero-rate limit of the interpolated shear viscosity from our NEMD simulations. The comparison of velocity, deformation rate, and viscosity profiles is reported in Figure 3. In the case N pol = 1 the non-Newtonian solution is extremely close to the Newtonian one, as expected from the mild rate dependence of the viscosity and the small values of λ 3 . In the case N pol = 20, we observe a much larger deviation that is small only around the center of the channel, where the shear rate vanishes and the viscosity approaches that of the reference Newtonian model.

40Due to the non-uniformity of the viscosity in the development of the flow and in its steady state, the characterization of the flow by means of dimensionless quantities such as the Reynolds number is not straightforward. Nevertheless, we can identify the range of local parameter values as follows. We take the channel width W as reference length and P = CW as reference pressure drop. The local Reynolds number is then given by

41Another important dimensionless quantity is the reorientation angle ϕ, such that

42which measures the rotation of the stress eigenvectors with respect to the eigenvectors of D. This geometric information is precisely the meaning of the first normal stress difference in simple shear flows, extended to generic local flows by the definition of λ 3 and η [18].

43In the monomeric case, we have η min = 1.6 Pa s and η max = 1. mixed rotational flow near the corners of the domain. The spatial non-uniformity of the flow type must be taken into account to obtain a precise macro-scale description of the fluid motion. To show this, we compare the prediction of the full non-Newtonian model with that of a modified non-Newtonian model, wherein the flow-type dependence is artificially suppressed. Specifically, β 3 is replaced by the function sign(β 3 ). In this way, only the micro-scale data obtained in simple shear (i.e., β 3 = ±1) are used, but the results cannot properly reflect the fluid behavior.

Flow through a contraction

44We discuss results obtained with a channel of length L = 5 m and maximum width W = 2 m, only in the polymeric case N pol = 20, with time step ∆t = 10 −3 , letting the system evolve to reach a steady state for T = 0.2 s. We can appreciate the time convergence to the steady solution by looking at the evolution of the flow rate Q through vertical sections of the domain, reported in Figure 4, left panel. The discretization employs an unstructured triangular mesh with average diameter of the triangles h ≈ 0.03 m. The mesh convergence of the multi-scale method is assessed by considering the L 2 norm of the difference between solutions obtained with mesh parameter h and 2h. From the data reported in Figure 4, right panel, we see that the incremental correction scales linearly in h, thus showing convergence of our simulation.

45The pressure gradient that drives the flow is C = 0.3 Pa/m. The velocity field u is assumed periodic so that it is matched at inlet and outlet and, to exploit symmetry and compute the numerical solution only in the upper half of the domain, we use the same conditions as in the straight channel simulation, namely, vanishing vertical velocity and vertical traction at the center of the channel. The flow is laminar with the characteristic increase of horizontal velocity u x in correspondence of the contraction. The pressure gradient is concentrated along the narrower portion of the domain and features oblique isolines due to the presence of normal stress differences in that region ( Figure 5). The non-uniformity of the deformation rateε and of the flow-type parameter β 3 has a strong influence on the local values of η, that range from 3.8 Pa s to 13 Pa s in the contracting region, and λ 3 , that range from −4 Pa s to 4 Pa s, considering also the lower half of the domain (see Figure 6). From these values and taking now W/4 as reference length, we can estimate Re ∈ [0.015, 0.05] and ϕ ∈ [−23.5, 23.5] degrees.

46In this complex flow, the flow type measured by the parameter β 3 varies significantly through the domain (Figure 6b), ranging from pure extension (β 3 = 0) to simple shear (|β 3 | = 1) to more rotational flows (|β 3 | > 1). Regions of mixed and extensional motion cover a major part of the domain, going well within the contraction. Since the viscosity in the full non-Newtonian model is a function ofε and β 3 , the effect of the flow type is clearly dominant in determining its value. The importance of correctly embedding the flow-type dependence in the multi-scale model can be highlighted by comparing the prediction of the full non-Newtonian model with that obtained from the modified non-Newtonian model (Figure 7). The viscosity in the modified model presents a very different profile in the extensional and mixed flow regions, where it happens to decrease instead of increasing, as predicted by the correct method and in line with the extensional rheology of the polymeric case. This has an immediate effect on the velocity profile, that features a more rapid flow and a clear asymmetry, due to the overemphasized role of the normal stress differences related to λ 3 in the modified model.

Flow past a deep hole

47In this section we analyze a second example of flow in a complex geometry. We consider a channel of length L = 5 m and width W = 1 m. At a distance of 1.75 m from the inlet we find the hole of width W hole = 1.5 m and depth H = 5 m. The discretization employs an unstructured triangular mesh with average diameter of the triangles h ≈ 0.06 m. The time step is ∆t = 10 −3 and we let the system evolve to reach a steady state for T = 0.4 s (see Figure 4, left panel). We present simulation results for the polymeric case N pol = 20, driving the flow with an outlet-to-inlet pressure gradient C = 0.3 Pa/m. The velocity field is again assumed to be periodic, and hence equal at inlet an outlet.

48The flow past a deep hole features a complex distribution of local flow types with a consequent variation Figure 7: The dependence of the stress on the local flow type must be taken into account to correctly predict the fluid behavior. We compare the steady-state viscosity η and horizontal velocity u x nearby the contraction, computed with (a,c) the full non-Newtonian model and (b,d) the modified one. The viscosity in the modified model presents a very different profile in the extensional and mixed flow regions, nearby entrance and exit of the restriction. This influences the velocity field, which features a clear asymmetry due to the overemphasized role of normal stress differences in the modified model. of the material response. Also in this case, a comparison of the viscosity and the horizontal velocity obtained with the full and the modified non-Newtonian models (Figure 8) confirms the need for a correct treatment of flow-type-dependent rheologies. The viscosity appears to be significantly different right above the deep hole. This has a mild but noticeable influence on the flow. The velocity depression is shifted rightward and, since the viscosity is lower, the flow is globally faster with the modified model, as seen also from the values of the flow rate reported in Figure 4.

Conclusions and outlook

49We have developed and tested a heterogeneous multi-scale method for the simulation of flows in arbitrary geometries for complex fluids by means of a data-driven reconstruction of the stress tensor. This is based on employing the results of micro-scale simulations according to a general decomposition of the stress [18] that allows to correctly align its different components in flows that display a broad spectrum of local flow types. We have shown that a proper treatment of the flow-type dependence, that was missing in previous multi-scale methods exclusively focused on simple shear rheology, is essential to capture the macroscopic dynamics.

50In our case, the micro-scale simulations are non-equilibrium molecular dynamics simulations of polymeric chains with internal FENE bonds and an effective Weeks-Chandler-Andersen interaction potential. Nevertheless, our coupling scheme does not rely on a specific simulation strategy neither at the micro-scale nor at the macro-scale. Indeed, we have chosen to implement the macroscopic continuum simulation with a well-established mixed finite element method based on P 2 -P 0 elements for the velocity-pressure pair to deal with the incompressibility constraint and a semi-implicit time integration scheme, but any other computational method to solve for the continuum evolution can in principle be employed.

51Polymeric fluids are well known to display a significant degree of flow-type dependence in their rheo- We performed micro-scale simulations imposing simple shear and planar extension as average kinematic conditions under which we evaluate the stress response. From these, we constructed the rheological functions in mixed flows by means of a simple interpolation and extrapolation procedure. In view of the impact on macroscopic flows in non-viscometric geometries of the local flow conditions, we plan to expand the micro-scale simulations to obtain data under mixed and rotational flow conditions. This will require the implementation of a suitable generalization of the Kraynik-Reinelt boundary conditions.

52In fluids composed by molecules with longer microscopic relaxation times, it may happen that the local flow type experienced by a fluid element changes fast along streamlines. The method that we presented can in principle be extended to take this into account by devising MD simulations for which the flow type of the imposed background motion is slowly varying. The macroscopic material functions would then depend also on the derivative along streamlines of the flow-type parameter. Other directions for future work are the testing of our method in parameter ranges where elastic instabilities may be observed, that may lead to the presence of highly oscillatory material coefficients in space and time, and the implementation of an on-the-fly coupling between macro-scale and micro-scale simulations, to be able to sample the space of kinematic conditions in a problem-driven fashion. A Fitting procedure for the micro-scale NEMD data

53We report here the details about the fitting of micro-scale data that we performed using Gaussian Process Regression (GPR). Since some choices are involved in the procedure, it seems appropriate to give a brief account of ours. GPR is a Bayesian approach to regression based on machine learning techniques. The fitting is done through a Gaussian stochastic process f (x; w) that evolves along the variable x and depends on a list of hyper-parameters w. The observed data are a finite number N of pairs (x i , y i ) N i=1 . The functional form of the Gaussian process is specified by its mean and covariance functions,

54, where E denotes the expected value. A fundamental feature of GPR is that it does not produce a definite value of the fitting parameters w, but considers them random variables and seeks to determine suitable mean and variance for their distribution. This is achieved by an iterative optimization that takes into account the likelihood of the parameters distributions given the knowledge of the observed data [33].

55What one needs to specify is the type of mean and covariance functions to be used for the GPR. Typical choices for the former are polynomial functions of x with coefficients given by w, while for the latter are Radial Basis Functions

56with a set of two hyper-parameters w = (σ, l), or the Matérn covariance of degree ν given by

57where Γ is the Euler gamma function and K ν is the modified Bessel function of the second kind. In our treatement, we took as x variable the quantityε or log 10 (ε), as y variable we took η, log 10 (η), or λ 3 . We tested regressions with mean function zero, constant, or polynomial up to degree four and, for the covariance function, RBF or Matérn kernel of degree up to 5 and picked the combinations that give the best results after optimization.

B Multi-scale coupling in the code

58The purpose of this section is to present the portion of code that implements the multi-scale coupling in the context of an otherwise standard Finite Element simulation of the flow equations (see [24] for an introduction to the library FEniCS). The peculiarity of our method concerns the integration of NEMD data with the continuum solver and the construction of the stress tensor based on the general representation (4). In our code, numpy arrays contain the interpolated curves η sh , λ 3,sh and η ext , while λ 3,ext is simply zero. In particular, the first column of the array S contains the values ofε on which the Carreau function or GPR is sampled and the second column the corresponding expected values of η sh . For an efficient use of those data in the stress computation, we transform them in projections on a Finite Element space defined on a one-dimensional mesh, the nodes of which are given by the sampled values ofε. Considering, for instance, the curve η sh , it becomes the function etas in the space E of P 1 elements defined on the mesh mesh_etas. Its construction is performed with the following lines of code. Similar commands are used to define the functions etae and lambda3s that represent η ext and λ 3,sh .

591 # 1D mesh for eta_sh 2 3 import numpy as np 4 from mshr import * The second portion of code relevant to the multi-scale coupling is the local computation of the kinematic parametersε and β 3 and the reconstruction, at each time step, of the spatial profile of the stress coefficients η and λ 3 by means of the material functionsη(ε, β 3 ) andλ 3 (ε, β 3 ). This is accomplished through the following definitions, where mesh is the two-dimensional triangular mesh defined on the flow domain, and u is a three-component variable containing the velocity and pressure fields. 1 from fenics import * . dx (0)) **2+( u [1]. dx (1))**2) +0.25*( u [1]. dx (0)+u[0]. dx (1))**2) At each time step, we need to compute the new stress coefficients based on the velocity field u_n obtained in the previous step. These will be used to update the stress. To this end, we apply the interpolation between simple shear and extensional data according to (5)-(6).

Introduction

60Modelling and computational simulation of non-Newtonian fluids is a challenging problem, since these fluids exhibit complex effects, such as shear thinning or thickening, viscoelasticity or flow-induced phase separation. A detailed analysis of the rheology of complex fluids can be obtained by particle-based simulations. Clearly, such micro-scale description is accurate but computationally very expensive and cannot be applied to engineering-scale problems. Consequently, new mathematical algorithms and hybrid multi-scale approaches have been proposed in recent years.

61In the literature, we can find several hybrid models combining particle dynamics with a macroscopic continuum model, such as the heterogeneous multi-scale methods [7,10,9,12,16,34], the triple-decker atomistic-mesoscopic-continuum method [14,15], the seamless multi-scale methods [8,11,13], the equationfree multi-scale methods [22,21,20] or the internal-flow multi-scale method [1,2]. In [28] software requirements and design principles are presented and illustrated for a prototype coupling between molecular dynamics and Lattice Boltzmann methods. Note that, in general, hybrid multi-scale approaches are successful when processes occurring on a small scale are only loosely coupled with the large-scale behavior, that is, in the presence of an effective scale separation. In keeping with this, our method is applicable when the local flow conditions experienced by a fluid element change on a much larger timescale than the microscopic relaxation time necessary to achieve a statistically steady state of the molecular conformation and interactions.

62The aim of this paper is to illustrate a new heterogeneous multi-scale method for the simulation of flows of complex fluids in generic geometries and different conditions of motion. We extend and generalize the idea presented in [32], where a heterogeneous multi-scale method is developed for polymeric solutions subjected to simple shear flows. Simple shear is very well investigated for it is more easily realized in experiments than other flows. It provides fundamental information that is often sufficient to characterize simple fluids. However, complex fluids show a molecular structure that is able to change with respect to different conditions of motion, geometries, but also time scales and deformation rates. Therefore, to retrieve important rheological information about the stress response of such fluids, their behavior is studied under conditions of flow different from steady simple shear, for example extensional motions, startup flows and oscillating shear [27]. Moreover, it is also fundamental, for these types of materials, to consider flows in complex geometries that contain holes, barriers, contractions or other irregular features, because in close proximity of these structures the fluid is subject to local motions that are not equivalent to simple shear and can manifest some unexpected behavior.

63We focus our efforts on the development of a method to link the micro-scale rheological information, available from simulations in different local flow types, to macro-scale flows in complex geometries. The main aim of this work is to show that it is necessary to correctly take into account the local flow type, which plays an important role in modifying the stress response in non-viscometric flows of non-Newtonian fluids featuring a flow-type dependent rheology, such as polymeric fluids. While simulations based on constitutive assumptions do take into account, by construction, the possible flow type dependence incorporated at the level of constitutive laws, multi-scale methods for fluid mechanics application has so far considered simple shear flows as the only source of information for the micro-to-macro coupling. With our approach, we overcome this severe limitation. The method is applied to planar flows, but it can be extended to more general three-dimensional flows. The most challenging task for such an extension will be to implement MD simulations under arbitrary local flow conditions. The paper is organized in the following way. Section 2 discusses the essential question that arises in building a heterogeneous multi-scale method. Namely, how micro-and macroscopic models are linked together. Section 3 is devoted to the description of micro-scale simulations with an emphasis on the decomposition of the average stress tensor and the reconstruction of data-driven material functions. For the macroscopic simulation of incompressible flows we use, as described in Section 4, a numerical method based on a semi-implicit time evolution scheme and mixed P 2 -P 0 finite elements for the approximation of the velocity-pressure pair under the incompressibility constraint. Results of numerical simulations obtained by our heterogeneous multi-scale method in different geometries are presented in Section 5. The paper is closed by Section 6 with an outlook on future research.

Link between micro-scale data and macro-scale simulations

64At the heart of our proposal there is the understanding that the local kinematics of a generic planar flow must be identified by at least two parameters, one measuring the speed of the deformation and the other measuring the local flow type (see [25,Chapter 1.4] for a discussion of this point). We introduce the symmetrized gradient D ≡ 1 2 (∇u + ∇u T ) of the velocity field u and, for the case of planar flows in which e 3 is normal to the flow plane, we can define the kinematic parameters |ε| ≡ tr D 2 2 and

65While there is ample agreement about measuring the deformation rate in generic situations by means ofε, different choices can be made for the flow-type parameter, depending on the type of material response that we envision (see [18], Sec. III). Here we choose β 3 for its simplicity and we stress that, to make it a frame-indifferent parameter, we consider it as measured relative to the vanishing spin of a fixed inertial frame of reference. In other contexts, different choices may be appropriate (such as the relative rotation rate proposed by Schunk and Scriven [31]), but the structure of the scheme that we are going to present remains the same.

66The local kinematic parametersε and β 3 are the macro-scale input of micro-scale simulations that will in turn give an ensemble-averaged stress tensor σ. To be able to use the micro-scale information encoded in σ we must express it in a form that is independent of the coordinates, because coordinates that are chosen for computational convenience cannot always be coherent when we pass from the micro-to the macro-scale simulation. We can achieve this independence by decomposing the stress on an orthogonal tensorial basis built upon D (see [18] for details and significance of this decomposition). For the case of planar incompressible flows, we have

67where I is the identity tensor and

68The coefficients of the linear decomposition (1) represent a pressure, a generalized viscosity and a reorientation factor related to normal stress differences and can be retrieved from the computational data in any coordinates by computing

69Here the double scalar product and the tensorial norm are defined by

70For the sake of clarity, we indicate withη andλ 3 the two material functions of the kinematic parameters (ε, β 3 ), reconstructed by sampling the two-dimensional parameter space. In this way, we obtain from computational rheological measurements the constitutive expression

71for the stress tensor, that can be used in performing the macro-scale continuum simulations. There is no need to define a pressure function because it is determined, at the macro-scale, as the Lagrange multiplier of the incompressibility constraint.

Micro-scale simulation

72The NEMD simulation at the micro-scale is performed using LAMMPS [30, lammps.sandia.gov]. We consider both monomeric and polymeric aggregates in a three-dimensional computational domain with periodic boundary conditions and undergoing two different planar flows: simple shear and extensional flow. The average velocity field is imposed by suitably deforming the computational box and the canonical ensemble statistics of the velocity fluctuations is achieved via the classical Nosé-Hoover thermostat [17]. For the case of simple shear we use the LAMMPS command fix deform in conjunction with the SLLOD algorithm [5], while the extensional flow is treated by means of the UEF package [29]. The latter implements boundary conditions developed by Dobson [6] and Hunt [19], that are an extension of the boundary conditions of Kraynik and Reinelt [23]. We will discuss results for monomers, N pol = 1, and polymers, N pol = 20, where N pol is the number of monomers per molecule.

Interaction potentials

73We model polymers as bead-spring systems with two types of interaction potential. The first one is active between each pair of monomers and is the Weeks-Chandler-Andersen (WCA) potential, the repulsive part of a Lennard-Jones potential with minimum energy − when the centers of the beads are at distance r = 6 √ 2σ:

74The second one, only active between successive monomers in a polymeric chain, is the Finitely Extensible Nonlinear Elastic (FENE) potential

75with K the elastic constant and R 0 the maximum extent of the bonds. Figure 1: The monomeric fluid displays almost no rate dependence and very little flow-type dependence of the stress coefficients, while the polymeric fluid features rate dependence and a strong flow-type dependence. We compare the NEMD data for the stress coefficients η (top) and λ 3 (bottom) againstε obtained for the monomeric case with N pol = 1 (left) and the polymeric case N pol = 20 (right) under simple shear (circles and black dashed curves) and planar extension (diamonds and red solid curves). In the latter case, λ 3 fluctuates around zero, that is the expected value based on symmetry considerations. The presence of a strong flow-type dependence for the polymeric fluid is a key feature, originated by the different conformations of the long molecules. Fitting curves are obtained as described in the text.

Average stress coefficients

76We considered values of the deformation rateε ranging from 0.001 s −1 to 1 s −1 . For each value ofε we performed 21 simulations with different initial configurations of the particles. At each time, the average stress given as output by LAMMPS is projected onto the basis tensors through the formulae (3) and these projections are averaged over time. Finally, a mean over all initial configurations is taken. Figure 1 presents the data obtained for the generalized viscosity η and the reorientation factor λ 3 . By fitting those data with Carreau and power functions we obtain, for the monomeric case with N pol = 1, the curves

77For the polymeric case with N pol = 20, the Gaussian Process Regression method (see Appendix A) was used to obtain the fitting curves. By comparing the results obtained under simple shear and planar extension for N pol = 1 and N pol = 20, we find that the former fluid displays almost no rate dependence and very little flow-type dependence of the stress coefficients, while the latter features rate dependence and a strong flow-type dependence ( Figure 1). The statistics of interaction between monomers in the two types of flow does not differ significantly, leading to a quasi-Newtonian rheology. On the contrary, the fact that polymer chains are kept in an elongated state by extensional flows, while they tend to tumble and keep a spherical shape in simple shear, generates a richer phenomenology. In fact, the shear-thinning trend displayed in simple shear is qualitatively similar to that of monomeric fluids, while we find an opposite trend-a shear-thickening behavior-in extensional flows at small deformation rates, followed by a non-monotonic behavior of the viscosity. The elastic effects generated by the bonds are crucial in this case and give rise, in simple shear, to the normal stress differences associated with the coefficient λ 3 , also featuring a non-monotonic curve.

78The direct connection between the statistics of chain conformation in the polymeric case and the observed rheology can be evinced from the probability distribution, presented in Figure 2, of the normalized radius of gyration R g and asphericity α defined as follows. Let the components of the 3 × 3 gyration tensor be

79with m i the mass of the i-th monomer, r i its position, M = i m i , and r cm the center of mass of the polymeric chain. With R 0 the effective monomer radius, we set

80Moreover, the asphericity is given by

81where a 1 ≤ a 2 ≤ a 3 are the eigenvalues of the gyration tensor R. At low deformation rate, the distributions obtained in simple shear and extensional flows are almost identical (blue curves in Figure 2) because the chains are equally and mildly stretched by the imposed flow. Asε grows larger, the extensional flow distributions feature a single peak that is progressively shifted rightward, toward more stretched configurations. On the other hand, in simple shear we notice a broadening of the distribution eventually leading to a doubly peaked shape (red curves in Figure 2). This indicates that chains spend roughly half of the time in a stretched configuration while frequently going back to a coiled configuration. In this very different microscopic behavior we find the origin of the strong flow-type dependence of the viscosity at largerε.

Data-driven material functions

82Ideally, we would like to perform micro-scale simulations with many values ofε and β 3 , since flows in generic geometries can easily feature variations of the flow type with β 3 ranging from minus to plus infinity and values ofε that cover many orders of magnitude. The implementation of simulation algorithms for mixed flows different from simple shear and planar extension is a nontrivial task that will be addressed in future works, but we still need, for our macro-scale simulations, a suitable definition of material functions that covers the whole range of kinematic parameters. We thus apply simple extrapolation strategies to build material functions out of the available computational data.

83Specifically, we extend the fitted curves η sh (ε), η ext (ε), λ 3,sh (ε) and λ 3,ext (ε) out of their natural domains by taking constant values. Then we set

84that is an even function of β 3 with η ext (ε) =η(ε, 0) and η sh (ε) =η(ε, 1), and

85that is an odd function of β 3 and such that λ 3,ext (ε) =λ 3 (ε, 0) ≈ 0 and λ 3,sh (ε) =λ 3 (ε, 1). These operations in combination with (4) allow us to build a complete set of data for the stress tensor as a function ofε and β 3 .

Macro-scale simulation

86We consider the flow of an incompressible fluid with constant density ρ and velocity vector u. From the macroscopic point of view the continuum description leads to the conservation of mass and the balance of linear momentum. In the incompressible case, they translate into the following partial differential equations on the domain Ω:

87Here σ denotes the Cauchy stress tensor and p the pressure field. Equation (7) expresses the incompressibility constraint. We partition the boundary of the domain as disjoint union of inlet Γ in , outlet Γ out , and solid walls Γ w , so that ∂Ω = Γ in ∪ Γ out ∪ Γ w . As usual, n is the outward unit normal to ∂Ω.

88A weak formulation of the problem is retrieved by multiplying equation (8)

89and integrating over Ω. By applying Green's formula, we obtain the integral equation

90Moreover, (7) can be multiplied by a scalar test function q ∈ L 2 0 (Ω) = g ∈ L 2 (Ω) : Ω g = 0 and integrated over Ω to give

91We decompose the Cauchy stress tensor in spherical and deviatoric parts by introducing the traceless extra stress τ such that σ = −(p +p)I + τ, wherep ∈ L 2 0 (Ω) is a given pressure field used to impose a chosen pressure gradient from inlet to outlet. On top of the Dirichlet boundary conditions for u on Γ w we assume a form of periodicity for u and p, requiring that they take the same values on Γ in and Γ out . Thanks to the independence of the test functions v and q, we can take the sum of (9) and (10) and substitute the expression for σ to obtain the complete weak formulation of the problem:

92Find u ∈ L 2 (R + ; H 1 Γ w (Ω)) and p ∈ L 2 (R + ; L 2 0 (Ω)), such that for any suitable test functions v and q we have

93Equation (11) must be completed with suitable initial conditions for the velocity field, that we will assume to vanish identically at time t = 0. To exploit the reflection symmetry of some domains, we will consider a fictitious boundary Γ c corresponding to the symmetry axis. On this boundary we will assume that the normal component of the velocity field and the tangential component of the traction τn vanish. For the time integration of (11) we apply a semi-implicit Euler scheme. In particular, the nonlinear convective term is approximated explicitly, the rest is approximated implicitly. This approximation is suitable to simulate flows at sufficiently low Reynolds number. Consequently, we have

94with bilinear forms b(u, q) := − Ω q∇·u and a(u, v) := Ω τ(u) : ∇v. Note that the latter is already linearized since the (nonlinear) material functions in (4) are computed using u n . For each time step, Equation (12) is discretized in space and solved, in a standard way, by means of mixed finite elements P 2 -P 0 for the approximation of the velocity-pressure pair, which are known to satisfy the Ladyzhenskaya-Babuška-Brezzi inf-sup condition for a stable solution of the associated saddle-point problem [3]. The numerical method is implemented within the Python library FEniCS [26] and some details pertaining the micro-to-macro coupling through the dynamic reconstruction of the extra stress are given in Appendix B.

Numerical results for different geometries

95The aim of this section is to demonstrate the robustness and effectiveness of our heterogeneous multi-scale method by presenting the results of simulations in three different planar geometries: flows in a straight Figure 3: Comparison of the horizontal velocity profile u x , local deformation rateε, and viscosity η for the flow in a straight channel computed by our multi-scale method with a reference Newtonian solution. In the case N pol = 1, the non-Newtonian solution is extremely close to the Newtonian one, as expected from the mild rate dependence of the viscosity and the small values of λ 3 . In the case N pol = 20, we observe a much larger deviation with a shear-thinning character expected from the rate dependence of the viscosity. channel, through a 4:1 contraction, and past a deep hole. These are paradigmatic geometries frequently used to test the non-Newtonian behavior of fluid models [4].

Channel flow

96The multi-scale method is firstly tested on the classical case of a planar channel flow. The total length of the channel is L = 5 m along the x-axis and the system width is W = 2 m along the y-axis. Exploiting the reflection symmetry of the problem, we discretized only the upper half of the channel on a mesh with 100 triangular elements along the x-axis and 20 elements along the y-axis, for a total of 4000 triangles in the entire computational domain. On the fictitious boundary that corresponds to the center of the channel we impose a vanishing vertical velocity and a vanishing normal traction to respect the reflection symmetry of the problem. We consider a fluid with unit density and drive the flow by imposing a constant horizontal pressure gradient C = 1 Pa/m. As for the velocity field u, we assume periodic boundary conditions so that the velocity at inlet and outlet is the same. The time step is ∆t = 1 × 10 −3 s. We let the system evolve up to the time T = 2 s to reach a steady state.

97The flow type is everywhere equivalent to that of a simple shear. Indeed, this is a viscometric flow with β 3 = 1 in the top half of the domain and β 3 = −1 in the other half. A discontinuity would appear at the midline of the channel consistent with the fact that β 3 is not defined forε = 0. The homogeneity of the flow type makes the flow-type dependence of the stress tensor irrelevant. To assess the importance of non-Newtonian effects, we compare the solution obtained from the multi-scale approach with the analytical solution of a reference Newtonian model, represented by the classical stress-strain relation withη constant. We takeη = 1.7 Pa s for N pol = 1 andη = 10 Pa s for N pol = 20, corresponding to the zero-rate limit of the interpolated shear viscosity from our NEMD simulations. The comparison of velocity, deformation rate, and viscosity profiles is reported in Figure 3. In the case N pol = 1 the non-Newtonian solution is extremely close to the Newtonian one, as expected from the mild rate dependence of the viscosity and the small values of λ 3 . In the case N pol = 20, we observe a much larger deviation that is small only around the center of the channel, where the shear rate vanishes and the viscosity approaches that of the reference Newtonian model.

98Due to the non-uniformity of the viscosity in the development of the flow and in its steady state, the characterization of the flow by means of dimensionless quantities such as the Reynolds number is not straightforward. Nevertheless, we can identify the range of local parameter values as follows. We take the channel width W as reference length and P = CW as reference pressure drop. The local Reynolds number is then given by

99Another important dimensionless quantity is the reorientation angle ϕ, such that

100which measures the rotation of the stress eigenvectors with respect to the eigenvectors of D. This geometric information is precisely the meaning of the first normal stress difference in simple shear flows, extended to generic local flows by the definition of λ 3 and η [18].

101In the monomeric case, we have η min = 1.6 Pa s and η max = 1. mixed rotational flow near the corners of the domain. The spatial non-uniformity of the flow type must be taken into account to obtain a precise macro-scale description of the fluid motion. To show this, we compare the prediction of the full non-Newtonian model with that of a modified non-Newtonian model, wherein the flow-type dependence is artificially suppressed. Specifically, β 3 is replaced by the function sign(β 3 ). In this way, only the micro-scale data obtained in simple shear (i.e., β 3 = ±1) are used, but the results cannot properly reflect the fluid behavior.

Flow through a contraction

102We discuss results obtained with a channel of length L = 5 m and maximum width W = 2 m, only in the polymeric case N pol = 20, with time step ∆t = 10 −3 , letting the system evolve to reach a steady state for T = 0.2 s. We can appreciate the time convergence to the steady solution by looking at the evolution of the flow rate Q through vertical sections of the domain, reported in Figure 4, left panel. The discretization employs an unstructured triangular mesh with average diameter of the triangles h ≈ 0.03 m. The mesh convergence of the multi-scale method is assessed by considering the L 2 norm of the difference between solutions obtained with mesh parameter h and 2h. From the data reported in Figure 4, right panel, we see that the incremental correction scales linearly in h, thus showing convergence of our simulation.

103The pressure gradient that drives the flow is C = 0.3 Pa/m. The velocity field u is assumed periodic so that it is matched at inlet and outlet and, to exploit symmetry and compute the numerical solution only in the upper half of the domain, we use the same conditions as in the straight channel simulation, namely, vanishing vertical velocity and vertical traction at the center of the channel. The flow is laminar with the characteristic increase of horizontal velocity u x in correspondence of the contraction. The pressure gradient is concentrated along the narrower portion of the domain and features oblique isolines due to the presence of normal stress differences in that region ( Figure 5). The non-uniformity of the deformation rateε and of the flow-type parameter β 3 has a strong influence on the local values of η, that range from 3.8 Pa s to 13 Pa s in the contracting region, and λ 3 , that range from −4 Pa s to 4 Pa s, considering also the lower half of the domain (see Figure 6). From these values and taking now W/4 as reference length, we can estimate Re ∈ [0.015, 0.05] and ϕ ∈ [−23.5, 23.5] degrees.

104In this complex flow, the flow type measured by the parameter β 3 varies significantly through the domain (Figure 6b), ranging from pure extension (β 3 = 0) to simple shear (|β 3 | = 1) to more rotational flows (|β 3 | > 1). Regions of mixed and extensional motion cover a major part of the domain, going well within the contraction. Since the viscosity in the full non-Newtonian model is a function ofε and β 3 , the effect of the flow type is clearly dominant in determining its value. The importance of correctly embedding the flow-type dependence in the multi-scale model can be highlighted by comparing the prediction of the full non-Newtonian model with that obtained from the modified non-Newtonian model (Figure 7). The viscosity in the modified model presents a very different profile in the extensional and mixed flow regions, where it happens to decrease instead of increasing, as predicted by the correct method and in line with the extensional rheology of the polymeric case. This has an immediate effect on the velocity profile, that features a more rapid flow and a clear asymmetry, due to the overemphasized role of the normal stress differences related to λ 3 in the modified model.

Flow past a deep hole

105In this section we analyze a second example of flow in a complex geometry. We consider a channel of length L = 5 m and width W = 1 m. At a distance of 1.75 m from the inlet we find the hole of width W hole = 1.5 m and depth H = 5 m. The discretization employs an unstructured triangular mesh with average diameter of the triangles h ≈ 0.06 m. The time step is ∆t = 10 −3 and we let the system evolve to reach a steady state for T = 0.4 s (see Figure 4, left panel). We present simulation results for the polymeric case N pol = 20, driving the flow with an outlet-to-inlet pressure gradient C = 0.3 Pa/m. The velocity field is again assumed to be periodic, and hence equal at inlet an outlet.

106The flow past a deep hole features a complex distribution of local flow types with a consequent variation Figure 7: The dependence of the stress on the local flow type must be taken into account to correctly predict the fluid behavior. We compare the steady-state viscosity η and horizontal velocity u x nearby the contraction, computed with (a,c) the full non-Newtonian model and (b,d) the modified one. The viscosity in the modified model presents a very different profile in the extensional and mixed flow regions, nearby entrance and exit of the restriction. This influences the velocity field, which features a clear asymmetry due to the overemphasized role of normal stress differences in the modified model. of the material response. Also in this case, a comparison of the viscosity and the horizontal velocity obtained with the full and the modified non-Newtonian models (Figure 8) confirms the need for a correct treatment of flow-type-dependent rheologies. The viscosity appears to be significantly different right above the deep hole. This has a mild but noticeable influence on the flow. The velocity depression is shifted rightward and, since the viscosity is lower, the flow is globally faster with the modified model, as seen also from the values of the flow rate reported in Figure 4.

Conclusions and outlook

107We have developed and tested a heterogeneous multi-scale method for the simulation of flows in arbitrary geometries for complex fluids by means of a data-driven reconstruction of the stress tensor. This is based on employing the results of micro-scale simulations according to a general decomposition of the stress [18] that allows to correctly align its different components in flows that display a broad spectrum of local flow types. We have shown that a proper treatment of the flow-type dependence, that was missing in previous multi-scale methods exclusively focused on simple shear rheology, is essential to capture the macroscopic dynamics.

108In our case, the micro-scale simulations are non-equilibrium molecular dynamics simulations of polymeric chains with internal FENE bonds and an effective Weeks-Chandler-Andersen interaction potential. Nevertheless, our coupling scheme does not rely on a specific simulation strategy neither at the micro-scale nor at the macro-scale. Indeed, we have chosen to implement the macroscopic continuum simulation with a well-established mixed finite element method based on P 2 -P 0 elements for the velocity-pressure pair to deal with the incompressibility constraint and a semi-implicit time integration scheme, but any other computational method to solve for the continuum evolution can in principle be employed.

109Polymeric fluids are well known to display a significant degree of flow-type dependence in their rheo- We performed micro-scale simulations imposing simple shear and planar extension as average kinematic conditions under which we evaluate the stress response. From these, we constructed the rheological functions in mixed flows by means of a simple interpolation and extrapolation procedure. In view of the impact on macroscopic flows in non-viscometric geometries of the local flow conditions, we plan to expand the micro-scale simulations to obtain data under mixed and rotational flow conditions. This will require the implementation of a suitable generalization of the Kraynik-Reinelt boundary conditions.

110In fluids composed by molecules with longer microscopic relaxation times, it may happen that the local flow type experienced by a fluid element changes fast along streamlines. The method that we presented can in principle be extended to take this into account by devising MD simulations for which the flow type of the imposed background motion is slowly varying. The macroscopic material functions would then depend also on the derivative along streamlines of the flow-type parameter. Other directions for future work are the testing of our method in parameter ranges where elastic instabilities may be observed, that may lead to the presence of highly oscillatory material coefficients in space and time, and the implementation of an on-the-fly coupling between macro-scale and micro-scale simulations, to be able to sample the space of kinematic conditions in a problem-driven fashion. A Fitting procedure for the micro-scale NEMD data

111We report here the details about the fitting of micro-scale data that we performed using Gaussian Process Regression (GPR). Since some choices are involved in the procedure, it seems appropriate to give a brief account of ours. GPR is a Bayesian approach to regression based on machine learning techniques. The fitting is done through a Gaussian stochastic process f (x; w) that evolves along the variable x and depends on a list of hyper-parameters w. The observed data are a finite number N of pairs (x i , y i ) N i=1 . The functional form of the Gaussian process is specified by its mean and covariance functions,

112, where E denotes the expected value. A fundamental feature of GPR is that it does not produce a definite value of the fitting parameters w, but considers them random variables and seeks to determine suitable mean and variance for their distribution. This is achieved by an iterative optimization that takes into account the likelihood of the parameters distributions given the knowledge of the observed data [33].

113What one needs to specify is the type of mean and covariance functions to be used for the GPR. Typical choices for the former are polynomial functions of x with coefficients given by w, while for the latter are Radial Basis Functions

114with a set of two hyper-parameters w = (σ, l), or the Matérn covariance of degree ν given by

115where Γ is the Euler gamma function and K ν is the modified Bessel function of the second kind. In our treatement, we took as x variable the quantityε or log 10 (ε), as y variable we took η, log 10 (η), or λ 3 . We tested regressions with mean function zero, constant, or polynomial up to degree four and, for the covariance function, RBF or Matérn kernel of degree up to 5 and picked the combinations that give the best results after optimization.

B Multi-scale coupling in the code

116The purpose of this section is to present the portion of code that implements the multi-scale coupling in the context of an otherwise standard Finite Element simulation of the flow equations (see [24] for an introduction to the library FEniCS). The peculiarity of our method concerns the integration of NEMD data with the continuum solver and the construction of the stress tensor based on the general representation (4). In our code, numpy arrays contain the interpolated curves η sh , λ 3,sh and η ext , while λ 3,ext is simply zero. In particular, the first column of the array S contains the values ofε on which the Carreau function or GPR is sampled and the second column the corresponding expected values of η sh . For an efficient use of those data in the stress computation, we transform them in projections on a Finite Element space defined on a one-dimensional mesh, the nodes of which are given by the sampled values ofε. Considering, for instance, the curve η sh , it becomes the function etas in the space E of P 1 elements defined on the mesh mesh_etas. Its construction is performed with the following lines of code. Similar commands are used to define the functions etae and lambda3s that represent η ext and λ 3,sh .

1171 # 1D mesh for eta_sh 2 3 import numpy as np 4 from mshr import * The second portion of code relevant to the multi-scale coupling is the local computation of the kinematic parametersε and β 3 and the reconstruction, at each time step, of the spatial profile of the stress coefficients η and λ 3 by means of the material functionsη(ε, β 3 ) andλ 3 (ε, β 3 ). This is accomplished through the following definitions, where mesh is the two-dimensional triangular mesh defined on the flow domain, and u is a three-component variable containing the velocity and pressure fields. 1 from fenics import * . dx (0)) **2+( u [1]. dx (1))**2) +0.25*( u [1]. dx (0)+u[0]. dx (1))**2) At each time step, we need to compute the new stress coefficients based on the velocity field u_n obtained in the previous step. These will be used to update the stress. To this end, we apply the interpolation between simple shear and extensional data according to (5)-(6).

참고문헌 34건

  1. The Structure and Rheology of Complex Fluids 1998
  2. Mixed and Hybrid Finite Element Methods 2011
  3. Periodic boundary conditions for the simulation of uniaxial extensional flow of arbitrary duration Molecular Simulation · Taylor & Francis · 2015 10.1080/08927022.2015.1051043
  4. Understanding Molecular Simulation: From Algorithms to Applications 2001
  5. Analysis of the heterogeneous multiscale method for gas dynamics Methods and Applications of Analysis · International Press of Boston, Inc. · 2004 10.4310/maa.2004.v11.n4.a7
  6. Periodic boundary conditions for long-time nonequilibrium molecular dynamics simulations of incompressible flows The Journal of Chemical Physics · American Institute of Physics · 2014 10.1063/1.4901276
  7. Hybrid model for combined particle and continuum dynamics EPL (Europhysics Letters) · Institute of Physics · 2000 10.1209/epl/i2000-00434-8
  8. The Heterognous Multiscale Methods Communications in Mathematical Sciences · International Press of Boston · 2003 10.4310/cms.2003.v1.n1.a8
  9. Fluid simulations with atomistic resolution: a hybrid multiscale method with field-wise coupling Journal of Computational Physics · Elsevier BV · 2013 10.1016/j.jcp.2013.08.022
  10. Seamless multiscale modeling via dynamics on fiber bundles Communications in Mathematical Sciences · International Press of Boston · 2007 10.4310/cms.2007.v5.n3.a7
  11. Numerical Simulation of Non-Newtonian Flow Journal of Applied Mechanics · ASM International · 1985 10.1115/1.3169019
  12. Fast Parallel Algorithms for Short-Range Molecular Dynamics Journal of Computational Physics · Elsevier BV · 1995 10.1006/jcph.1995.1039
  13. Effect of Shear History on the Morphology of Immiscible Polymer Blends Macromolecules · American Chemical Society · 1997 10.1021/ma9617330
  14. Triple-decker: Interfacing atomistic–mesoscopic–continuum flow regimes Journal of Computational Physics · Elsevier BV · 2008 10.1016/j.jcp.2008.10.024
  15. Extensional motions of spatially periodic lattices International Journal of Multiphase Flow · Elsevier BV · 1992 10.1016/0301-9322(92)90074-q
  16. Hybrid molecular–continuum methods: From prototypes to coupling software Computers & Mathematics with Applications · Elsevier BV · 2013 10.1016/j.camwa.2013.07.006
  17. Equation-Free, Coarse-Grained Multiscale Computation: Enabling Mocroscopic Simulators to Perform System-Level Analysis Communications in Mathematical Sciences · International Press of Boston · 2003 10.4310/cms.2003.v1.n4.a5
  18. A general strategy for designing seamless multiscale methods Journal of Computational Physics · Elsevier BV · 2009 10.1016/j.jcp.2009.04.030
  19. Dissipative particle dynamics simulation of depletion layer and polymer migration in micro- and nanochannels for dilute polymer solutions The Journal of Chemical Physics · American Institute of Physics · 2008 10.1063/1.2897761
  20. Seamless multiscale modeling of complex fluids using fiber bundle dynamics Communications in Mathematical Sciences · International Press of Boston · 2007 10.4310/cms.2007.v5.n4.a15
  21. Equation‐free: The computer‐aided analysis of complex multiscale systems AIChE Journal · Wiley · 2004 10.1002/aic.10106
  22. A simple, direct derivation and proof of the validity of the SLLOD equations of motion for generalized homogeneous flows The Journal of Chemical Physics · American Institute of Physics · 2006 10.1063/1.2192775
  23. Constitutive equation for modeling mixed extension and shear in polymer solution processing Journal of Rheology · American Institute of Physics · 1990 10.1122/1.550075
  24. A hybrid molecular–continuum method for unsteady compressible multiscale flows Journal of Fluid Mechanics · Cambridge University Press · 2015 10.1017/jfm.2015.83
  25. A Hybrid Particle-Continuum Method for Hydrodynamics of Complex Fluids Multiscale Modeling and Simulation · Society for Industrial and Applied Mathematics · 2010 10.1137/090774501
  26. DOLFIN ACM Transactions on Mathematical Software · Association for Computing Machinery · 2010 10.1145/1731022.1731030
  27. The heterogeneous multiscale method Acta Numerica · Cambridge University Press · 2012 10.1017/s0962492912000025
  28. Multiscale modeling and simulation for polymer melt flows between parallel plates Physical Review E · American Physical Society · 2010 10.1103/physreve.81.036308
  29. Equation-Free Multiscale Computation: Algorithms and Applications Annual Review of Physical Chemistry · Annual Reviews · 2008 10.1146/annurev.physchem.59.032607.093610
  30. Molecular simulation of flow-enhanced nucleation in <i>n</i>-eicosane melts under steady shear and uniaxial extension The Journal of Chemical Physics · American Institute of Physics · 2016 10.1063/1.4972894
  31. Molecular dynamics simulations in hybrid particle-continuum schemes: Pitfalls and caveats Computer Physics Communications · Elsevier BV · 2017 10.1016/j.cpc.2017.10.016
  32. A theoretical framework for steady-state rheometry in generic flow conditions Journal of Rheology · American Institute of Physics · 2018 10.1122/1.4986840
  33. Analysis of the heterogeneous multiscale method for elliptic homogenization problems Journal of the American Mathematical Society · American Mathematical Society · 2004 10.1090/s0894-0347-04-00469-2
  34. Solving PDEs in Python 2016 10.1007/978-3-319-52462-7