Predictive Engineering and Computational Sciences. A Brief Survey of Error Estimation and Adaptivity. Paul T. Bauman


 Anthony Campbell
 10 days ago
 Views:
Transcription
1 PECOS Predictive Engineering and Computational Sciences A Brief Survey of Error Estimation and Adaptivity Paul T. Bauman Institute for Computational Engineering and Sciences The University of Texas at Austin Mechanical and Aerospace Engineering State University of New York at Buffalo ICES August 14, 2013 P. T. Bauman Error Estimation and Adaptivity August 14, / 112
2 Objectives Course Objectives Scope Broad overview of error estimation techniques for estimating error in mathematical models adaptation strategies for controlling error Brief survey of some contemporary research areas Target Audience PhD students/postdocs with some exposure to numerical methods Limited functional analysis training Slides Slides are publicly available at: usc_uq2013_workshop_error_adaptivity_talk P. T. Bauman Error Estimation and Adaptivity August 14, / 112
3 Objectives Course Notes This is for you! Please stop me to ask questions Please stop me to have a discussion Please download the slides at your convenience Check the References I have chosen to pursue a breadth of topics instead of more depth in fewer topics I ve tried to provide a list of references for you to pursue your own study P. T. Bauman Error Estimation and Adaptivity August 14, / 112
4 Objectives Primary References Oden/Ainsworth Book on a posteriori error estimation [18] Bangerth/Rannacher lecture notes on adaptive finite elements [2] Carey Computational Grids book [10] Becker/Rannacher paper on optimal control approach to a posteriori error estimation [6] Oden/Prudhomme paper on modeling error [17] Excellent short courses by Don Estep available on his webpage: P. T. Bauman Error Estimation and Adaptivity August 14, / 112
5 Outline Outline Overview Preliminaries Error control through mesh adaptation Error estimation for discretized PDE s Global error estimators Adjointbased error estimators Modeling error estimation and model adaptivity Coupled Stokes/NavierStokes example Coupled particle/continuum multiscale model example Some available software Contemporary issues QoI challenges Unsteady problems Extending to UQ setting P. T. Bauman Error Estimation and Adaptivity August 14, / 112
6 Overview Uncertainty Quantification (UQ) Ideas UQ Means Many Different Things In the present context, we will have in the back of our minds Assessing the uncertainty of experimental data, typically through a data reduction model (data uncertainty) Determining the uncertainty of parameters of a mathematical model used in some engineering analysis (inverse analysis) Using uncertain parameters to ascertain the uncertainty in some quantity of interest (QoI) that determined by mathematical model (forward propagation) P. T. Bauman Error Estimation and Adaptivity August 14, / 112
7 Overview Uncertainty Quantification (UQ) Ideas UQ Means Many Different Things In the present context, we will have in the back of our minds Assessing the uncertainty of experimental data, typically through a data reduction model (data uncertainty) Determining the uncertainty of parameters of a mathematical model used in some engineering analysis (inverse analysis) Using uncertain parameters to ascertain the uncertainty in some quantity of interest (QoI) that determined by mathematical model (forward propagation) We are working in the context of mathematical models P. T. Bauman Error Estimation and Adaptivity August 14, / 112
8 Overview Mathematical Models What is a Mathematical Model? In scientific/engineering analyses, a mathematical model is typically a system of algebraic, ordinarydifferential, or partialdifferential equations, in space and/or time. Including boundary and initial conditions (often sources of uncertainty) P. T. Bauman Error Estimation and Adaptivity August 14, / 112
9 Overview Mathematical Models What is a Mathematical Model? In scientific/engineering analyses, a mathematical model is typically a system of algebraic, ordinarydifferential, or partialdifferential equations, in space and/or time. Including boundary and initial conditions (often sources of uncertainty) Examples Chemical kinetics (Algebraic) Nbody dynamics (ODE s) NavierStokes equations (PDE s) Boltzmann Equation (Integrodifferential equations) P. T. Bauman Error Estimation and Adaptivity August 14, / 112
10 Overview Errors We Always Incur Error Algebraic systems  error in linear/nonlinear solver ODE s/pde s  error in space/time discretization, error in linear/nonlinear solver P. T. Bauman Error Estimation and Adaptivity August 14, / 112
11 Overview Errors We Always Incur Error Algebraic systems  error in linear/nonlinear solver ODE s/pde s  error in space/time discretization, error in linear/nonlinear solver Control Your Error! We must always control our error Even more crucial to quantify the error in the context of UQ analyses If the error in solution of the mathematical model similar to the uncertainty, UQ analysis isn t very meaningful We will focus only on spatial discretization error (not time error or solver error) P. T. Bauman Error Estimation and Adaptivity August 14, / 112
12 Overview Error Estimation...in the Context of UQ Could try to treat discretization as an uncertain parameter and adopt other UQ strategies to estimate error uncertainty I ve heard of this idea, but have not seen it used so much This is not the pointofview I take Error is deterministic and we must simply set tolerances which are acceptable for the analysis at hand and use estimation and control strategies to meet that tolerance Many of the ideas discussed here are being adapted to estimate and control error in parameter space Hence, examining and understanding these ideas can bear fruit in new contexts P. T. Bauman Error Estimation and Adaptivity August 14, / 112
13 Overview Focus of this Shortcourse Error estimation of spatial discretizations in the context of PDE s: Briefly examine some classical error estimates Overview QoIbased error estimates and the adjoint problem Look at mesh adaptive strategies to control error Extensions to modeling error and modeling error estimation Extend ideas of QoIbased error estimation Adapting the model Some examples of current work in the field in adapting these ideas to parameter space P. T. Bauman Error Estimation and Adaptivity August 14, / 112
14 Preliminaries Notation Domain Ω D Model Problem u = f u = u0 u n = g in Ω on Ω D on Ω N Ω Ω N Image courtesy Benjamin S. Kirk, Roy H. Stogner, John W. Peterson P. T. Bauman Error Estimation and Adaptivity August 14, / 112
15 Preliminaries Notation We use the method of weighted residuals  multiply by a test function v V and integrate by parts to arrive at weak form of the equations Domain Weak Form Find u U such that u v dx + Ω gv ds Ω N = fv dx v V Ω Ω N Ω Ω D Image courtesy Benjamin S. Kirk, Roy H. Stogner, John W. Peterson P. T. Bauman Error Estimation and Adaptivity August 14, / 112
16 Preliminaries Notation Now we discretize the weak form by creating a mesh over the domain and testing against functions v h V h Discretized Weak Form Find u h U h such that u h v h dx Ω h + gv h ds = Ω h N Ω fv h dx v h V h Meshed Domain Ω h Image courtesy Benjamin S. Kirk, Roy H. Stogner, John W. Peterson P. T. Bauman Error Estimation and Adaptivity August 14, / 112
17 Preliminaries Notation The interior integral is broken up over elements: N e u h v h dx = u h v h dx Ω h Ω e e=1 and each function is written in terms of its basis function: N s u h = u i φ i (x) i=1 N s v h = c i φ i (x) i=1 where u i are the degrees of freedom and c i is arbitrary Shape functions φ i (x) are typically polynomials P. T. Bauman Error Estimation and Adaptivity August 14, / 112
18 Preliminaries Notation We will need the notation for the L 2 inner product: L 2 inner product ( u, v) = Ω u v dx The theory of error estimation is developed using the language of bilinear and semilinear forms: Bilinear Form for Laplace B(u, v) = ( u, v) F (v) = (f, v) Ω h N gv h ds so that the weak form of the model Laplace problem is B(u, v) = F (v) P. T. Bauman Error Estimation and Adaptivity August 14, / 112
19 Error Control through Mesh Adaptation Mesh Adaptation What is a mesh? A collection of points (called nodes) connected together to form shapes (called elements) Over each element, we define a finite element that contains information of the function representation (degrees of freedom, shape functions, etc) The more elements and nodes we have, the better we can resolve the function we are studying (solution of a differential equation) What do we mean by mesh adaptation/refinement? We refine a mesh by adding more degrees of freedom This helps give better resolution to the function we wish to compute Carefully choosing where to refine the mesh can greatly accelerate convergence to the desired solution P. T. Bauman Error Estimation and Adaptivity August 14, / 112
20 Error Control through Mesh Adaptation Types of Mesh Refinement hadaptivity Break existing elements into smaller subelements h, the size of the element, shrinks padaptivity Raise the order of approximation of the basis functions For example, make the element use quadratic basis functions instead of linear hpadaptivity Strategies combining both hadaptivity and padaptivity Use optimization algorithms to decide which (both?) types of adaptation to perform on the element P. T. Bauman Error Estimation and Adaptivity August 14, / 112
21 Error Control through Mesh Adaptation Element hrefinement Triangle Quadrilateral Tetrahedron Prism Images courtesy of Benjamin S. Kirk, Roy H. Stogner, and John W. Peterson P. T. Bauman Error Estimation and Adaptivity August 14, / 112
22 Error Control through Mesh Adaptation Hanging Nodes Locally hrefining elements naturally leads to the presence of hanging nodes Dealing with Hanging Nodes Can add buffer elements and/or force neighboring refinements to avoid hanging nodes Can cause unnecessary proliferation of element refinement Creating buffer zones, especially in 3D, can be challenging to implement More commonly, enforce continuity of the solution (for discontinuous methods, there s nothing to do) For Lagrange basis functions, simply interpolating is adequate For more exotic elements/formulations, need to be careful to preserve the approximation Resort to projectionbased interpolation strategies: interpolate at the nodes, project onto the edge degrees of freedom, project onto faces, project into the interior P. T. Bauman Error Estimation and Adaptivity August 14, / 112
23 Error Control through Mesh Adaptation Nonconforming Meshes When hanging nodes are present, we say the mesh is nonconforming If there are, at most, n hanging nodes on any element side, we say the mesh is an nirregular mesh Although some software packages support more than 1irregular meshes, it is very uncommon for such meshes to be used Practical difficulty of implementation Enforcing 1irregularity forces some transition between the size of the elements Can lose conformity of the approximation with greater than 1irregularity [12] P. T. Bauman Error Estimation and Adaptivity August 14, / 112
24 Error Control through Mesh Adaptation Mesh Redistribution Can adjust the mesh without changing its topology (how the elements/nodes are connected) One common operation is mesh smoothing Generated meshes can have sharp interfaces, skewed elements, etc. Solve a PDE (typically a form of the Laplace equation) to adjust the position of the nodes without changing the connectivity to improve the quality of the mesh A related idea is mesh redistribution where the nodes are redistributed to capture some desired feature One common example is shocks [7] P. T. Bauman Error Estimation and Adaptivity August 14, / 112
25 Error Control through Mesh Adaptation Example: Compressible Flow Over a Wedge The problem studied is that of an oblique shock generated by a 10 o wedge angle. Slide courtesy of Benjamin S. Kirk, Roy H. Stogner, and John W. Peterson P. T. Bauman Error Estimation and Adaptivity August 14, / 112
26 Error Control through Mesh Adaptation Example: Compressible Flow Over a Wedge The problem studied is that of an oblique shock generated by a 10 o wedge angle. This problem has an exact solution for density which is a step function. Slide courtesy of Benjamin S. Kirk, Roy H. Stogner, and John W. Peterson P. T. Bauman Error Estimation and Adaptivity August 14, / 112
27 Error Control through Mesh Adaptation Example: Compressible Flow Over a Wedge The problem studied is that of an oblique shock generated by a 10 o wedge angle. This problem has an exact solution for density which is a step function. The exact solution is shown below: Slide courtesy of Benjamin S. Kirk, Roy H. Stogner, and John W. Peterson P. T. Bauman Error Estimation and Adaptivity August 14, / 112
28 Error Control through Mesh Adaptation Uniformly Refined Solutions For comparison purposes, here is a mesh and a solution after 1 uniform refinement with DOFs. 1 1 y y r x x (a) Mesh after 1 uniform refinement. (b) Solution after 1 uniform refinement. Slide courtesy of Benjamin S. Kirk, Roy H. Stogner, and John W. Peterson P. T. Bauman Error Estimation and Adaptivity August 14, / 112
29 Error Control through Mesh Adaptation hadapted Solutions A flux jump indicator was employed as the error indicator Slide courtesy of Benjamin S. Kirk, Roy H. Stogner, and John W. Peterson P. T. Bauman Error Estimation and Adaptivity August 14, / 112
30 Error Control through Mesh Adaptation hadapted Solutions A flux jump indicator was employed as the error indicator Here is a mesh and solution after 2 adaptive refinements containing DOFs: 1 1 y y r x (e) Mesh, 2 refinements x (f) Solution Slide courtesy of Benjamin S. Kirk, Roy H. Stogner, and John W. Peterson P. T. Bauman Error Estimation and Adaptivity August 14, / 112
31 Error Control through Mesh Adaptation Redistributed Solutions Redistribution utilizing the same flux jump indicator. 1 1 y y r x (g) Mesh, 8 redistribution steps x (h) Solution Slide courtesy of Benjamin S. Kirk, Roy H. Stogner, and John W. Peterson P. T. Bauman Error Estimation and Adaptivity August 14, / 112
32 Error Control through Mesh Adaptation Redistributed and Adapted Now combining the two, here are the mesh and solution after 2 adaptations beyond the previous redistribution containing DOFs. 1 1 y y r x (i) Mesh, 2 refinements x (j) Solution Slide courtesy of Benjamin S. Kirk, Roy H. Stogner, and John W. Peterson P. T. Bauman Error Estimation and Adaptivity August 14, / 112
33 Error Control through Mesh Adaptation Solution Comparison For a better comparison here are 3 of the solutions, each with around DOFs: r r r y y y x (k) Uniform x (l) Adaptive x (m) R + H. Slide courtesy of Benjamin S. Kirk, Roy H. Stogner, and John W. Peterson P. T. Bauman Error Estimation and Adaptivity August 14, / 112
34 Error Control through Mesh Adaptation 2 0 Error Plot The exact solution is not in H 1 therefore we only look at the L 2 convergence plot: 1.2 Uniform Adaptivity Redist + Adapt (L Error ) log log 10 D ofs (n) LogLog plot of L2 vs DOFs. Slide courtesy of Benjamin S. Kirk, Roy H. Stogner, and John W. Peterson P. T. Bauman Error Estimation and Adaptivity August 14, / 112
35 Error Control through Mesh Adaptation Mesh Adaptation How to Choose Where to Refine the Mesh? This is the job of local error indicators We construct an estimate of the error η That error estimate is partitioned over the elements η = K η K Then we can use various flagging strategies to label which elements to refine Error value Error fraction Target number of elements (optimization) P. T. Bauman Error Estimation and Adaptivity August 14, / 112
36 Error Control through Mesh Adaptation Mesh Adaptation How to Choose Where to Refine the Mesh? This is the job of local error indicators We construct an estimate of the error η That error estimate is partitioned over the elements η = K η K Then we can use various flagging strategies to label which elements to refine Error value Error fraction Target number of elements (optimization) The job of error estimation is to come up with η and η K P. T. Bauman Error Estimation and Adaptivity August 14, / 112
37 Error Estimation for Discretized PDE s Error Estimation in General Two general flavors of error analysis: a priori Error Analysis From the earlier Analysis carried out before computations to assess convergence characteristics, etc. E.g. u u h Ch 2 Classical numerical analysis a posteriori Error Analysis From the later Analysis carried out following computation Used to guide adaptive refinement, etc. P. T. Bauman Error Estimation and Adaptivity August 14, / 112
38 Error Estimation for Discretized PDE s Flux Jump Error Indicator The fluxjump error indicator is derived starting from the element integrals N e ( u h v h fv h ) dx = 0 Ω e e=1 Applying the divergence theorem in reverse obtains N e e=1 Ω e Ω e Ω ( ) u h f v h dx + Ω e u h n v h dx = 0 P. T. Bauman Error Estimation and Adaptivity August 14, / 112
39 Error Estimation for Discretized PDE s Flux Jump Error Indicator Defining the cell residual we have N e e=1 Ω e r(u h )v h dx + r(u h ) = u h f Ω e Ω Ω e u h n Clearly, the exact solution u satisfies (1) identically. v h dx = 0 Computing r(u h ) requires knowledge of the differential operator (i.e. knowledge of the physics ). The second sum leads to a physicsindependent method for estimating the error in the approximate solution u h. P. T. Bauman Error Estimation and Adaptivity August 14, / 112
40 Error Estimation for Discretized PDE s Flux Jump Error Indicator Pros Cons Ideal for loworder (piecewise linear) elements Easily extensible to adaptivity with hanging nodes Works well in practice for nonlinear, timedependent problems, and problems with shocks, layers, discontinuities, etc. For higherorder elements, the interior residual term may dominate Relatively expensive to compute Makes no sense for discontinuous and C 1 FE bases P. T. Bauman Error Estimation and Adaptivity August 14, / 112
41 Error Estimation for Discretized PDE s Patch Recovery Error Indicator Main Idea Reconstruct gradient of solution at nodes using some average of values in adjoining elements Various different procedures Most popular may be that due to Zienkiewicz and Zhu ( superconvergent patch recovery ) Compare the reconstructed gradient against the gradient of the discrete solution Remarkably effective error indicator in many scenarios Can also be easily fooled P. T. Bauman Error Estimation and Adaptivity August 14, / 112
42 Error Estimation for Discretized PDE s Implicit a posteriori Error Estimators Based on elementlocal subproblems to be solved to approximate error Equilibrated residual method Residual free bubbles Depend on physics operator Can be much more accurate than the previous explicit type error indicators P. T. Bauman Error Estimation and Adaptivity August 14, / 112
43 Error Estimation for Discretized PDE s QoIbased Error Estimation What do you really want to compute? Thus far, have focused on error estimates for u u h Very often, we re not interested in u itself, but rather some functional of u, Q(u) We call Q(u) the quantity of interest Examples: Stress in a local region Maximum heat flux on a surface Local vorticity Thus, we would instead prefer to estimate the error Q(u) Q(u h ) One theory for developing such error estimates follows an optimal control approach P. T. Bauman Error Estimation and Adaptivity August 14, / 112
44 Error Estimation for Discretized PDE s QoIbased Error Estimation Abstract Nonlinear Problem Find u V such that B(u; v) = F (v), v V Optimal Control Approach Find u V such that where Q(u) = inf v M Q(v) M = {v V ; B(v; q) = F (q) q V } Q (u; v) = lim θ 1 [Q(u + θv) Q(u)] θ 0 B (u; v, w) = lim θ 1 [B(u + θv; w) B(u; w)] θ 0 P. T. Bauman Error Estimation and Adaptivity August 14, / 112
45 Error Estimation for Discretized PDE s QoIbased Error Estimation Comments on Optimal Control Approach Trivial optimal control problem: Compute u from B(u; v) = F (v) and evaluate Q(u) What this buys us is the machinery of optimal control for deriving equations needed for error computation. Lagrangian Must find saddle point (u, p) V V of Lagrangian Critical Points L(u, p) = Q(u) + F (p) B(u; p) L ((u, p); (v, q)) = 0, (v, q) V V P. T. Bauman Error Estimation and Adaptivity August 14, / 112
46 Error Estimation for Discretized PDE s QoIbased Error Estimation Critical Points L ((u, p); (v, q)) = Q (u; v) B (u; v, p)+f (q) B(u; q), (v, q) V V Primal Problem (potentially nonlinear) Find u V such that B(u; q) = F (q), q V Adjoint or Dual Problem (always linear) Find p V such that B (u; v, p) = Q (u; v), v V P. T. Bauman Error Estimation and Adaptivity August 14, / 112
47 Error Estimation for Discretized PDE s QoIbased Error Estimation Residual R(u; v) = F (v) B(u; v), v V Error Representation Q(u) Q(u h ) = R(u h ; p) + where u h V h V is our discrete approximation to u, p is the adjoint solution, and is higher order in u u h Comments This error representation requires the exact adjoint solution p p also requires a discrete approximation But, the second argument of the residual operator is linear, so... P. T. Bauman Error Estimation and Adaptivity August 14, / 112
48 Error Estimation for Discretized PDE s QoIbased Error Estimation Computable Error Representation Q(u) Q(u h ) = R(u h ; p h ) + R(u h ; p p h ) + Q(u) Q(u h ) R(u h ; p h ) where p h is our discrete approximation to p Comments When we neglect, we are assuming that u h is sufficiently close to u that it is small u h must be a good enough approximation of u to get good error estimators What happens if we use the same mesh for the solution of p h as u h? p h V h But u h V h such that R(u h ; v h ) = 0, v h V h R(u h ; p h ) = 0! No information in the error estimate! P. T. Bauman Error Estimation and Adaptivity August 14, / 112
49 Error Estimation for Discretized PDE s QoIbased Error Estimation What do we do, then? Need to enrich the adjoint solution beyond the space V h P. T. Bauman Error Estimation and Adaptivity August 14, / 112
50 Error Estimation for Discretized PDE s QoIbased Error Estimation What do we do, then? Need to enrich the adjoint solution beyond the space V h One strategy is to do one or more uniform refinements of the mesh and compute the adjoint solution, p h/2, on that mesh This is, probably, the most common strategy P. T. Bauman Error Estimation and Adaptivity August 14, / 112
51 Error Estimation for Discretized PDE s QoIbased Error Estimation What do we do, then? Need to enrich the adjoint solution beyond the space V h One strategy is to do one or more uniform refinements of the mesh and compute the adjoint solution, p h/2, on that mesh This is, probably, the most common strategy Then, Q(u) Q(u h ) R(I h/2 u h ; p h/2 ), where I h/2 u h is the interpolant of u h onto the uniformly refined grid Another common strategy involves using higher order basis functions, i.e. raising the order p of the approximation Other strategies abound such a using residual bubbles P. T. Bauman Error Estimation and Adaptivity August 14, / 112
52 Error Estimation for Discretized PDE s Summary Error Estimation Algorithm 1. Compute the primal solution u h : B(u h ; v h ) = F (v h ), v h V h P. T. Bauman Error Estimation and Adaptivity August 14, / 112
53 Error Estimation for Discretized PDE s Summary Error Estimation Algorithm 1. Compute the primal solution u h : B(u h ; v h ) = F (v h ), v h V h 2. Enrich the solution space, e.g. h h/2 P. T. Bauman Error Estimation and Adaptivity August 14, / 112
54 Error Estimation for Discretized PDE s Summary Error Estimation Algorithm 1. Compute the primal solution u h : B(u h ; v h ) = F (v h ), v h V h 2. Enrich the solution space, e.g. h h/2 3. Compute the adjoint solution p h/2 : B (I h/2 u h ; v h/2, p h/2 ) = Q (I h/2 u h ; v h/2 ), v h/2 V h/2 P. T. Bauman Error Estimation and Adaptivity August 14, / 112
55 Error Estimation for Discretized PDE s Summary Error Estimation Algorithm 1. Compute the primal solution u h : B(u h ; v h ) = F (v h ), v h V h 2. Enrich the solution space, e.g. h h/2 3. Compute the adjoint solution p h/2 : B (I h/2 u h ; v h/2, p h/2 ) = Q (I h/2 u h ; v h/2 ), v h/2 V h/2 4. Evaluate the residual to computer error estimate: Q(u) Q(u h ) R(I h/2 u h ; p h/2 ) P. T. Bauman Error Estimation and Adaptivity August 14, / 112
56 Error Estimation for Discretized PDE s Example ConvectionDiffusion Problem with Adjoints Equation: Manufactured solution : α u + β e x u + f = 0 u 4(1 e αx (1 e α )x)y(1 y) α controls flux strength, layer Aside: MASA Manufactured and Analytical Solution Abstraction  library to facilitate the use of the Method of Manufactured Solutions (MMS) N. Malaya, K. C. EstacioHiroms, R. H. Stogner, K. W. Schulz, P. T. Bauman, G. F. Carey, MASA: A Library for Verification Using Manufactured and Analytical Solutions, Engineering with Computers, in press, Available: P. T. Bauman Error Estimation and Adaptivity August 14, / 112
57 Error Estimation for Discretized PDE s Example Convergence Primal Solution T: Convergence of the interior QoI, ε = 10 8 Uniform Refinements Flux Jump Error Estimator Adjoint Error Estimator 3.5 Log 10 (Absolute Error) Log 10 (Dofs), Degrees of Freedom Images courtesy Roy H. Stogner, The University of Texas at Austin P. T. Bauman Error Estimation and Adaptivity August 14, / 112
58 Error Estimation for Discretized PDE s Example Convergence Adjoint Solution T: Convergence of the interior QoI, ε = 10 8 Uniform Refinements Flux Jump Error Estimator Adjoint Error Estimator 3.5 Log 10 (Absolute Error) Log 10 (Dofs), Degrees of Freedom Images courtesy Roy H. Stogner, The University of Texas at Austin P. T. Bauman Error Estimation and Adaptivity August 14, / 112
59 Error Estimation for Discretized PDE s Example Comments Flux jump error indicator picks up the sharp layer near the boundary Convergence of QoI stalls Adjointbased error estimator still picks up layer, but also picks up influence of QoI, as expected Convergence of adjointbased error estimator double the rate of the uniformly refined solution P. T. Bauman Error Estimation and Adaptivity August 14, / 112
60 Error Estimation for Discretized PDE s Adjoint Problem Definition of Adjoint Operator Definition of adjoint operator: (Lu, v) = (u, L v) Example: linear system Ax = b, adjoint of A is A T Example: differential equation Lu = u + u, L v = v v P. T. Bauman Error Estimation and Adaptivity August 14, / 112
61 Error Estimation for Discretized PDE s Adjoint Problem Definition of Adjoint Operator Definition of adjoint operator: (Lu, v) = (u, L v) Example: linear system Ax = b, adjoint of A is A T Example: differential equation Lu = u + u, L v = v v Why is the Adjoint Problem Called the Adjoint Problem? We use a linear system as a simple example Exact: Ax = b Approximate: Ax 0 = b Error: e = x x 0 Equation for error: Ae = r, r = b Ax 0 Adjoint problem: A T p = q, for some q (QoI) a posteriori error estimate: (e, q) = (e, A T p) = (Ae, p) = (R, p) P. T. Bauman Error Estimation and Adaptivity August 14, / 112
62 Error Estimation for Discretized PDE s Adjoint Solution The adjoint solution may look somewhat familiar P. T. Bauman Error Estimation and Adaptivity August 14, / 112
63 Error Estimation for Discretized PDE s Adjoint Solution The adjoint solution may look somewhat familiar Green s Functions If we are computing Lu = f x Ω plus boundary and/or initial conditions, then the Green s function G is defined as L G(y, x) = δ y (x), x Ω plus boundary and/or initial conditions P. T. Bauman Error Estimation and Adaptivity August 14, / 112
64 Error Estimation for Discretized PDE s Adjoint Solution The adjoint solution may look somewhat familiar Green s Functions If we are computing Lu = f x Ω plus boundary and/or initial conditions, then the Green s function G is defined as L G(y, x) = δ y (x), x Ω plus boundary and/or initial conditions Comments If our quantity of interest is a point value, then the adjoint solution is actually a Green s function of our operator! Point value QoI s were studied for elliptic problems in [21] P. T. Bauman Error Estimation and Adaptivity August 14, / 112
65 Error Estimation for Discretized PDE s Adjoint Solution More Comments For other QoI s, the adjoint solution is, essentially, a generalized Green s function Often referred to as generalized Green s function in the literature Excellent discussion in Estep short course here: colostate.edu/~estep/research/talks/adjointcourse.pdf So why the optimal control approach? There is no unique definition for the adjoint of a nonlinear operator The choice made is the most common one, but others are possible Extends the linear case Gives a systematic framework for handling nonlinear problems You re probably not solving linear equations! P. T. Bauman Error Estimation and Adaptivity August 14, / 112
66 Error Estimation for Discretized PDE s Alternative AdjointBased Error Indicators Bound on Error See [2], for example R(u h ; v h, p) K R K u u h p p h Comments Although the actual error estimate is much more inaccurate than the form we ve been discussing, this can be very convenient as an error indicator In particular, we can solve the adjoint problem on the same grid! Use global error estimators to estimate u u h and p p h Gives an error indicator for QoIbased adaptivity Good adaptive strategy might be to use such an indicator for a few iterations to drive adaptivity, then switch to the more accurate error estimator P. T. Bauman Error Estimation and Adaptivity August 14, / 112
67 Modeling Error Estimation and Adaptivity Modeling Error Estimation Comments To this point, we ve considered the discretization error for single mathematical model In particular, we ve examined a framework for developing error estimates for quantities of interest This framework is actually amenable to examine modeling error This is the error due to the mathematical model being unable to capture essential features of the desired solution Modeling error considerations naturally arise in the use of multiphysics and multiscale models P. T. Bauman Error Estimation and Adaptivity August 14, / 112
68 Modeling Error Estimation and Adaptivity Modeling Error Estimation We begin as before: Base Model Find u U such that B(u; v) = F (v), v V Quantity of Interest Given u, find Q(u) such that Q : U R Comments In the context of modeling error, the base model is considered exact, in the sense that it captures all events/phenomena of interest For example, it is widely believed that the NavierStokes equations are an excellent model of turbulence However, the base model is, typically, intractable We never solve the base model We only use it as a basis for comparison to other models P. T. Bauman Error Estimation and Adaptivity August 14, / 112
69 Modeling Error Estimation and Adaptivity Modeling Error Estimation Surrogate Model Find u 0 U such that B 0 (u 0 ; v) = F 0 (v), v V Error in Quantity of Interest E = Q(u) Q(u 0 ) Comments We replace the base model by a surrogate model The surrogate model must be tractable Ideally, surrogate model captures coarse scale/far field features of the base model May involve fine and coarse scale models (and the interface between them) Examples later The error in the quantity of interest is now a modeling error We will reduce this error by model adaptivity P. T. Bauman Error Estimation and Adaptivity August 14, / 112
70 Modeling Error Estimation and Adaptivity Modeling Error Estimation Base Model Error Representation Q(u) Q(u 0 ) = R(u 0 ; p) + where p is the adjoint solution and is a higher order remainder Surrogate Model Comments The key insight is that there was nothing special about the choice u h We can choose any admissible approximation to u In particular, u 0 that is the solution to a different mathematical model. The devil is in the details as we will see... P. T. Bauman Error Estimation and Adaptivity August 14, / 112
71 Modeling Error Estimation and Adaptivity Model Adaptivity What is Model Adaptivity? Domain is partitioned into cells For simplicity, typically coincides with underlying discretization, but is not necessary Each cell has an identifier as to which model is activated in that cell Refining the model means which update the cell to locally use the base model instead of the approximate model As with mesh adaptivity, this is driven by computed local error indicators When QoIbased error estimators are used, such algorithms have been referred to as Goals algorithms P. T. Bauman Error Estimation and Adaptivity August 14, / 112
72 Modeling Error Estimation and Adaptivity Model Adaptivity ũ 1 Q(u) Q(ũ 1 ) = E 1 E 1 γ tol? ũ 2 Q(u) Q(ũ 2 ) = E 2 E 2 γ tol? ũ 3 Q(u) Q(ũ 3 ) = E 3 E 3 γ tol? P. T. Bauman Error Estimation and Adaptivity August 14, / 112
73 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Example: Coupled Stokes/NavierStokes Motivation: Airbag Deployment Airbag deployment canonical example of fluidstructure interaction Slender features present during majority of time for deployment of airbag Hypothesized that fluid in those slender features are amenable to approximation by Stokes equations (instead of NavierStokes) Ultimate goal would be boundary element methods for Stokes coupled with tradition FEM for NavierStokes (PhD work of Timo van Opstal) Natural first step is studying FEMFEM coupled Stokes/NavierStokes Also a nice, simple example of modeling error estimation and adaptive modeling P. T. Bauman Error Estimation and Adaptivity August 14, / 112
74 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Example: Coupled Stokes/NavierStokes 1 0 u = g u = 0 σ n = Acknowledgements Timo M. van Opstal  Eindhoven University of Technology E. Harald van Brummelen  Eindhoven University of Technology Serge Prudhomme  Ecole Polytechnique de Montréal P. T. Bauman Error Estimation and Adaptivity August 14, / 112
75 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Fine Model NavierStokes u u σ(u, p) = 0 in Ω u = 0 in Ω Geometry u = g at Ω D Ω N σ(u, p) n = h at Ω N Ω D P. T. Bauman Error Estimation and Adaptivity August 14, / 112
76 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Mixed Model NavierStokes u u σ(u, p) = 0 in Ω n Stokes u = 0 in Ω n u = g at Ω D Ω n σ(u, p) n n = h at Ω N Ω n σ(u, p) = 0 in Ω s u = 0 in Ω s u = g at Ω D Ω s σ(u, p) n s = h at Ω N Ω s Geometry Ω s Ω D Σ Ω n Ω N Transmission γ s u = γ n u at Σ σ n s = σ n n at Σ P. T. Bauman Error Estimation and Adaptivity August 14, / 112
77 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Weak Form Definitions B ([u, p];[v, q]) := (u u, v) + 1 Re ( u, v) ( v, p) ( u, q) B 0 ([u, p];[v, q]) := (χ Ω nu u, v) + 1 Re ( u, v) ( v, p) ( u, q) F ([v, q]) := h v Ω N V Q H 1 g, Ω D (Ω) L 2 (Ω) Weak Form (Fine) Find [u, p] V Q : B ([u, p];[v, q]) = F ([v, q]) [v, q] V Q Weak Form (Mixed) Find [u 0, p 0 ] V Q : B 0 ([u 0, p 0 ];[v, q]) = F ([v, q]) [v, q] V Q P. T. Bauman Error Estimation and Adaptivity August 14, / 112
78 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Goaloriented model adaptivity Modeladaptive process 1. Define quantity of interest (QoI): Q([u, p]) 2. Compute solution to approximate model: u 0 3. Compute adjoint solution [z, ζ] 4. Estimate error in QoI: Q([u, p]) Q([u 0, p 0 ]) 5. Control error: Design elementwise error indicator η κ Choose refinement strategy P. T. Bauman Error Estimation and Adaptivity August 14, / 112
79 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Model adaptivity: 2. Error estimate Adjoint problem Find [z, ζ] V Q : B ([u 0, p 0 ];[v, q], [z, ζ]) = Q ([u 0, p 0 ];[v, q]) [v, q] V Q Error estimate Q ([u, p]) Q ([u 0, p 0 ]) = R([u 0, p 0 ]; [z, ζ]) 1 ( B ([u 0 + se, p 0 + sɛ]; [z, ζ], [e, ɛ], [e, ɛ])+ 0 ) Q ([u 0 + se, p 0 + sɛ]; [e, ɛ], [e, ɛ]) (1 s)ds. P. T. Bauman Error Estimation and Adaptivity August 14, / 112
80 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Model adaptivity: 2. Error estimate Adjoint problem Find [z, ζ] V Q : B ([u 0, p 0 ];[v, q], [z, ζ]) = Q ([u 0, p 0 ];[v, q]) [v, q] V Q Error estimate Q ([u, p]) Q ([u 0, p 0 ]) R([u 0, p 0 ]; [z, ζ]) 1 ( B ([u 0 + se, p 0 + sɛ]; [z, ζ], [e, ɛ], [e, ɛ])+ 0 ) Q ([u 0 + se, p 0 + sɛ]; [e, ɛ], [e, ɛ]) (1 s)ds. P. T. Bauman Error Estimation and Adaptivity August 14, / 112
81 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Model adaptivity: 3. Error indicators Q ((u, p)) Q ((u 0, p 0 )) R([u 0, p 0 ];[z, ζ]) P. T. Bauman Error Estimation and Adaptivity August 14, / 112
82 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Model adaptivity: 3. Error indicators Q ((u, p)) Q ((u 0, p 0 )) R([u 0, p 0 ];[z, ζ]) = R([u 0, p 0 ];φ i ẑ i ) i<n P. T. Bauman Error Estimation and Adaptivity August 14, / 112
83 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Model adaptivity: 3. Error indicators Q ((u, p)) Q ((u 0, p 0 )) R([u 0, p 0 ];[z, ζ]) = R([u 0, p 0 ];φ i ẑ i ) i<n = β i R([u 0, p 0 ];φ i ) ẑ }{{} i κ T i I κ ˆR i P. T. Bauman Error Estimation and Adaptivity August 14, / 112
84 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Model adaptivity: 3. Error indicators Q ((u, p)) Q ((u 0, p 0 )) R([u 0, p 0 ];[z, ζ]) = R([u 0, p 0 ];φ i ẑ i ) i<n = β i R([u 0, p 0 ];φ i ) ẑ }{{} i κ T i I κ ˆR i Would like something similar to β i = κ φ i/ Ω φ i Could choose simple rule by splitting equally: β i = 1/#T i We use slight better: β i = µ(κ)/µ( κ Ti κ) P. T. Bauman Error Estimation and Adaptivity August 14, / 112
85 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Model adaptivity: 3. Error indicators Q ((u, p)) Q ((u 0, p 0 )) R([u 0, p 0 ];[z, ζ]) = R([u 0, p 0 ];φ i ẑ i ) i<n = β i R([u 0, p 0 ];φ i ) ẑ }{{} i κ T i I κ ˆR i µ(κ) = µ( κ Ti κ) ˆR i ẑ i κ T i I κ P. T. Bauman Error Estimation and Adaptivity August 14, / 112
86 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Model adaptivity: 3. Error indicators Q ((u, p)) Q ((u 0, p 0 )) R([u 0, p 0 ];[z, ζ]) = R([u 0, p 0 ];φ i ẑ i ) i<n = β i R([u 0, p 0 ];φ i ) ẑ }{{} i κ T i I κ ˆR i µ(κ) = µ( κ Ti κ) ˆR i ẑ i κ T i I κ µ(κ) µ( κ Ti κ) ˆR i ẑ i κ T i I } κ {{} η κ P. T. Bauman Error Estimation and Adaptivity August 14, / 112
87 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Model adaptivity: 3. Error indicators z 1 2 κ 0 κ κ 0 κ 1 P. T. Bauman Error Estimation and Adaptivity August 14, / 112
88 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Experiment setup Discretization details QoI: Q ([u, p]) := ω curlu Parabolic { inflow} 4y(1 y) g = 0 Initially, Ω s = Ω Re {10, 100, 1000} Q 2 Q 1 element Greedy refinement θ = 0.1 Test setup u = 0 u = g Σ Ω n Ω s σ n = ω P. T. Bauman Error Estimation and Adaptivity August 14, / 112
89 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Meshes Meshes generated by QoIbased adaptivity for the average vorticity QoI Re = 10 P. T. Bauman Error Estimation and Adaptivity August 14, / 112
90 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Meshes Meshes generated by QoIbased adaptivity for the average vorticity QoI Re = 1000 P. T. Bauman Error Estimation and Adaptivity August 14, / 112
91 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Re = 10 case True solution: (velocity magnitude and streamlines) P. T. Bauman Error Estimation and Adaptivity August 14, / 112
92 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Re = 10 case i = 0, ɛ Q = , #T n h /#T h = log η κ log u 0 0 P. T. Bauman Error Estimation and Adaptivity August 14, / 112
93 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Re = 10 case i = 1, ɛ Q = , #T n h /#T h = log η κ log u 0 0 P. T. Bauman Error Estimation and Adaptivity August 14, / 112
94 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Re = 10 case i = 4, ɛ Q = , #T n h /#T h = log η κ log u 0 0 P. T. Bauman Error Estimation and Adaptivity August 14, / 112
95 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Re = 10 case i = 6, ɛ Q = , #T n h /#T h = log η κ log u 0 0 P. T. Bauman Error Estimation and Adaptivity August 14, / 112
96 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Re = 10 case i = 8, ɛ Q = , #T n h /#T h = log η κ log u 0 0 P. T. Bauman Error Estimation and Adaptivity August 14, / 112
97 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Re = 1000 case True solution (velocity magnitude and streamlines) P. T. Bauman Error Estimation and Adaptivity August 14, / 112
98 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Re = 1000 case i = 0, ɛ Q = , #T n h /#T h = P. T. Bauman Error Estimation and Adaptivity August 14, / 112
99 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Re = 1000 case i = 2, ɛ Q = , #T n h /#T h = P. T. Bauman Error Estimation and Adaptivity August 14, / 112
100 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Re = 1000 case i = 8, ɛ Q = , #T n h /#T h = P. T. Bauman Error Estimation and Adaptivity August 14, / 112
101 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Re = 1000 case i = 12, ɛ Q = , #T n h /#T h = P. T. Bauman Error Estimation and Adaptivity August 14, / 112
102 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Re = 1000 case i = 18, ɛ Q = , #T n h /#T h = P. T. Bauman Error Estimation and Adaptivity August 14, / 112
103 Modeling Error Estimation and Adaptivity Example: Coupled Stokes/NavierStokes Effectivity index θ eff = R([u 0,p 0 ];[z,ζ]) Q([u,p]) Q([u 0,p 0 ]) θeff Re = 10 Re = 100 Re = #T N h /#T h P. T. Bauman Error Estimation and Adaptivity August 14, / 112
104 Modeling Error Estimation and Adaptivity Relative error in Q([u, p]) Example: Coupled Stokes/NavierStokes ɛq ɛ Q = Q([u,p]) Q([u 0,p 0 ]) Q([u,p]) Re = 10 Re = 100 Re = #T N h /#T h P. T. Bauman Error Estimation and Adaptivity August 14, / 112
105 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Example: Coupled Particle/Continuum Multiscale Model Motivation Study multiscale models of polymer deformation that is a component of a lithography process in semiconductor manufacturing These models involve coupling of particle models with continuum, nonlinear elasticity models Study modeling error estimation and adaptivity in this context This application illustrates some of the additional complexities one faces when studying modeling error estimation References [4, 5, 3, 19, 20] Acknowledgements J. Tinsley Oden  The University of Texas at Austin Serge Prudhomme  Ecole Polytechnique de Montréal P. T. Bauman Error Estimation and Adaptivity August 14, / 112
106 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Particle Configuration P. T. Bauman Error Estimation and Adaptivity August 14, / 112
107 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Base Model Given: 1 Lattice with N molecules, each with position x i. 2 N i neighbors/molecule. 3 E ik (x i, x k ) = potential energy between particle i and neighbor k. Goal: where System of equations: Find x = arg min E(x) x E(x) = N N i E ik (x i, x k ) i=1 k=1 E x (x ) = f(x ) = 0 P. T. Bauman Error Estimation and Adaptivity August 14, / 112
108 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Base Model Written in Weak Form Base Primal and Adjoint Problems: For u, v, p R 3N, B(u; v) = N B (u; v, p) = Q(u) = 1 M N i=1 k=1 N E ik u i i=1 j=1 N v j M u m e 1 m=1 v i N k=1 2 E ik u i u j p i P. T. Bauman Error Estimation and Adaptivity August 14, / 112
109 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Arlequin Method P. T. Bauman Error Estimation and Adaptivity August 14, / 112
110 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Arlequin Method Find (u, w) X, λ M such that: a ((u, w), (v, z)) + b (λ, (v, z)) = l((v, z)) (v, z) X b (µ, (u, w)) = 0 µ M where m a ((u, w), (v, z)) = α c W (u)v dx + α d E i(w i, w i 1 )(z i z i 1 ) Ω c i=1 b (µ, (v, z)) = β 1 µ(v Πz) + β 2 µ (v Πz) dx Ω o l((v, z)) = fz m P. T. Bauman Error Estimation and Adaptivity August 14, / 112
111 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Example 3D Arlequin Calculation Solution Comments Reduced 375,000 unknowns to 18,228 5 mins. on a workstation from 1.4 CPU hours on 32 processors A factor of 21 time and cost P. T. Bauman Error Estimation and Adaptivity August 14, / 112
112 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Error Estimation Surrogate Solution Q(u) Q(u 0 ) = R(u 0 ; p) + P. T. Bauman Error Estimation and Adaptivity August 14, / 112
113 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Error Estimation Surrogate Solution Q(u) Q(u 0 ) = R(u 0 ; p) + P. T. Bauman Error Estimation and Adaptivity August 14, / 112
114 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Error Estimation Q(u) Q(u 0 ) = R(u 0 ; p) + Surrogate Solution Base Solution P. T. Bauman Error Estimation and Adaptivity August 14, / 112
115 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Error Estimation Comments The surrogate solution is not compatible as is with the base model residual operator Surrogate solution is a mixed particle and continuum model Base model residual is only defined for particles P. T. Bauman Error Estimation and Adaptivity August 14, / 112
116 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Error Estimation Comments The surrogate solution is not compatible as is with the base model residual operator Surrogate solution is a mixed particle and continuum model Base model residual is only defined for particles Furthermore, we require the fine scale adjoint solution Adjoint problem requires surrogate solution (because we don t have the exact solution) Again, base model adjoint equations only defined for particles P. T. Bauman Error Estimation and Adaptivity August 14, / 112
117 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Error Estimation Comments The surrogate solution is not compatible as is with the base model residual operator Surrogate solution is a mixed particle and continuum model Base model residual is only defined for particles Furthermore, we require the fine scale adjoint solution Adjoint problem requires surrogate solution (because we don t have the exact solution) Again, base model adjoint equations only defined for particles We must make the surrogate solution compatible with the base model operators! P. T. Bauman Error Estimation and Adaptivity August 14, / 112
118 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Error Estimation Comments The surrogate solution is not compatible as is with the base model residual operator Surrogate solution is a mixed particle and continuum model Base model residual is only defined for particles Furthermore, we require the fine scale adjoint solution Adjoint problem requires surrogate solution (because we don t have the exact solution) Again, base model adjoint equations only defined for particles We must make the surrogate solution compatible with the base model operators! We will use interpolation P. T. Bauman Error Estimation and Adaptivity August 14, / 112
119 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Interpolant Model Partition Comments Must choose how to interpolate each of the three regions Particle region (pink) Overlap region (red) Continuum region (green) P. T. Bauman Error Estimation and Adaptivity August 14, / 112
120 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Interpolant Model Partition Comments Must choose how to interpolate each of the three regions Particle region (pink) Overlap region (red) Continuum region (green) Particle Interpolation Copy particle to particle P. T. Bauman Error Estimation and Adaptivity August 14, / 112
121 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Interpolant Continuum Mapping Reference Config Current Config Comments Continuum model is large deformation Displacement gives mapping from reference configuration to current configuration (in continuum mechanics parlance) Use this mapping to construct interpolant in continuum region P. T. Bauman Error Estimation and Adaptivity August 14, / 112
122 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Interpolant Continuum Interpolant Reference Config Current Config Interpolate displacement of continuum P. T. Bauman Error Estimation and Adaptivity August 14, / 112
123 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Error Estimation Surrogate Interpolant We have now constructed an interpolant for the surrogate solution, Πu 0, that takes us back to the base model configuration P. T. Bauman Error Estimation and Adaptivity August 14, / 112
124 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Error Estimation Surrogate Interpolant We have now constructed an interpolant for the surrogate solution, Πu 0, that takes us back to the base model configuration We can now pose the adjoint problem B (Πu 0 ; v, ˆp) = Q (Πu 0, v) We use the ˆ notation to delineate that we ve used the interpolated surrogate solution to compute the adjoint P. T. Bauman Error Estimation and Adaptivity August 14, / 112
125 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Error Estimation Surrogate Interpolant We have now constructed an interpolant for the surrogate solution, Πu 0, that takes us back to the base model configuration We can now pose the adjoint problem B (Πu 0 ; v, ˆp) = Q (Πu 0, v) We use the ˆ notation to delineate that we ve used the interpolated surrogate solution to compute the adjoint And evaluate the residual R(Πu 0 ; ˆp) to estimate the error P. T. Bauman Error Estimation and Adaptivity August 14, / 112
126 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Error Estimation Adjoint Solution ˆp P. T. Bauman Error Estimation and Adaptivity August 14, / 112
127 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Error Estimation The Problem In principle, the previous strategy is not feasible P. T. Bauman Error Estimation and Adaptivity August 14, / 112
128 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Error Estimation The Problem In principle, the previous strategy is not feasible Solving the base model adjoint problem and evaluating the base model residual is not tractable! P. T. Bauman Error Estimation and Adaptivity August 14, / 112
129 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Error Estimation The Problem In principle, the previous strategy is not feasible Solving the base model adjoint problem and evaluating the base model residual is not tractable! We need a different strategy that is both tractable and effective for error estimation P. T. Bauman Error Estimation and Adaptivity August 14, / 112
130 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Error Estimation The Problem In principle, the previous strategy is not feasible Solving the base model adjoint problem and evaluating the base model residual is not tractable! We need a different strategy that is both tractable and effective for error estimation What About the Surrogate Model? Adjoint problem: B 0 (u 0; v 0, p 0 ) = Q (u 0, v 0 ) P. T. Bauman Error Estimation and Adaptivity August 14, / 112
131 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Error Estimation The Problem In principle, the previous strategy is not feasible Solving the base model adjoint problem and evaluating the base model residual is not tractable! We need a different strategy that is both tractable and effective for error estimation What About the Surrogate Model? Adjoint problem: B 0 (u 0; v 0, p 0 ) = Q (u 0, v 0 ) Residual evaluation: Q(u) Q(u 0 ) R 0 (u 0 ; p 0 ) P. T. Bauman Error Estimation and Adaptivity August 14, / 112
132 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Error Estimation The Problem In principle, the previous strategy is not feasible Solving the base model adjoint problem and evaluating the base model residual is not tractable! We need a different strategy that is both tractable and effective for error estimation What About the Surrogate Model? Adjoint problem: B 0 (u 0; v 0, p 0 ) = Q (u 0, v 0 ) Residual evaluation: Q(u) Q(u 0 ) R 0 (u 0 ; p 0 ) = 0! P. T. Bauman Error Estimation and Adaptivity August 14, / 112
133 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Error Estimation The Problem In principle, the previous strategy is not feasible Solving the base model adjoint problem and evaluating the base model residual is not tractable! We need a different strategy that is both tractable and effective for error estimation What About the Surrogate Model? Adjoint problem: B 0 (u 0; v 0, p 0 ) = Q (u 0, v 0 ) Residual evaluation: Q(u) Q(u 0 ) R 0 (u 0 ; p 0 ) = 0! Analogous to Galerkin orthogonality in the discretized PDE case! P. T. Bauman Error Estimation and Adaptivity August 14, / 112
134 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Error Estimation The Problem In principle, the previous strategy is not feasible Solving the base model adjoint problem and evaluating the base model residual is not tractable! We need a different strategy that is both tractable and effective for error estimation What About the Surrogate Model? Adjoint problem: B 0 (u 0; v 0, p 0 ) = Q (u 0, v 0 ) Residual evaluation: Q(u) Q(u 0 ) R 0 (u 0 ; p 0 ) = 0! Analogous to Galerkin orthogonality in the discretized PDE case! Conclusion: We need to solve the dual problem and evaluate the residual on something between the coarse model and the full lattice. P. T. Bauman Error Estimation and Adaptivity August 14, / 112
135 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Enrichment Strategy Enrich the original coarse model to include more particle regions P. T. Bauman Error Estimation and Adaptivity August 14, / 112
136 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Enrichment Strategy Enrich the original coarse model to include more particle regions Use the same interpolation procedure as before P. T. Bauman Error Estimation and Adaptivity August 14, / 112
137 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Enrichment Strategy Enrich the original coarse model to include more particle regions Use the same interpolation procedure as before Solve the adjoint problem and evaluate the residual on this configuration P. T. Bauman Error Estimation and Adaptivity August 14, / 112
138 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Enrichment Enriched Adjoint and Residual Adjoint: B ( Πu 0 ; ṽ, p) = Q ( Πu 0, ṽ) Residual: Q(u) Q( Πu 0 ) R( Πu 0 ; p) P. T. Bauman Error Estimation and Adaptivity August 14, / 112
139 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Example Calculations Smooth Problem η eff η eff η eff η eff # of Enrich. R(Πu 0,p) Q(u) Q(Πu 0 ) R(Πu 0,ˆp) Q(u) Q(Πu 0 ) R(Πu 0,Π p) Q(u) Q(Πu 0 ) R( Πu 0, p) Q(u) Q( Πu 0 ) P. T. Bauman Error Estimation and Adaptivity August 14, / 112
140 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Example Calculations Rough Problem η eff η eff η eff η eff # of Enrich. R(Πu 0,p) Q(u) Q(Πu 0 ) R(Πu 0,ˆp) Q(u) Q(Πu 0 ) R(Πu 0,Π p) Q(u) Q(Πu 0 ) R( Πu 0, p) Q(u) Q( Πu 0 ) P. T. Bauman Error Estimation and Adaptivity August 14, / 112
141 Modeling Error Estimation and Adaptivity Example: Coupled Particle/Continuum Multiscale Models Example Calculations Smooth Problem Rough Problem Step 1 Step 2 Step 1 Step 2 Step 3 Step 4 Step 3 Step 4 Step 5 Step 5 P. T. Bauman Error Estimation and Adaptivity August 14, / 112
142 Software libmesh Software: libmesh Finite Element Library libmesh [15] Originated in 2002 in order to abstract & implement major components of mesh based simulations in a reusable software library Primary goal is to provide data structures and algorithms that can be shared by disparate physical applications, that may need some combination of Implicit numerical methods Adaptive mesh refinement techniques Parallel computing Parallel mesh distribution Unifying theme: meshbased simulation of partial differential equations (PDEs). P. T. Bauman Error Estimation and Adaptivity August 14, / 112
143 Software libmesh Software: libmesh Finite Element Library Software Reuse Tumor Angiogenesis Compressible RBM NS DD LibMesh Petsc Laspack STL Metis Mpich Image courtesy Benjamin S. Kirk, Roy H. Stogner, John W. Peterson P. T. Bauman Error Estimation and Adaptivity August 14, / 112
144 Software libmesh Software: libmesh Finite Element Library Key Points The libmesh library is designed to be used by students, researchers, scientists, and engineers as a tool for developing simulation codes or as a tool for rapidly implementing a numerical method libmesh is not an application code It does not solve problem XYZ It can be used to help you develop an application to solve problem XYZ, and to do so quickly with advanced numerical algorithms on highperformance computing platforms Written in objectoriented C++ P. T. Bauman Error Estimation and Adaptivity August 14, / 112
145 Software GRINS Software: GRINS Multiphysics Framework General Reacting Incompressible NavierStokes Began as an application code centered around incompressible NavierStokes Evolved into more general multiphysics framework using finite element methods Heavily leverages libmesh through the FEMSystem framework Designed to be flexible for adding new physics, solvers, boundary conditions, etc. Want computational scientist to easily express system simulation in input file At the same time, easily enabling experimentation with new numerical methods in code Easily enable statistical forward and inverse problem P. T. Bauman Error Estimation and Adaptivity August 14, / 112
146 Software GRINS Software: GRINS Multiphysics Framework Key Points Heavily utilizes libmesh Leverages many solvers through libmesh Automatically get access to 3rd party libraries (e.g. PETSc) Supports mesh adaptivity Written in objectoriented C++ Several physics kernels already implemented Preliminary model adaptivity support implemented Available at https: //github.com/grinsfem Example: Vacuum Arc Remelting P. T. Bauman Error Estimation and Adaptivity August 14, / 112
147 Software deal.ii Software: deal.ii Finite Element Library [1] Sophisticated C++ finite element library Supports mesh adaptivity Parallel mesh distribution supported through p4est Supports geometric elements based on tensor product Progenitor of libmesh libmesh was started in order to support triangle and tets, which deal.ii cannot Geometric multi grid available Winner of Wilkinson prize for numerical software Available at P. T. Bauman Error Estimation and Adaptivity August 14, / 112
148 Software FEniCS Software: FEniCS [16] Automated FEM Solutions Collection of Python tools to automate the solution of differential equations using the finite element method Essentially a domain specific language to generate FEM weak forms for problems of interest Interfaces to many external scientific computing packages Gaining a lot of traction in the scientific Python community Comes with all the strengths (and weaknesses...) of Python fenicsproject.org P. T. Bauman Error Estimation and Adaptivity August 14, / 112
149 Contemporary Issues Boundary Flux QoI s Boundary derivatives are a common example of a QoI However, depending on the problem that we are solving, such QoI s may not be well defined This is related to the regularity of the solution, Sobolev spaces, and the Trace theorem In particular, we may not get a well posed adjoint problem Must modify the formulation in order to have well defined adjoint solution Example in electroosmosis, part of Vikram Garg s PhD work [14, 13] P. T. Bauman Error Estimation and Adaptivity August 14, / 112
150 Contemporary Issues Maximum QoI Adjointbase AMR for Hypersonic Flows. QoI here is the maximum heat flux on the surface. Primal Error Adjoint Error QoI Error P. T. Bauman Error Estimation and Adaptivity August 14, / 112
151 Contemporary Issues Maximum QoI Boundary Layer Hanging Nodes Stress test: Ungraded boundary layer Underresolved viscous fluxes Valid initial refinement step Subsequent refinements: Coarse elements currently overestimate convective flux Fine element equilibrium temperature drops Peak surface value QoI location moves Wasteful overrefinement downstream P. T. Bauman Error Estimation and Adaptivity August 14, / 112