Adjoint approach to optimization

Size: px
Start display at page:

Download "Adjoint approach to optimization"

Transcription

1 Adjoint approach to optimization Praveen. C praveen@math.tifrbng.res.in Tata Institute of Fundamental Research Center for Applicable Mathematics Bangalore Health, Safety and Environment Group BARC 6-7 October, 2010 Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

2 Outline Minimum of a function Constrained minimization Finite difference approach Adjoint approach Automatic differentiation Example Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

3 Minimum of a function f(x) f'(x 0 )=0 x 0 x Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

4 Steepest descent method x 2 grad f(x 1,x 2 ) x 1 x n+1 = x n s n f(x n ) Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

5 Objectives and controls Objective function J(α) = J(α, u) mathematical representation of system performance Control variables α Parametric controls α R n Infinite dimensional controls α : X Y Shape α set of admissible shapes State variable u: solution of an ODE or PDE R(α, u) = 0 u = u(α) Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

6 Gradient-based minimization: blackbox/fd approach Initialize β 0, n = 0 For n = 0,..., N iter Solve R(β n, Q n ) = 0 For j = 1,..., N min I(β, Q(β)) β RN β n (j) = [β n 1,..., β n j + β j,..., β n N ] Solve R(β n (j), Q n (j)) = 0 di dβ j I(β n (j),qn (j) ) I(βn,Q n ) β j Steepest descent step Cost of FD-based steepest-descent β n+1 = β n s n di dβ (βn ) Cost = O(N + 1)N iter = O(N + 1)O(N) = O(N 2 ) Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

