Partitioned multirate coupling schemes for the heat ...

1
Chair of Scientific Computing Department of Informatics Technical University of Munich References: [1] Keyes, D. E., McInnes, L. C., Woodward, C., Gropp, W., Myra, E., Pernice, M., ... Wohlmuth, B. (2013). Multiphysics simulations: Challenges and opportunities. International Journal of High Performance Computing Applications, 27(1), 4–83. [2] Cheung Yau, L. (2016). Conjugate Heat Transfer with the Multiphysics Coupling Library preCICE. Technical University of Munich. [3] Monge, A., & Birken, P. (2018). A multirate Neumann-Neumann waveform relaxation method for heterogeneous coupled heat equations, (submitted). [4] Rüth, B., Uekermann, B., Mehl, M., & Bungartz, H.-J. (2018). Time Stepping Algorithms for Partitioned Multi-Scale Multi- Physics. Proceedings of ECCM VI / ECFD VII, (submitted). [5] Bungartz, H.-J., Lindner, F., Gatzhammer, B., Mehl, M., Scheufele, K., Shukaev, A., & Uekermann, B. (2016). preCICE – A fully parallel library for multi-physics surface coupling. Comput. & Fluids, 141(Supplement C), 250–258. [6] Uekermann, B. (2016). Partitioned Fluid-Structure Interaction on Massively Parallel Systems. PhD Thesis. Technical University of Munich. [7] Uekermann, B., Bungartz, H.-J., Cheung Yau, L., Chourdakis, G., & Rusch, A. (2017). Official preCICE Adapters for Standard Open- Source Solvers. In Proceedings of the 7th GACM Colloquium on Computational Mechanics for Young Scientists from Academia. [8] Monge, A. (2018). Partitioned methods for time-dependent thermal fluid-structure interaction. PhD Thesis. Lund University. [9] Monge, A. A time-adaptive multirate Dirichlet-Neumann waveform relaxation method for heterogeneous coupled heat equations (in preparation). www.precice.org github.com/precice Partitioned multirate coupling schemes for the heat equation in preCICE Benjamin Rüth 1 , Azahar Monge 2 , Philipp Birken 2 , Benjamin Uekermann 1 , Miriam Mehl 3 1 {rueth,uekerman}@in.tum.de, Scientific Computing, Technical University of Munich 2 {azahar.monge,philipp.birken}@math.lu.se, Matematikcentrum, Lund University 3 [email protected], Simulation of Large Systems, University of Stuttgart Multirate partitioned multi-physics Motivation The efficient simulation of multi- physics phenomena is an important task in research and industry. Current- ly, there is a high demand for flexi- ble time stepping methods that allow to account for multirate characteristics (i.e. different resolution in time) of the different physical domains [1]. Shell and tube heat exchanger [2]. Our goal We look for an algorithm that supports high order multirate time stepping. On this poster two different multirate coupling schemes are presented and applied to a model problem [3,4]. Partitioned heat equation The partitioned heat equation is used as a mo- del problem: (ρ c p ) m u m t - λ m Δu m = 0, x Ω m u m = 0, x Ω. The material properties (λ m , (ρ c p ) m ) may differ, if different materials are used on the subdo- mains. We add coupling conditions at the inter- face Γ = Ω 1 Ω 2 : u 1 = u 2 , x Γ λ 1 u 1 n 1 = -λ 2 u 2 n 2 , x Γ The first coupling condition guarantees consis- tency of temperature u, the second consistency of heat flux q on Γ. Figure from [2]. Discretization Spatial discretization is realized through the application of FEM. We only consider uniform mes- hed that are matching at the coupling interface. Time stepping takes place inside a common time window T 0 , T f . Implicit Euler with constant timestep size Δ t m is used. Differing timestep sizes Δ t 1 6= Δ t 2 allow us to implement multirate time stepping for the two subdomains Ω 1,2 . preCICE The coupling library preCICE [5] is used for realization of the partitioned approach. preCICE follows a library approach that allows minimally invasive coupling, where the solvers are treated as black-boxes [6]. The solvers are extended by a simple adapter interfacing with the preCICE API, while implementation details of the solvers remain hidden [7]. preCICE is written in C++ and offers API bindings for different languages (Python, C, Fortran). in-house solver uid solver adapter structure solver libprecice coupling schemes data mapping ... ... communication time interpolation A Coupling Library for Partitioned Multi-Physics Simulations commercial solver solver OpenFOAM SU2 foam-extend Ateles (APES) Alya System Carat++ FASTEST CalculiX Code_Aster ANSYS Fluent COMSOL FEAP API in: C / C++ Fortran Python Black-box coupling with preCICE We use the following black-box solvers: D m accepts the temperature u Γ as a Dirichlet boundary condition, solves the heat equation on Ω m and returns the flux q Γ corresponding to the solution u m . N m accepts the flux q Γ as a Neumann boundary condition, solves the heat equation on Ω m and returns the temperature u Γ corresponding to the solution u m . For details refer to [8]. On basis of the solvers we implement the following coupling schemes using preCICE: Dirichlet-Neumann (DN) D 1 ( u k Γ ) = q k Γ adapter N 2 ( q k Γ ) = ˜ u k Γ adapter libprecice We use an underrelaxation scheme provided by preCICE to speed up convergence: u k+1 Γ = θ ˜ u k Γ +(1 - θ ) u k Γ Neumann-Neumann (NN) D 1 ( u k Γ ) = q k Γ,1 N 1 ( q k Γ,1 + q k Γ,2 ) = Ψ k 1 D 2 ( u k Γ ) = q k Γ,2 N 2 ( q k Γ,1 + q k Γ,2 ) = Ψ k 2 We implemented the following acceleration scheme in our adapter: u k+1 Γ = u k Γ - θ Ψ k 1 + Ψ k 2 For both coupling schemes we use an optimal underrelaxation parameter θ opt to speed up convergence [3, 9]. Remark: The analysis to determine θ opt only applies to the 1D, non-multirate case. However, we also use it for 2D multirate scenarios as an estimator (see [3]). Numerical Experiments We evaluate the performance of the two coupling schemes through the number of coupling iterations (k) needed to reduce the residual of u Γ below a certain threshold (tol). 1D without multirate We use this setup to validate our implementation of DN and NN coupling in preCICE: 1D heat equations on Ω 1,2 different material combinations on Ω 1,2 (Air-Steel, Air-Water, Water-Steel). use θ opt from [3] for NN and from [9] for DN. use non-multirate setup: MR1/1 (Δ t 1 = Δ t 2 = T f ) Obervations: Convergence after a single iteration for all tested material combinations and coupling schemes. Good agreement of preCICE implementation and reference implementation in pure Python. 2D with multirate 1 2 3 4 5 6 7 8 9 10 10 -9 10 -8 10 -7 10 -6 10 -5 10 -4 tol number of iterations k residual = max |u k-1 Γ - u k Γ | DN, MR5/5 NN, MR5/5 DN, MR5/2 NN, MR5/2 2D heat equations on Ω 1,2 materials combination Water-Steel use θ opt use multirate setups: - MR5/5 (Δ t 1,2 = T f /5) - MR5/2 (Δ t 1 = T f /5, Δ t 2 = T f /2) Obervations: Good convergence for identical timestep size, convergence degrades for NN if Δ t 1,2 differ. Good agreement of preCICE implementati- on and reference implementation. Conclusions & Outlook DN and NN multirate coupling schemes can be implemented in preCICE by extending the adapter correspondingly. For DN coupling the acceleration schemes of preCICE can be used, for NN coupling the relaxation scheme had to be implemented in the adapter. The proposed coupling schemes allow for multirate time stepping in preCICE. The use of Quasi-Newton acceleration schemes with multirate time stepping requires further research. A high order waveform relaxation approach as in [2,5] should be evaluated next.