7 Accuracy of FD: Choice of step size d dx f(x 0) = f(x 0 + δ) f(x 0 ) + O(δ) δ In principle, if we choose a small δ, we reduce the error. But computers have finite precision. Instead of f(x 0 ) the computers gives f(x 0 ) + O(ɛ) where ɛ = machine precision. [f(x 0 + δ) + O(ɛ)] [f(x 0 ) + O(ɛ)] δ = d dx f(x ɛ 0) + C 2 δ + C 1 }{{ δ} Total error = f(x 0 + δ) f(x 0 ) δ, C 1, C 2 depend on f, x 0, precision + C 1 ɛ δ Total error is least when δ = δ opt = C 3 ɛ, C3 = C 1 /C 2 Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

8 Accuracy of FD: Choice of step size Error Precision ɛ δ opt Single Double C 1 δ C 2 ǫ/δ See: Brian J. McCartin, Seven Deadly Sins of Numerical Computation The American Mathematical Monthly, Vol. 105, No. 10 (Dec., 1998), pp δ opt δ Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

9 Drag gradient using FD (Samareh) Errors in Finite Difference Approximations 10 1 Mid chord % Error Round!off LE Sweep2 Tip chord LE sweep3 Twist (root) Twist (mid) Twist (tip) Truncation Twist (root) Twist (mid) Mid chord LE Sweep2 LE Sweep3 Tip chord Twist (tip) Scaled Step Size Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

10 Iterative problems I(β, Q), where R(β, Q) = 0 Q is implicitly defined, require an iterative solution method. Assume a Q 0 and iterate Q n Q n+1 until R(β, Q n ) TOL If TOL is too small, need too many iterations Many problems, we cannot reduce R(β, Q n ) to small values This means that numerical value of I will be noisy Finite difference will contain too much error, and is useless RAE5243 airfoil, Mach=0.68, Re=19 million, AOA=2.5 deg. iter Lift Drag E E E E E-002 Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

11 Complex variable method f(x 0 + iδ) = f(x 0 ) + iδf (x 0 ) + O(δ 2 ) + io(δ 3 ) f (x 0 ) = 1 δ imag[f(x 0 + iδ)] + O(δ 2 ) No roundoff error We can take δ to be very small, δ = Can be easily implemented fortran: redeclare real variables as complex matlab: no change Iterative problems: β β + i β Obtain Q = Q(β + i β) by solving R(β + i β, Q) = 0 Then gradient I (β) 1 imag[i(β + i β, Q(β + i β)] β Computational cost is O(N 2 ) or higher (due to complex arithmetic) Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

12 Objectives and controls Objective function J(α) = J(α, u) mathematical representation of system performance Control variables α Parametric controls α R n Infinite dimensional controls α : X Y Shape α set of admissible shapes State variable u: solution of an ODE or PDE R(α, u) = 0 Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

13 Mathematical formulation Constrained minimization problem Find δα such that δj < 0 min α J(α, u) subject to R(α, u) = 0 δj = J J δα + α u δu = J J u δα + = [ α J α + J u u α δα u α ] δα =: Gδα Steepest descent δα = ɛg δj = ɛgg = ɛ G 2 < 0 Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

14 Mathematical formulation Constrained minimization problem Find δα such that δj < 0 min α J(α, u) subject to R(α, u) = 0 δj = J J δα + α u δu = J J u δα + = [ α J α + J u u α δα u α ] δα =: Gδα Steepest descent δα = ɛg δj = ɛgg = ɛ G 2 < 0 Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

15 Sensitivity approach Linearized state equation R(α, u) = 0 or R R δα + α u δu = 0 R u u α = R α Solve sensitivity equation iteratively, e.g., Gradient u t α + R u u α = R α dj dα = J α + J u u α Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

16 Sensitivity approach: Computational cost n design variables: α = (α 1,..., α n ) Solve primal problem R(α, u) = 0 to get u(α) For i = 1,..., n Solve sensitivity equation wrt αi R u u = R α i α i Compute derivative wrt αi dj = J + J dα i α i u u α i One primal equation, n sensitivity equations Computational cost = n + 1 Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

17 Adjoint approach We have δj = J J R R δα + δu and δα + α u α u δu = 0 Introduce a new unknown v δj = J ( ) J R R δα + δu + v δα + α u α u δu ( ) ( ) J R J R = + v δα + + v δu α α u u Adjoint equation Iterative solution ( ) R ( ) J v = u u v t + ( ) R v = u ( ) J u Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

18 Adjoint approach: Computational cost n design variables: α = (α 1,..., α n ) Solve primal problem R(α, u) = 0 to get u(α) Solve adjoint problem For i = 1,..., n Compute derivative wrt αi ( ) R ( ) J v = u u dj = J + v R dα i α i α i One primal equation, one adjoint equation Computational cost = 2, independent of n Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

19 Adjoint: Two approaches Continuous or differentiate-discretize PDE Discrete or discretize-differentiate PDE Adjoint PDE Discrete PDE Discrete adjoint Discrete adjoint Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

20 Techniques for computing gradients Hand differentiation Finite difference method Complex variable method Automatic Differentiation (AD) Computer code to compute J(α, u) and R(α, u) Chain rule of differentiation Generates a code to compute derivatives ADIFOR, ADOLC, ODYSEE, TAMC, TAF, TAPENADE see Code for J(α, u) α AD tool Code for J α Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

21 Derivatives Given a program P computing a function F F : R m R n X Y build a program that computes derivatives of F X : independent variables Y : dependent variables Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

22 Derivatives [ ] Yj Jacobian matrix: J = X i Directional or tangent derivative Ẏ = JẊ Adjoint mode X = J Ȳ Gradients (n = 1 output) [ ] Y J = = Y X i Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

23 Forward differentiation Program P is a sequence of computations F k T 0 = X, given k th line t k = F k (T k 1 ), T k = Function is a composition [ Tk 1 F = F p F p 1... F 2 F 1 Chain rule Ẏ = F (X)Ẋ = F p(t p 1 )F p 1(T p 2 )... F 2(T 1 )F 1(T 0 )Ẋ X, Ẋ Y, Ẏ cost(ẏ ) = 4 cost(y ) t k ] Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

24 Differentiation: Example A simple example f = (xy + sin x + 4)(3y 2 + 6) Computer code, f = t 10 t1 = x t 2 = y t 3 = t 1 t 2 t 4 = sin t 1 t 5 = t 3 + t 4 t 6 = t t 7 = t 2 2 t 8 = 3t 7 t 9 = t t 10 = t 6 t 9 Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

25 F77 code: costfunc.f s ubroutine c o s t f u n c ( x, y, f ) t1 = x t2 = y t3 = t1 t2 t4 = s i n ( t1 ) t5 = t3 + t4 t6 = t5 + 4 t7 = t2 2 t8 = 3.0 t7 t9 = t t10 = t6 t9 f = t10 end Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

26 Differentiation: Direct mode Apply chain rule of differentiation t 1 = x ṫ 1 = ẋ t 2 = y ṫ 2 = ẏ t 3 = t 1 t 2 ṫ 3 = ṫ 1 t 2 + t 1 ṫ 2 t 4 = sin(t 1 ) ṫ 4 = cos(t 1 )ṫ 1 t 5 = t 3 + t 4 ṫ 5 = ṫ 3 + ṫ 4 t 6 = t ṫ 6 = ṫ 5 t 7 = t 2 2 ṫ 7 = t 8 = 3t 7 ṫ 8 = 2t 2 ṫ 2 3ṫ 7 t 9 = t ṫ 9 = ṫ 8 t 10 = t 6 t 9 ṫ 10 = ṫ 6 t 9 + t 6 ṫ 9 ẋ = 1, ẏ = 0, ṫ 10 = f x and ẋ = 0, ẏ = 1, ṫ 10 = f y tapenade -d -vars "x y" -outvars f costfunc.f Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

27 Automatic Differentiation: Direct mode SUBROUTINE COSTFUNC_D(x, xd, y, yd, f, fd) t1d = xd t1 = x t2d = yd t2 = y t3d = t1d*t2 + t1*t2d t3 = t1*t2 t4d = t1d*cos(t1) t4 = SIN(t1) t5d = t3d + t4d t5 = t3 + t4 t6d = t5d t6 = t5 + 4 t7d = 2*t2*t2d t7 = t2**2 t8d = 3.0*t7d t8 = 3.0*t7 t9d = t8d t9 = t t10d = t6d*t9 + t6*t9d t10 = t6*t9 fd = t10d f = t10 END Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

28 Backward differentiation Program P is a sequence of computations F k T 0 = X, given k th line t k = F k (T k 1 ), T k = Function is a composition [ Tk 1 F = F p F p 1... F 2 F 1 Chain rule X = [F (X)] Ȳ = [F 1(T 0 )] [F 2(T 1 )]... [F p 1(T p 2 )] [F p(t p 1 )] Ȳ X, Ȳ X cost( X) = 4 cost(y ) t k ] Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

29 Differentiation: Reverse mode Apply chain rule of differentiation in reverse t 1 = x t 10 = 1 t 2 = y t 9 = t 10 t 10,9 = t 6 t 3 = t 1 t 2 t 8 = t 9 t 9,8 = t 6 t 4 = sin(t 1 ) t 7 = t 8 t 8,7 = 3t 6 t 5 = t 3 + t 4 t 6 = t 10 t 10,6 = t 9 t 6 = t t 5 = t 6 t 6,5 = t 9 t 7 = t 2 2 t 4 = t 5 t 5,4 = t 9 t 8 = 3t 7 t 3 = t 5 t 5,3 = t 9 t 9 = t t 2 = t 7 t 7,2 + t 3 t 3,2 = 6t 2 t 6 + t 1 t 9 t 10 = t 6 t 9 t 1 = t 4 t 4,1 + t 3 t 3,1 = t 9 cos(t 1 ) + t 9 t 2 t 1 = f x, t 2 = f y tapenade -b -vars "x y" -outvars f costfunc.f Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

30 Automatic Differentiation: Reverse mode SUBROUTINE COSTFUNC_B(x, xb, y, yb, f, fb) t1 = x t2 = y t3 = t1*t2 t4 = SIN(t1) t5 = t3 + t4 t6 = t5 + 4 t7 = t2**2 t8 = 3.0*t7 t9 = t t10b = fb t6b = t9*t10b t9b = t6*t10b t8b = t9b t7b = 3.0*t8b t5b = t6b t3b = t5b t2b = t1*t3b + 2*t2*t7b t4b = t5b t1b = t2*t3b + COS(t1)*t4b yb = t2b xb = t1b fb = 0.0 END Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

31 Direct versus reverse AD F : R m R n Direct mode Reverse mode cost(j) = m 4 cost(p ) cost(j) = n 4 cost(p ) Scalar output F R, n = 1 Direct mode gives F Ẋ for given vector Ẋ Reverse mode gives F, hence preferred Vector output F R n Direct mode gives F Ẋ for given vector Ẋ use for sensitivity equation approach Reverse mode gives ( F ) Ȳ use for adjoint approach Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

32 Black-box AD cost depends on alpha call ComputeCost(alpha, cost) Subroutine for cost function subroutine ComputeCost(alpha, cost) call SolveState(alpha, u) call CostFun(alpha, u, cost) end Reverse differentiation using AD tapenade -backward \ -head ComputeCost \ -vars alpha \ -outvars cost \ ComputeCost.f SolveState.f CostFun.f Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

33 Black-box AD Diffentiated subroutines: ComputeCost b.f, SolveState b.f, CostFun b.f subroutine ComputeCost_b(alpha,alphab,cost,costb) call SolveState(alpha, u) call CostFun_b(alpha, alphab, u, ub, cost, costb) call SolveState_b(alpha, alphab, u, ub) end Compute gradient using costb = 1.0 call ComputeCost_b(alpha, alphab, cost, costb) Gradient given by alphab alphab = (cost) (alpha) Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

34 AD for iterative problems Solve state equation R(α, u) = 0 as steady state of du dt + R(α, u) = 0, u(0) = u o State solver subroutine SolveState(alpha, u) u = 0.0 do call Residue(alpha, u, res) u = u - dt * res while( abs(res) > TOL) end subroutine Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

35 AD for iterative problems Adjoint solver, hand written subroutine SolveState_b(alpha,alphab,u,ub) resb = 0.0 do ub1 = 0.0 call Residue_bu(alpha,u,ub1,res,resb) resb = resb - (ub + ub1) while( abs(ub+ub1).gt. 1.0e-5) call Residue_ba(alpha,alphab,u,res,resb) end subroutine resb = Adjoint variable ub = J u, ub1 = [ ] R v u Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

36 Adjoint iterative scheme Forward iterations linearly stable Adjoint iteration u n+1 = u n t R(α, u n ), t < S(σ(R )) v n+1 = v n t { [R (α, u )] v n + J } u [R ] has same eigenvalues as R = adjoint iterations stable under same condition on t Preconditioner for adjoint = (preconditioner for primal problem) Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

37 AD tools Source transformation (ST) and operator overloading (OO) See Tool Modes Method Lang ADIFOR F ST Fortran ADOLC F/B OO C TAPENADE F/B ST Fortran/C TAF/TAMC F/B ST Fortran/C MAD F OO Matlab Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

38 Quasi 1-D flow Inflow x h(x) Outflow Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

39 Quasi 1-D flow Quasi 1-D flow in a duct t (hu) + dh (hf) = P, x dx x (a, b) t > 0 ρ ρu 0 U = ρu, f = p + ρu 2, P = p E (E + p)u 0 h(x) = cross-section height of duct Inverse design: find shape h to get pressure distribution p Optimization problem: find the shape h which minimizes J = b a (p p ) 2 dx Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

40 Quasi 1-D flow Inflow face 1 i N i 1/2 i + 1/2 Outflow face Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

41 Quasi 1-D flow Finite volume scheme for cell C i = [x i 1/2, x i+1/2 ] du i h i dt + h i+1/2f i+1/2 h i 1/2 F i 1/2 x Discrete cost function = (h i+1/2 h i 1/2 ) P i x J = N (p i p i ) 2 i=1 Control variables N = 100 h 1/2, h 1+1/2,..., h i+1/2,..., h N+1/2 Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

42 Duct shape Duct shape Target shape Current shape 1.6 h x Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

43 Target pressure distribution p Target pressure AUSMDV KFVS LF Pressure x Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

44 Current pressure distribution Starting pressure AUSMDV KFVS LF Pressure x Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

45 Adjoint density 5 0 AUSMDV KFVS LF 5 Adjoint density x Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

46 Convergence history: Explicit Euler Residue Convergence history with AUSMDV flux Flow Adjoint No of iterations Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

47 Shape gradient Gradient AUSMDV KFVS LF 25 Gradient x Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

48 Shape gradient Gradient Gradient AUSMDV KFVS LF x Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

49 Validation of Shape gradient 35 Gradient with AUSMDV flux B Gradient A C x Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

50 Validation of shape gradient J h J(h + h) J(h h) 2 h h A B C AD Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

51 Gradient smoothing Non-smooth gradients G especially in the presence of shocks Smooth using an elliptic equation ) (1 ɛ(x) d2 dx 2 Ḡ(x) = G(x) L i = ɛ i = { G i+1 G i + G i G i 1 }L i G i+1 2G i + G i 1 max( G i+1 G i + G i G i 1, TOL) Finite difference with Jacobi iterations Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

52 Gradient smoothing Gradient using AUSMDV flux Original gradient Smoothed gradient 25 Gradient x Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

53 Quasi 1-D optimization: Shape Target Initial h x Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

54 Quasi 1-D optimization: Final shape h Target Initial Final x Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

55 Quasi 1-D optimization: Pressure Pressure 1.5 Target Initial Final x Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

56 Quasi 1-D optimization: Convergence 10 0 Cost Gradient Cost/Gradient No. of iterations Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

57 Quasi 1-D optimization: Adjoint density 0 5 Adjoint density Initial Final x Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

58 Example codes 1-D example: nozzle flow (TAPENADE) 1-D example: nozzle flow (ADOLC) 2-D example: unstructured grid Euler solver (TAPENADE) 2/3-D example: structured grid Euler solver (TAPENADE) Praveen. C (TIFR-CAM) Optimization BARC, 6 Oct / 58

Adjoint code development and optimization using automatic differentiation (AD)

Adjoint code development and optimization using automatic differentiation (AD) Adjoint code development and optimization using automatic differentiation (AD) Praveen. C Computational and Theoretical Fluid Dynamics Division National Aerospace Laboratories Bangalore - 560 037 CTFD

More information

Airfoil shape optimization using adjoint method and automatic differentiation

Airfoil shape optimization using adjoint method and automatic differentiation Airfoil shape optimization using adjoint method and automatic differentiation Praveen. C praveen@math.tifrbng.res.in Tata Institute of Fundamental Research Center for Applicable Mathematics Bangalore 5665

More information

Numerical Solution of Partial Differential Equations governing compressible flows

Numerical Solution of Partial Differential Equations governing compressible flows Numerical Solution of Partial Differential Equations governing compressible flows Praveen. C praveen@math.tifrbng.res.in Tata Institute of Fundamental Research Center for Applicable Mathematics Bangalore

More information

Module III: Partial differential equations and optimization

Module III: Partial differential equations and optimization Module III: Partial differential equations and optimization Martin Berggren Department of Information Technology Uppsala University Optimization for differential equations Content Martin Berggren (UU)

More information

Efficient Hessian Calculation using Automatic Differentiation

Efficient Hessian Calculation using Automatic Differentiation 25th AIAA Applied Aerodynamics Conference, 25-28 June 2007, Miami Efficient Hessian Calculation using Automatic Differentiation Devendra P. Ghate and Michael B. Giles Oxford University Computing Laboratory,

More information

Automatic Differentiation for Optimum Design, Applied to Sonic Boom Reduction

Automatic Differentiation for Optimum Design, Applied to Sonic Boom Reduction Automatic Differentiation for Optimum Design, Applied to Sonic Boom Reduction Laurent Hascoët, Mariano Vázquez, Alain Dervieux Laurent.Hascoet@sophia.inria.fr Tropics Project, INRIA Sophia-Antipolis AD

More information

Discrete and continuous adjoint method for compressible CFD J. Peter ONERA

Discrete and continuous adjoint method for compressible CFD J. Peter ONERA Discrete and continuous adjoint method for compressible CFD J. Peter ONERA J. Peter 1 1 ONERA DMFN October 2, 2014 J. Peter (ONERA DMFN) Adjoint method for compressible CFD October 2, 2014 1 / 60 Outline

More information

Is My CFD Mesh Adequate? A Quantitative Answer

Is My CFD Mesh Adequate? A Quantitative Answer Is My CFD Mesh Adequate? A Quantitative Answer Krzysztof J. Fidkowski Gas Dynamics Research Colloqium Aerospace Engineering Department University of Michigan January 26, 2011 K.J. Fidkowski (UM) GDRC 2011

More information

Finite volume method on unstructured grids

Finite volume method on unstructured grids Finite volume method on unstructured grids Praveen. C praveen@math.tifrbng.res.in Tata Institute of Fundamental Research Center for Applicable Mathematics Bangalore 560065 http://math.tifrbng.res.in/~praveen

More information

PDE Solvers for Fluid Flow

PDE Solvers for Fluid Flow PDE Solvers for Fluid Flow issues and algorithms for the Streaming Supercomputer Eran Guendelman February 5, 2002 Topics Equations for incompressible fluid flow 3 model PDEs: Hyperbolic, Elliptic, Parabolic

More information

CORBIS: Code Raréfié Bidimensionnel Implicite Stationnaire

CORBIS: Code Raréfié Bidimensionnel Implicite Stationnaire CORBIS: Code Raréfié Bidimensionnel Implicite Stationnaire main ingredients: [LM (M3AS 00, JCP 00)] plane flow: D BGK Model conservative and entropic velocity discretization space discretization: finite

More information

Controlled Diffusions and Hamilton-Jacobi Bellman Equations

Controlled Diffusions and Hamilton-Jacobi Bellman Equations Controlled Diffusions and Hamilton-Jacobi Bellman Equations Emo Todorov Applied Mathematics and Computer Science & Engineering University of Washington Winter 2014 Emo Todorov (UW) AMATH/CSE 579, Winter

More information

Lecture 42 Determining Internal Node Values

Lecture 42 Determining Internal Node Values Lecture 42 Determining Internal Node Values As seen in the previous section, a finite element solution of a boundary value problem boils down to finding the best values of the constants {C j } n, which

More information

Review and Unification of Methods for Computing Derivatives of Multidisciplinary Computational Models

Review and Unification of Methods for Computing Derivatives of Multidisciplinary Computational Models his is a preprint of the following article, which is available from http://mdolabenginumichedu J R R A Martins and J Hwang Review and unification of methods for computing derivatives of multidisciplinary

More information

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 11 Partial Differential Equations Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002.

More information

Finite Volume Method

Finite Volume Method Finite Volume Method An Introduction Praveen. C CTFD Division National Aerospace Laboratories Bangalore 560 037 email: praveen@cfdlab.net April 7, 2006 Praveen. C (CTFD, NAL) FVM CMMACS 1 / 65 Outline

More information

AM 205: lecture 19. Last time: Conditions for optimality, Newton s method for optimization Today: survey of optimization methods

AM 205: lecture 19. Last time: Conditions for optimality, Newton s method for optimization Today: survey of optimization methods AM 205: lecture 19 Last time: Conditions for optimality, Newton s method for optimization Today: survey of optimization methods Quasi-Newton Methods General form of quasi-newton methods: x k+1 = x k α

More information

Numerical Optimization Algorithms

Numerical Optimization Algorithms Numerical Optimization Algorithms 1. Overview. Calculus of Variations 3. Linearized Supersonic Flow 4. Steepest Descent 5. Smoothed Steepest Descent Overview 1 Two Main Categories of Optimization Algorithms

More information

minimize x subject to (x 2)(x 4) u,

minimize x subject to (x 2)(x 4) u, Math 6366/6367: Optimization and Variational Methods Sample Preliminary Exam Questions 1. Suppose that f : [, L] R is a C 2 -function with f () on (, L) and that you have explicit formulae for

More information

AM 205: lecture 19. Last time: Conditions for optimality Today: Newton s method for optimization, survey of optimization methods

AM 205: lecture 19. Last time: Conditions for optimality Today: Newton s method for optimization, survey of optimization methods AM 205: lecture 19 Last time: Conditions for optimality Today: Newton s method for optimization, survey of optimization methods Optimality Conditions: Equality Constrained Case As another example of equality

More information

A COUPLED-ADJOINT METHOD FOR HIGH-FIDELITY AERO-STRUCTURAL OPTIMIZATION

A COUPLED-ADJOINT METHOD FOR HIGH-FIDELITY AERO-STRUCTURAL OPTIMIZATION A COUPLED-ADJOINT METHOD FOR HIGH-FIDELITY AERO-STRUCTURAL OPTIMIZATION Joaquim Rafael Rost Ávila Martins Department of Aeronautics and Astronautics Stanford University Ph.D. Oral Examination, Stanford

More information

A Crash-Course on the Adjoint Method for Aerodynamic Shape Optimization

A Crash-Course on the Adjoint Method for Aerodynamic Shape Optimization A Crash-Course on the Adjoint Method for Aerodynamic Shape Optimization Juan J. Alonso Department of Aeronautics & Astronautics Stanford University jjalonso@stanford.edu Lecture 19 AA200b Applied Aerodynamics

More information

Derivatives for Time-Spectral Computational Fluid Dynamics using an Automatic Differentiation Adjoint

Derivatives for Time-Spectral Computational Fluid Dynamics using an Automatic Differentiation Adjoint Derivatives for Time-Spectral Computational Fluid Dynamics using an Automatic Differentiation Adjoint Charles A. Mader University of Toronto Institute for Aerospace Studies Toronto, Ontario, Canada Joaquim

More information

An Investigation of the Attainable Efficiency of Flight at Mach One or Just Beyond

An Investigation of the Attainable Efficiency of Flight at Mach One or Just Beyond An Investigation of the Attainable Efficiency of Flight at Mach One or Just Beyond Antony Jameson Department of Aeronautics and Astronautics AIAA Aerospace Sciences Meeting, Reno, NV AIAA Paper 2007-0037

More information

Optimal control problems with PDE constraints

Optimal control problems with PDE constraints Optimal control problems with PDE constraints Maya Neytcheva CIM, October 2017 General framework Unconstrained optimization problems min f (q) q x R n (real vector) and f : R n R is a smooth function.

More information

Certification of Derivatives Computed by Automatic Differentiation

Certification of Derivatives Computed by Automatic Differentiation Certification of Derivatives Computed by Automatic Differentiation Mauricio Araya Polo & Laurent Hascoët Project TROPCS WSEAS, Cancún, México, May 13, 2005 1 Plan ntroduction (Background) Automatic Differentiation

More information

How Many Steps are Required to Solve the Euler Equations of Steady, Compressible Flow: In Search of a Fast Solution Algorithm

How Many Steps are Required to Solve the Euler Equations of Steady, Compressible Flow: In Search of a Fast Solution Algorithm AIAA 2 2673 How Many Steps are Required to Solve the Euler Equations of Steady, Compressible Flow: In Search of a Fast Solution Algorithm Antony Jameson Stanford University Stanford, CA 9435 D. A. Caughey

More information

Chapter Two: Numerical Methods for Elliptic PDEs. 1 Finite Difference Methods for Elliptic PDEs

Chapter Two: Numerical Methods for Elliptic PDEs. 1 Finite Difference Methods for Elliptic PDEs Chapter Two: Numerical Methods for Elliptic PDEs Finite Difference Methods for Elliptic PDEs.. Finite difference scheme. We consider a simple example u := subject to Dirichlet boundary conditions ( ) u

More information

Sensitivity analysis by adjoint Automatic Differentiation and Application

Sensitivity analysis by adjoint Automatic Differentiation and Application Sensitivity analysis by adjoint Automatic Differentiation and Application Anca Belme Massimiliano Martinelli Laurent Hascoët Valérie Pascual Alain Dervieux INRIA Sophia-Antipolis Project TROPICS Alain.Dervieux@inria.fr

More information

Trajectory-based optimization

Trajectory-based optimization Trajectory-based optimization Emo Todorov Applied Mathematics and Computer Science & Engineering University of Washington Winter 2012 Emo Todorov (UW) AMATH/CSE 579, Winter 2012 Lecture 6 1 / 13 Using

More information

Lecture 11: Arclength and Line Integrals

Lecture 11: Arclength and Line Integrals Lecture 11: Arclength and Line Integrals Rafikul Alam Department of Mathematics IIT Guwahati Parametric curves Definition: A continuous mapping γ : [a, b] R n is called a parametric curve or a parametrized

More information

Discretization Error Reduction through r Adaptation in CFD

Discretization Error Reduction through r Adaptation in CFD Discretization Error Reduction through r Adaptation in CFD ASME Verification and Validation Symposium May 13 15, 2015 William C. Tyson, Christopher J. Roy, Joseph M. Derlaga, and Charles W. Jackson Aerospace

More information

Using AD to derive adjoints for large, legacy CFD solvers

Using AD to derive adjoints for large, legacy CFD solvers Using AD to derive adjoints for large, legacy CFD solvers J.-D. Müller Queen Mary, University of London collaborators: D. Jones, F. Christakpoulos, S. Xu, QMUL S. Bayyuk, ESI, Huntsville AL c Jens-Dominik

More information

Efficient solution of stationary Euler flows with critical points and shocks

Efficient solution of stationary Euler flows with critical points and shocks Efficient solution of stationary Euler flows with critical points and shocks Hans De Sterck Department of Applied Mathematics University of Waterloo 1. Introduction consider stationary solutions of hyperbolic

More information

Exercises for Multivariable Differential Calculus XM521

Exercises for Multivariable Differential Calculus XM521 This document lists all the exercises for XM521. The Type I (True/False) exercises will be given, and should be answered, online immediately following each lecture. The Type III exercises are to be done

More information

Numerical Optimization

Numerical Optimization Constrained Optimization Computer Science and Automation Indian Institute of Science Bangalore 560 012, India. NPTEL Course on Constrained Optimization Constrained Optimization Problem: min h j (x) 0,

More information

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 9

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 9 Spring 2015 Lecture 9 REVIEW Lecture 8: Direct Methods for solving (linear) algebraic equations Gauss Elimination LU decomposition/factorization Error Analysis for Linear Systems and Condition Numbers

More information

Mathematical Economics. Lecture Notes (in extracts)

Mathematical Economics. Lecture Notes (in extracts) Prof. Dr. Frank Werner Faculty of Mathematics Institute of Mathematical Optimization (IMO) http://math.uni-magdeburg.de/ werner/math-ec-new.html Mathematical Economics Lecture Notes (in extracts) Winter

More information

ENGI Partial Differentiation Page y f x

ENGI Partial Differentiation Page y f x ENGI 3424 4 Partial Differentiation Page 4-01 4. Partial Differentiation For functions of one variable, be found unambiguously by differentiation: y f x, the rate of change of the dependent variable can

More information

Basic Aspects of Discretization

Basic Aspects of Discretization Basic Aspects of Discretization Solution Methods Singularity Methods Panel method and VLM Simple, very powerful, can be used on PC Nonlinear flow effects were excluded Direct numerical Methods (Field Methods)

More information

Computation Fluid Dynamics

Computation Fluid Dynamics Computation Fluid Dynamics CFD I Jitesh Gajjar Maths Dept Manchester University Computation Fluid Dynamics p.1/189 Garbage In, Garbage Out We will begin with a discussion of errors. Useful to understand

More information

Outline. 1 Partial Differential Equations. 2 Numerical Methods for PDEs. 3 Sparse Linear Systems

Outline. 1 Partial Differential Equations. 2 Numerical Methods for PDEs. 3 Sparse Linear Systems Outline Partial Differential Equations Numerical Methods for PDEs Sparse Linear Systems 1 Partial Differential Equations 2 Numerical Methods for PDEs 3 Sparse Linear Systems Michael T Heath Scientific

More information

Adjoint-based aerodynamic shape optimization

Adjoint-based aerodynamic shape optimization IT Licentiate theses 2003-012 Adjoint-based aerodynamic shape optimization OLIVIER AMOIGNON UPPSALA UNIVERSITY Department of Information Technology Adjoint-based aerodynamic shape optimization BY OLIVIER

More information

Gradient-Based Optimum Aerodynamic Design Using Adjoint Methods

Gradient-Based Optimum Aerodynamic Design Using Adjoint Methods Gradient-Based Optimum Aerodynamic Design Using Adjoint Methods Lei Xie Dissertation submitted to the Faculty of the Virginia Polytechnic Institute and State University in partial fulfillment of the requirements

More information

Intro to Automatic Differentiation

Intro to Automatic Differentiation Intro to Automatic Differentiation Thomas Kaminski (http://fastopt.com) Thanks to: Simon Blessing (FastOpt), Ralf Giering (FastOpt), Nadine Gobron (JRC), Wolfgang Knorr (QUEST), Thomas Lavergne (Met.No),

More information

Written Examination

Written Examination Division of Scientific Computing Department of Information Technology Uppsala University Optimization Written Examination 202-2-20 Time: 4:00-9:00 Allowed Tools: Pocket Calculator, one A4 paper with notes

More information

Inverse problems Total Variation Regularization Mark van Kraaij Casa seminar 23 May 2007 Technische Universiteit Eindh ove n University of Technology

Inverse problems Total Variation Regularization Mark van Kraaij Casa seminar 23 May 2007 Technische Universiteit Eindh ove n University of Technology Inverse problems Total Variation Regularization Mark van Kraaij Casa seminar 23 May 27 Introduction Fredholm first kind integral equation of convolution type in one space dimension: g(x) = 1 k(x x )f(x

More information

NONLINEAR DIFFUSION PDES

NONLINEAR DIFFUSION PDES NONLINEAR DIFFUSION PDES Erkut Erdem Hacettepe University March 5 th, 0 CONTENTS Perona-Malik Type Nonlinear Diffusion Edge Enhancing Diffusion 5 References 7 PERONA-MALIK TYPE NONLINEAR DIFFUSION The

More information

SOLUTIONS TO THE FINAL EXAM. December 14, 2010, 9:00am-12:00 (3 hours)

SOLUTIONS TO THE FINAL EXAM. December 14, 2010, 9:00am-12:00 (3 hours) SOLUTIONS TO THE 18.02 FINAL EXAM BJORN POONEN December 14, 2010, 9:00am-12:00 (3 hours) 1) For each of (a)-(e) below: If the statement is true, write TRUE. If the statement is false, write FALSE. (Please

More information

Getting Some Big Air

Getting Some Big Air Getting Some Big Air Control #10499 February 14, 2011 Abstract In this paper we address the problem of optimizing a ramp for a snowboarder to travel. Our approach is two sided. We first address the forward

More information

Notes on PCG for Sparse Linear Systems

Notes on PCG for Sparse Linear Systems Notes on PCG for Sparse Linear Systems Luca Bergamaschi Department of Civil Environmental and Architectural Engineering University of Padova e-mail luca.bergamaschi@unipd.it webpage www.dmsa.unipd.it/

More information

Ordinary Differential Equations: Initial Value problems (IVP)

Ordinary Differential Equations: Initial Value problems (IVP) Chapter Ordinary Differential Equations: Initial Value problems (IVP) Many engineering applications can be modeled as differential equations (DE) In this book, our emphasis is about how to use computer

More information

Preparation for the Final

Preparation for the Final Preparation for the Final Basic Set of Problems that you should be able to do: - all problems on your tests (- 3 and their samples) - ex tra practice problems in this documents. The final will be a mix

More information

ENGI Partial Differentiation Page y f x

ENGI Partial Differentiation Page y f x ENGI 344 4 Partial Differentiation Page 4-0 4. Partial Differentiation For functions of one variable, be found unambiguously by differentiation: y f x, the rate of change of the dependent variable can

More information

Inverse Lax-Wendroff Procedure for Numerical Boundary Conditions of. Conservation Laws 1. Abstract

Inverse Lax-Wendroff Procedure for Numerical Boundary Conditions of. Conservation Laws 1. Abstract Inverse Lax-Wendroff Procedure for Numerical Boundary Conditions of Conservation Laws Sirui Tan and Chi-Wang Shu 3 Abstract We develop a high order finite difference numerical boundary condition for solving

More information

Lecture 4: Numerical solution of ordinary differential equations

Lecture 4: Numerical solution of ordinary differential equations Lecture 4: Numerical solution of ordinary differential equations Department of Mathematics, ETH Zürich General explicit one-step method: Consistency; Stability; Convergence. High-order methods: Taylor

More information

A high-order discontinuous Galerkin solver for 3D aerodynamic turbulent flows

A high-order discontinuous Galerkin solver for 3D aerodynamic turbulent flows A high-order discontinuous Galerkin solver for 3D aerodynamic turbulent flows F. Bassi, A. Crivellini, D. A. Di Pietro, S. Rebay Dipartimento di Ingegneria Industriale, Università di Bergamo CERMICS-ENPC

More information

STCE. Adjoint Code Design Patterns. Uwe Naumann. RWTH Aachen University, Germany. QuanTech Conference, London, April 2016

STCE. Adjoint Code Design Patterns. Uwe Naumann. RWTH Aachen University, Germany. QuanTech Conference, London, April 2016 Adjoint Code Design Patterns Uwe Naumann RWTH Aachen University, Germany QuanTech Conference, London, April 2016 Outline Why Adjoints? What Are Adjoints? Software Tool Support: dco/c++ Adjoint Code Design

More information

16.2 Line Integrals. Lukas Geyer. M273, Fall Montana State University. Lukas Geyer (MSU) 16.2 Line Integrals M273, Fall / 21

16.2 Line Integrals. Lukas Geyer. M273, Fall Montana State University. Lukas Geyer (MSU) 16.2 Line Integrals M273, Fall / 21 16.2 Line Integrals Lukas Geyer Montana State University M273, Fall 211 Lukas Geyer (MSU) 16.2 Line Integrals M273, Fall 211 1 / 21 Scalar Line Integrals Definition f (x) ds = lim { s i } N f (P i ) s

More information

Degree Master of Science in Mathematical Modelling and Scientific Computing Mathematical Methods I Thursday, 12th January 2012, 9:30 a.m.- 11:30 a.m.

Degree Master of Science in Mathematical Modelling and Scientific Computing Mathematical Methods I Thursday, 12th January 2012, 9:30 a.m.- 11:30 a.m. Degree Master of Science in Mathematical Modelling and Scientific Computing Mathematical Methods I Thursday, 12th January 2012, 9:30 a.m.- 11:30 a.m. Candidates should submit answers to a maximum of four

More information

7a3 2. (c) πa 3 (d) πa 3 (e) πa3

7a3 2. (c) πa 3 (d) πa 3 (e) πa3 1.(6pts) Find the integral x, y, z d S where H is the part of the upper hemisphere of H x 2 + y 2 + z 2 = a 2 above the plane z = a and the normal points up. ( 2 π ) Useful Facts: cos = 1 and ds = ±a sin

More information

Notation Nodes are data points at which functional values are available or at which you wish to compute functional values At the nodes fx i

Notation Nodes are data points at which functional values are available or at which you wish to compute functional values At the nodes fx i LECTURE 6 NUMERICAL DIFFERENTIATION To find discrete approximations to differentiation (since computers can only deal with functional values at discrete points) Uses of numerical differentiation To represent

More information

COMPLETE CONFIGURATION AERO-STRUCTURAL OPTIMIZATION USING A COUPLED SENSITIVITY ANALYSIS METHOD

COMPLETE CONFIGURATION AERO-STRUCTURAL OPTIMIZATION USING A COUPLED SENSITIVITY ANALYSIS METHOD COMPLETE CONFIGURATION AERO-STRUCTURAL OPTIMIZATION USING A COUPLED SENSITIVITY ANALYSIS METHOD Joaquim R. R. A. Martins Juan J. Alonso James J. Reuther Department of Aeronautics and Astronautics Stanford

More information

Vasil Khalidov & Miles Hansard. C.M. Bishop s PRML: Chapter 5; Neural Networks

Vasil Khalidov & Miles Hansard. C.M. Bishop s PRML: Chapter 5; Neural Networks C.M. Bishop s PRML: Chapter 5; Neural Networks Introduction The aim is, as before, to find useful decompositions of the target variable; t(x) = y(x, w) + ɛ(x) (3.7) t(x n ) and x n are the observations,

More information

Differential Equation Types. Moritz Diehl

Differential Equation Types. Moritz Diehl Differential Equation Types Moritz Diehl Overview Ordinary Differential Equations (ODE) Differential Algebraic Equations (DAE) Partial Differential Equations (PDE) Delay Differential Equations (DDE) Ordinary

More information

Finite difference method for elliptic problems: I

Finite difference method for elliptic problems: I Finite difference method for elliptic problems: I Praveen. C praveen@math.tifrbng.res.in Tata Institute of Fundamental Research Center for Applicable Mathematics Bangalore 560065 http://math.tifrbng.res.in/~praveen

More information

Constrained optimization. Unconstrained optimization. One-dimensional. Multi-dimensional. Newton with equality constraints. Active-set method.

Constrained optimization. Unconstrained optimization. One-dimensional. Multi-dimensional. Newton with equality constraints. Active-set method. Optimization Unconstrained optimization One-dimensional Multi-dimensional Newton s method Basic Newton Gauss- Newton Quasi- Newton Descent methods Gradient descent Conjugate gradient Constrained optimization

More information

Numerical solutions of nonlinear systems of equations

Numerical solutions of nonlinear systems of equations Numerical solutions of nonlinear systems of equations Tsung-Ming Huang Department of Mathematics National Taiwan Normal University, Taiwan E-mail: min@math.ntnu.edu.tw August 28, 2011 Outline 1 Fixed points

More information

Numerical Solution Techniques in Mechanical and Aerospace Engineering

Numerical Solution Techniques in Mechanical and Aerospace Engineering Numerical Solution Techniques in Mechanical and Aerospace Engineering Chunlei Liang LECTURE 3 Solvers of linear algebraic equations 3.1. Outline of Lecture Finite-difference method for a 2D elliptic PDE

More information

Entropy stable schemes for compressible flows on unstructured meshes

Entropy stable schemes for compressible flows on unstructured meshes Entropy stable schemes for compressible flows on unstructured meshes Tata Institute of Fundamental Research Center for Applicable Mathematics Bangalore deep@math.tifrbng.res.in http://math.tifrbng.res.in/

More information

Numerical Algorithms as Dynamical Systems

Numerical Algorithms as Dynamical Systems A Study on Numerical Algorithms as Dynamical Systems Moody Chu North Carolina State University What This Study Is About? To recast many numerical algorithms as special dynamical systems, whence to derive

More information

Application of Dual Time Stepping to Fully Implicit Runge Kutta Schemes for Unsteady Flow Calculations

Application of Dual Time Stepping to Fully Implicit Runge Kutta Schemes for Unsteady Flow Calculations Application of Dual Time Stepping to Fully Implicit Runge Kutta Schemes for Unsteady Flow Calculations Antony Jameson Department of Aeronautics and Astronautics, Stanford University, Stanford, CA, 94305

More information

MCE693/793: Analysis and Control of Nonlinear Systems

MCE693/793: Analysis and Control of Nonlinear Systems MCE693/793: Analysis and Control of Nonlinear Systems Introduction to Nonlinear Controllability and Observability Hanz Richter Mechanical Engineering Department Cleveland State University Definition of

More information

AMS526: Numerical Analysis I (Numerical Linear Algebra)

AMS526: Numerical Analysis I (Numerical Linear Algebra) AMS526: Numerical Analysis I (Numerical Linear Algebra) Lecture 21: Sensitivity of Eigenvalues and Eigenvectors; Conjugate Gradient Method Xiangmin Jiao Stony Brook University Xiangmin Jiao Numerical Analysis

More information

x + ye z2 + ze y2, y + xe z2 + ze x2, z and where T is the

x + ye z2 + ze y2, y + xe z2 + ze x2, z and where T is the 1.(8pts) Find F ds where F = x + ye z + ze y, y + xe z + ze x, z and where T is the T surface in the pictures. (The two pictures are two views of the same surface.) The boundary of T is the unit circle

More information

Poisson Equation in 2D

Poisson Equation in 2D A Parallel Strategy Department of Mathematics and Statistics McMaster University March 31, 2010 Outline Introduction 1 Introduction Motivation Discretization Iterative Methods 2 Additive Schwarz Method

More information

Math 234 Exam 3 Review Sheet

Math 234 Exam 3 Review Sheet Math 234 Exam 3 Review Sheet Jim Brunner LIST OF TOPIS TO KNOW Vector Fields lairaut s Theorem & onservative Vector Fields url Divergence Area & Volume Integrals Using oordinate Transforms hanging the

More information

Motivation: We have already seen an example of a system of nonlinear equations when we studied Gaussian integration (p.8 of integration notes)

Motivation: We have already seen an example of a system of nonlinear equations when we studied Gaussian integration (p.8 of integration notes) AMSC/CMSC 460 Computational Methods, Fall 2007 UNIT 5: Nonlinear Equations Dianne P. O Leary c 2001, 2002, 2007 Solving Nonlinear Equations and Optimization Problems Read Chapter 8. Skip Section 8.1.1.

More information

Optimal Control. Lecture 18. Hamilton-Jacobi-Bellman Equation, Cont. John T. Wen. March 29, Ref: Bryson & Ho Chapter 4.

Optimal Control. Lecture 18. Hamilton-Jacobi-Bellman Equation, Cont. John T. Wen. March 29, Ref: Bryson & Ho Chapter 4. Optimal Control Lecture 18 Hamilton-Jacobi-Bellman Equation, Cont. John T. Wen Ref: Bryson & Ho Chapter 4. March 29, 2004 Outline Hamilton-Jacobi-Bellman (HJB) Equation Iterative solution of HJB Equation

More information

On limiting for higher order discontinuous Galerkin method for 2D Euler equations

On limiting for higher order discontinuous Galerkin method for 2D Euler equations On limiting for higher order discontinuous Galerkin method for 2D Euler equations Juan Pablo Gallego-Valencia, Christian Klingenberg, Praveen Chandrashekar October 6, 205 Abstract We present an implementation

More information

FOR many computational fluid dynamics (CFD) applications, engineers require information about multiple solution

FOR many computational fluid dynamics (CFD) applications, engineers require information about multiple solution AIAA Aviation 13-17 June 2016, Washington, D.C. 46th AIAA Fluid Dynamics Conference AIAA 2016-3809 Improved Functional-Based Error Estimation and Adaptation without Adjoints William C. Tyson *, Katarzyna

More information

Ordinary Differential Equations I

Ordinary Differential Equations I Ordinary Differential Equations I CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Ordinary Differential Equations I 1 / 32 Theme of Last Few

More information

Paul Schrimpf. October 17, UBC Economics 526. Constrained optimization. Paul Schrimpf. First order conditions. Second order conditions

Paul Schrimpf. October 17, UBC Economics 526. Constrained optimization. Paul Schrimpf. First order conditions. Second order conditions UBC Economics 526 October 17, 2012 .1.2.3.4 Section 1 . max f (x) s.t. h(x) = c f : R n R, h : R n R m Draw picture of n = 2 and m = 1 At optimum, constraint tangent to level curve of function Rewrite

More information

Finite Difference Methods for Boundary Value Problems

Finite Difference Methods for Boundary Value Problems Finite Difference Methods for Boundary Value Problems October 2, 2013 () Finite Differences October 2, 2013 1 / 52 Goals Learn steps to approximate BVPs using the Finite Difference Method Start with two-point

More information

Differential equations, comprehensive exam topics and sample questions

Differential equations, comprehensive exam topics and sample questions Differential equations, comprehensive exam topics and sample questions Topics covered ODE s: Chapters -5, 7, from Elementary Differential Equations by Edwards and Penney, 6th edition.. Exact solutions

More information

Ordinary Differential Equations I

Ordinary Differential Equations I Ordinary Differential Equations I CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Ordinary Differential Equations I 1 / 27 Theme of Last Three

More information

Entrance Exam, Differential Equations April, (Solve exactly 6 out of the 8 problems) y + 2y + y cos(x 2 y) = 0, y(0) = 2, y (0) = 4.

Entrance Exam, Differential Equations April, (Solve exactly 6 out of the 8 problems) y + 2y + y cos(x 2 y) = 0, y(0) = 2, y (0) = 4. Entrance Exam, Differential Equations April, 7 (Solve exactly 6 out of the 8 problems). Consider the following initial value problem: { y + y + y cos(x y) =, y() = y. Find all the values y such that the

More information

1.2 Derivation. d p f = d p f(x(p)) = x fd p x (= f x x p ). (1) Second, g x x p + g p = 0. d p f = f x g 1. The expression f x gx

1.2 Derivation. d p f = d p f(x(p)) = x fd p x (= f x x p ). (1) Second, g x x p + g p = 0. d p f = f x g 1. The expression f x gx PDE-constrained optimization and the adjoint method Andrew M. Bradley November 16, 21 PDE-constrained optimization and the adjoint method for solving these and related problems appear in a wide range of

More information

231 Outline Solutions Tutorial Sheet 4, 5 and November 2007

231 Outline Solutions Tutorial Sheet 4, 5 and November 2007 31 Outline Solutions Tutorial Sheet 4, 5 and 6. 1 Problem Sheet 4 November 7 1. heck that the Jacobian for the transformation from cartesian to spherical polar coordinates is J = r sin θ. onsider the hemisphere

More information

Simulation based optimization

Simulation based optimization SimBOpt p.1/52 Simulation based optimization Feb 2005 Eldad Haber haber@mathcs.emory.edu Emory University SimBOpt p.2/52 Outline Introduction A few words about discretization The unconstrained framework

More information

Outline. Scientific Computing: An Introductory Survey. Optimization. Optimization Problems. Examples: Optimization Problems

Outline. Scientific Computing: An Introductory Survey. Optimization. Optimization Problems. Examples: Optimization Problems Outline Scientific Computing: An Introductory Survey Chapter 6 Optimization 1 Prof. Michael. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002. Reproduction

More information

MAC2313 Final A. (5 pts) 1. How many of the following are necessarily true? i. The vector field F = 2x + 3y, 3x 5y is conservative.

MAC2313 Final A. (5 pts) 1. How many of the following are necessarily true? i. The vector field F = 2x + 3y, 3x 5y is conservative. MAC2313 Final A (5 pts) 1. How many of the following are necessarily true? i. The vector field F = 2x + 3y, 3x 5y is conservative. ii. The vector field F = 5(x 2 + y 2 ) 3/2 x, y is radial. iii. All constant

More information

Finite difference method for heat equation

Finite difference method for heat equation Finite difference method for heat equation Praveen. C praveen@math.tifrbng.res.in Tata Institute of Fundamental Research Center for Applicable Mathematics Bangalore 560065 http://math.tifrbng.res.in/~praveen

More information

First In-Class Exam Solutions Math 246, Professor David Levermore Thursday, 20 September 2018

First In-Class Exam Solutions Math 246, Professor David Levermore Thursday, 20 September 2018 First In-Class Exam Solutions Math 246, Professor David Levermore Thursday, 20 September 208 () [6] In the absence of predators the population of mosquitoes in a certain area would increase at a rate proportional

More information

Final Exam. Monday March 19, 3:30-5:30pm MAT 21D, Temple, Winter 2018

Final Exam. Monday March 19, 3:30-5:30pm MAT 21D, Temple, Winter 2018 Name: Student ID#: Section: Final Exam Monday March 19, 3:30-5:30pm MAT 21D, Temple, Winter 2018 Show your work on every problem. orrect answers with no supporting work will not receive full credit. Be

More information

Numerical Methods of Applied Mathematics -- II Spring 2009

Numerical Methods of Applied Mathematics -- II Spring 2009 MIT OpenCourseWare http://ocw.mit.edu 18.336 Numerical Methods of Applied Mathematics -- II Spring 2009 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

More information

5. FVM discretization and Solution Procedure

5. FVM discretization and Solution Procedure 5. FVM discretization and Solution Procedure 1. The fluid domain is divided into a finite number of control volumes (cells of a computational grid). 2. Integral form of the conservation equations are discretized

More information

Sensitivity Analysis AA222 - Multidisciplinary Design Optimization Joaquim R. R. A. Martins Durand

Sensitivity Analysis AA222 - Multidisciplinary Design Optimization Joaquim R. R. A. Martins Durand Sensitivity Analysis AA222 - Multidisciplinary Design Optimization Joaquim R. R. A. Martins Durand 165 email: joaquim.martins@stanford.edu 1 Introduction Sensitivity analysis consists in computing derivatives

More information

Numerical Solutions to Partial Differential Equations

Numerical Solutions to Partial Differential Equations Numerical Solutions to Partial Differential Equations Zhiping Li LMAM and School of Mathematical Sciences Peking University The Implicit Schemes for the Model Problem The Crank-Nicolson scheme and θ-scheme

More information

Lecture 1. Finite difference and finite element methods. Partial differential equations (PDEs) Solving the heat equation numerically

Lecture 1. Finite difference and finite element methods. Partial differential equations (PDEs) Solving the heat equation numerically Finite difference and finite element methods Lecture 1 Scope of the course Analysis and implementation of numerical methods for pricing options. Models: Black-Scholes, stochastic volatility, exponential

More information