Transcript of Partitioned multirate coupling schemes for the heat ...

Page 1: Partitioned multirate coupling schemes for the heat ...

Chair of Scientific ComputingDepartment of InformaticsTechnical University of Munich

References:

[1] Keyes, D. E., McInnes, L. C., Woodward, C., Gropp, W., Myra, E., Pernice, M., . . . Wohlmuth, B. (2013). Multiphysicssimulations: Challenges and opportunities. International Journal of High Performance Computing Applications, 27(1), 4–83.[2] Cheung Yau, L. (2016). Conjugate Heat Transfer with the Multiphysics Coupling Library preCICE. Technical University ofMunich.[3] Monge, A., & Birken, P. (2018). A multirate Neumann-Neumann waveform relaxation method for heterogeneous coupledheat equations, (submitted).[4] Rüth, B., Uekermann, B., Mehl, M., & Bungartz, H.-J. (2018). Time Stepping Algorithms for Partitioned Multi-Scale Multi-Physics. Proceedings of ECCM VI / ECFD VII, (submitted).

[5] Bungartz, H.-J., Lindner, F., Gatzhammer, B., Mehl, M., Scheufele, K., Shukaev, A., & Uekermann, B. (2016). preCICE – A fully parallellibrary for multi-physics surface coupling. Comput. & Fluids, 141(Supplement C), 250–258.[6] Uekermann, B. (2016). Partitioned Fluid-Structure Interaction on Massively Parallel Systems. PhD Thesis. Technical University of Munich.[7] Uekermann, B., Bungartz, H.-J., Cheung Yau, L., Chourdakis, G., & Rusch, A. (2017). Official preCICE Adapters for Standard Open-Source Solvers. In Proceedings of the 7th GACM Colloquium on Computational Mechanics for Young Scientists from Academia.[8] Monge, A. (2018). Partitioned methods for time-dependent thermal fluid-structure interaction. PhD Thesis. Lund University.[9] Monge, A. A time-adaptive multirate Dirichlet-Neumann waveform relaxation method for heterogeneous coupled heat equations (inpreparation).

www.precice.org github.com/precice

Partitioned multirate coupling schemes for the heatequation in preCICE

Benjamin Rüth1, Azahar Monge2, Philipp Birken2, Benjamin Uekermann1, Miriam Mehl31rueth,[email protected], Scientific Computing, Technical University of Munich

2azahar.monge,[email protected], Matematikcentrum, Lund [email protected], Simulation of Large Systems, University of Stuttgart

Multirate partitioned multi-physicsMotivationThe efficient simulation of multi-physics phenomena is an importanttask in research and industry. Current-ly, there is a high demand for flexi-ble time stepping methods that allowto account for multirate characteristics(i.e. different resolution in time) of thedifferent physical domains [1]. Shell and tube heat exchanger [2].Our goalWe look for an algorithm that supports high order multirate time stepping. On this poster twodifferent multirate coupling schemes are presented and applied to a model problem [3,4].

Partitioned heat equationThe partitioned heat equation is used as a mo-del problem:

(ρcp)m∂um

∂ t−λm∆um = 0, x ∈Ωm

um = 0, x ∈ ∂Ω.

The material properties (λm,(ρcp)m) may differ,if different materials are used on the subdo-mains. We add coupling conditions at the inter-face Γ = Ω1∪Ω2:

u1 = u2, x ∈ Γ

λ1∂u1

∂n1=−λ2

∂u2

∂n2, x ∈ Γ

The first coupling condition guarantees consis-tency of temperature u, the second consistencyof heat flux q on Γ.

Figure from [2].

DiscretizationSpatial discretization is realized through the application of FEM. We only consider uniform mes-hed that are matching at the coupling interface.

Time stepping takes place inside a common time window[T0,Tf

]. Implicit Euler with constant

timestep size ∆tm is used. Differing timestep sizes ∆t1 6= ∆t2 allow us to implement multirate timestepping for the two subdomains Ω1,2.

preCICEThe coupling library preCICE [5] is used for realization of the partitioned approach. preCICEfollows a library approach that allows minimally invasive coupling, where the solvers are treatedas black-boxes [6]. The solvers are extended by a simple adapter interfacing with the preCICEAPI, while implementation details of the solvers remain hidden [7]. preCICE is written in C++and offers API bindings for different languages (Python, C, Fortran).

in-housesolver

fluid solver

adap

ter

structuresolver

libprecice

coupling schemes

data mapping

. . .

. . .

communication

time interpolation

A Coupling Library for PartitionedMulti-Physics Simulations

commercialsolver

solve

r

OpenFOAMSU2foam-extend

Ateles (APES)Alya SystemCarat++FASTEST

CalculiXCode_Aster

ANSYS FluentCOMSOLFEAP

API in:C / C++FortranPython

Black-box coupling with preCICEWe use the following black-box solvers:

•Dm accepts the temperature uΓ as a Dirichlet boundary condition, solves the heat equation onΩm and returns the flux qΓ corresponding to the solution um.

•Nm accepts the flux qΓ as a Neumann boundary condition, solves the heat equation on Ωm

and returns the temperature uΓ corresponding to the solution um.

For details refer to [8]. On basis of the solvers we implement the following coupling schemesusing preCICE:

Dirichlet-Neumann (DN)

D1(uk

Γ

)= qk

Γ

adapter

N2(qk

Γ

)= uk

Γ

adapterlibprecice

We use an underrelaxation scheme providedby preCICE to speed up convergence:

uk+1Γ

= θ ukΓ+(1−θ)uk

Γ

Neumann-Neumann (NN)

D1(uk

Γ

)= qk

Γ,1

N1(qk

Γ,1+qkΓ,2

)= Ψk

1

D2(uk

Γ

)= qk

Γ,2

N2(qk

Γ,1+qkΓ,2

)= Ψk

2

We implemented the following accelerationscheme in our adapter:

uk+1Γ

= ukΓ−θ

k1+Ψ

k2

)For both coupling schemes we use an optimal underrelaxation parameter θopt to speed upconvergence [3, 9]. Remark: The analysis to determine θopt only applies to the 1D, non-multiratecase. However, we also use it for 2D multirate scenarios as an estimator (see [3]).

Numerical ExperimentsWe evaluate the performance of the two coupling schemes through the number of couplingiterations (k) needed to reduce the residual of uΓ below a certain threshold (tol).

1D without multirateWe use this setup to validate our implementation of DN and NN coupling in preCICE:

• 1D heat equations on Ω1,2• different material combinations on Ω1,2 (Air-Steel, Air-Water, Water-Steel).• use θopt from [3] for NN and from [9] for DN.• use non-multirate setup: MR1/1 (∆t1 = ∆t2 = Tf )

Obervations: Convergence after a single iteration for all tested material combinations andcoupling schemes. Good agreement of preCICE implementation and reference implementationin pure Python.

2D with multirate

1 2 3 4 5 6 7 8 9 10

10−9

10−8

10−7

10−6

10−5

10−4

tol

number of iterations k

resi

dual

=m

ax|u

k−1

Γ−

uk Γ| DN, MR5/5

NN, MR5/5DN, MR5/2NN, MR5/2

• 2D heat equations on Ω1,2

•materials combination Water-Steel

• use θopt

• use multirate setups:

−MR5/5 (∆t1,2 = Tf/5)

−MR5/2 (∆t1 = Tf/5, ∆t2 = Tf/2)

Obervations: Good convergence foridentical timestep size, convergencedegrades for NN if ∆t1,2 differ. Goodagreement of preCICE implementati-on and reference implementation.

Conclusions & Outlook•DN and NN multirate coupling schemes can be implemented in preCICE by extending the

adapter correspondingly.• For DN coupling the acceleration schemes of preCICE can be used, for NN coupling the

relaxation scheme had to be implemented in the adapter.• The proposed coupling schemes allow for multirate time stepping in preCICE.• The use of Quasi-Newton acceleration schemes with multirate time stepping requires further

research.• A high order waveform relaxation approach as in [2,5] should be evaluated next.