The Application of a Black-Bo Solver with Error Estimate to Different Systems of PDEs Torsten Adolph and Willi Schönauer Forschungszentrum Karlsruhe Institute for Scientific Computing Karlsruhe, Germany {torsten.adolph, willi.schoenauer}@iwr.fzk.de http://www.fzk.de/iwr http://www.rz.uni-karlsruhe.de/rz/docs/fdem/literatur
Motivation Numerical solution of non-linear systems of Partial Differential Equations (PDEs) Finite Difference Method (FDM) Finite Element Method (FEM) Finite Volume Method (FVM) Finite Difference Element Method (FDEM) Combination of advantages of FDM and FEM: FDM on unstructured FEM grid Supported by: German Ministry of Research (BMBF) Research Alliance Fuel Cells of Baden-Wuerttemberg Torsten Adolph 2 HLRS-Workshop, October 19-20, 2006
Objectives Elliptic and parabolic non-linear systems of PDEs 2-D and 3-D with arbitrary geometry Arbitrary non-linear boundary conditions (BCs) Subdomains with different PDEs Robustness Black-bo (PDEs/BCs and domain) Error estimate Order control/mesh refinement Efficient parallelization (on distributed memory parallel computers) Torsten Adolph 3 HLRS-Workshop, October 19-20, 2006
Difference formulas of order q on unstructured grid Polynomial approach of order q (m coefficients) 2-D: m = (q+1) (q+2)/2 3-D: m = (q+1) (q+2) (q+3)/6 4 5=m-1 0 3 1 2 q=2 q=4 q=6 order q=2 Influence polynomial P q,i = 1, node i 0, other nodes u d, u,d, u y,d, u,d, u yy,d, u y,d Search for nodes in rings (up to order q+ q) m+r nodes Selection of m appropriate nodes by special sophisticated algorithm Torsten Adolph 4 HLRS-Workshop, October 19-20, 2006
Discretization error estimate e.g. for u : u = u,d,q + d,q = u,d,q+2 + d,q+2 d,q = u,d,q+2 u,d,q { + d,q+2 } Error equation Pu P (t,, y, u, u t,u,u y,u,u yy,u y ) Linearization by Newton-Raphson Discretization with error estimates d t, d,... and linearization in d t, d,... u d = u Pu + u Dt + u D + u Dy + u Dy = (level of solution) = Q 1 d [(Pu) d + D t + {D + D y + D y }] (level of equation) Only apply Newton correction u Pu : Q d u Pu =(Pu) d (computed by LINSOL, Univ. of Karlsruhe) Other errors for error control and error estimate Torsten Adolph 5 HLRS-Workshop, October 19-20, 2006
Academic Eamples Generate test PDE from original PDE for given solution Pū: Pu=0 Pu-Pū=0 PDE system: u + u yy + ω y f 1 =0 v + v yy ω f 2 =0 uω + vω y (ω + ω yy )/Re f 3 =0, Re =1 Boundary conditions: u g 1 =0, v g 2 =0, ω + u y v g 3 =0 Test solution: Sugar loaf type function ū = e 32(2 +y 2 ) Solution domain: Self-adaptation: Unit circle with 751 nodes, 1410 elements Mesh refinement and order control, tol=0.25% no. no. no. of no. of nodes global relat. sec. of of ref. with order error for cycle nodes elem. nodes 2 4 6 eact estimated cycle 1 751 1410 132 427 320 4 0.305E-01 0.280E-01 1.021 2 1332 2493 345 180 1144 8 0.109E-01 0.950E-02 3.604 3 2941 5469 360 2556 25 0.179E-02 0.174E-02 10.086 HP XC6000, Univ. of Karlsruhe, 1500 MHz Itanium2 core, 6000 MFLOPS peak, np=8 processors Torsten Adolph 6 HLRS-Workshop, October 19-20, 2006
Academic Eamples (continued) Test solution ū = e 32(2 +y 2 ) 1 rd Grid of 3 cycle 0.5 1 1 0.8 0.5 y 0 0.6 y 0 0.4 0.2-0.5-0.5-1 0-1 -0.5 0 0.5 1-1 -1-0.5 0 0.5 1 Torsten Adolph 7 HLRS-Workshop, October 19-20, 2006
Numerical Simulation of PEM Fuel Cells Domain of solution: Gas diffusion layer (GDL) Variables: Molar flu densities of oygen, water vapour and nitrogen in - and y-direction, partial pressures for oygen, water vapour and nitrogen, total pressure and current density Nonlinear system of 11 PDEs Rectangular grid with 200 201 nodes y reaction layer c/2+r/2 (1 mm) Consistency order q=4 HP XC6000 with 32 processors CPU time for master processor: 4123 sec t GDL (0.19 mm) symmetry line GDL symmetry line c/2 (0.5 mm) channel r/2 (0.5 mm) rib Torsten Adolph 8 HLRS-Workshop, October 19-20, 2006
Numerical Simulation of PEM Fuel Cells (continued) 6 transport equations ṅ o + p wṅ o p o ṅ w DKn o D ow p + p nṅ o p o ṅ n D on p = 1 p o RT + p [ o p RT p B o + B op w DKn o D ow p (1 B w )+ B op n B o D on p (1 B n B ν = B ν (p o,p w,p n,p) ] po ) B o RT p p 3 material balances ṅ o + ṅy o y =0 condition for total pressure p = p o + p w + p n Tafel equation for current density i on reaction layer ( αnf U 0 U z d ) mem i = f v i 0 p o p ref o γ ep RT κ mem i i = 0 in the remainder (dummy variable) Torsten Adolph 9 HLRS-Workshop, October 19-20, 2006
Numerical Simulation of PEM Fuel Cells (continued) Contour plot of molar flu density of water vapour in y-direction and its error (typical result) 0.00020 n-dot-w-y 0.00020 error-n-dot-w-y 0.00015 y 0.00010-0.02-0.04-0.06-0.08-0.10-0.12-0.14-0.16-0.18 0.00015 y 0.00010 5.5E-02 5.0E-02 4.5E-02 4.0E-02 3.5E-02 3.0E-02 2.5E-02 2.0E-02 1.5E-02 1.0E-02 5.0E-03 0.00005 0.00005 0.00000 0 0.0002 0.0004 0.0006 0.0008 0.001 0.00000 0 0.0002 0.0004 0.0006 0.0008 0.001 Torsten Adolph 10 HLRS-Workshop, October 19-20, 2006
Numerical Simulation of PEM Fuel Cells (continued) Current density along the reaction layer and its error i mean = 2981,92 i error-i 3300 3200 3100 3000 2900 2800 2700 2600 2500 0,0000 0,0002 0,0004 0,0006 0,0008 0,0010 2,0E-02 1,6E-02 1,2E-02 8,0E-03 4,0E-03 0,0E+00 0,0000 0,0002 0,0004 0,0006 0,0008 0,0010 Torsten Adolph 11 HLRS-Workshop, October 19-20, 2006
Numerical Simulation of Solid Oide Fuel Cells Solution domain consists of 2 subdomains: Anode and gas channel Dividing line, coupling conditions, different PDE systems Variables: Flow velocities in - and y-direction, mole fractions for methane, carbon monoide, hydrogen, carbon dioide and steam, and pressure Nonlinear system of 8 PDEs Rectangular grids: 80 41 in anode and gas channel Consistency order q=4 HP XC6000 with 8 processors CPU time for master processor: 510 sec d A y 1 electrolyte 2 anode DL, side 2 3 DL, side 1 d K 6 gas channel gas flow 4 5 rib l K Torsten Adolph 12 HLRS-Workshop, October 19-20, 2006
Numerical Simulation of Solid Oide Fuel Cells (continued) Gas channel 4 species balances (p K u,k Y CO,K ) ( + (p K u y,k Y CO,K ) + y ) (p D K Y CO,K ) CO,gas y y =0 Equation of continuity (ρ K u,k ) + (ρ K u y,k ) y =0 2 Navier-Stokes equations ρ K Dalton s law ( u,k u,k + u y,k Y 3 + Y 4 + Y 5 + Y 6 + Y 7 =1 ) u,k = p K y + ( ( µ 2 u,k 2 ( 3 u,k + u ))) y,k + ( ( u,k µ y y y + u )) y,k Torsten Adolph 13 HLRS-Workshop, October 19-20, 2006
Numerical Simulation of Solid Oide Fuel Cells (continued) Anode 5 species balances (p A u,a Y CO,A ) RT ( + (p A u y,a Y CO,A ) + D eff CO,gas RT y ) (p A Y CO,A ) RT y y + ( D eff CO,gas ) (p A Y CO,A ) RT + r CH4 r s =0 Darcy s law in - and y-direction p A = µ u,a k p Dalton s law Y 3 + Y 4 + Y 5 + Y 6 + Y 7 =1 Torsten Adolph 14 HLRS-Workshop, October 19-20, 2006
Numerical Simulation of Solid Oide Fuel Cells (continued) Mole fraction of carbon monoide and its error for the anode y 0.0030 0.0028 0.0026 0.0024 0.0022 0.0020 Anode Y-CO 1.8E-01 1.6E-01 1.4E-01 1.2E-01 1.0E-01 8.0E-02 6.0E-02 4.0E-02 2.0E-02 y 0.0030 0.0028 0.0026 0.0024 0.0022 0.0020 Anode error-y-co 4.0E-02 3.5E-02 3.0E-02 2.5E-02 2.0E-02 1.5E-02 1.0E-02 5.0E-03 0.0018 0.0018 0.0016 0.0016 0.0014 0.0014 0.0012 0.0012 0.0010 0.000 0.005 0.010 0.015 0.020 0.025 0.030 0.035 0.0010 0.000 0.005 0.010 0.015 0.020 0.025 0.030 0.035 Torsten Adolph 15 HLRS-Workshop, October 19-20, 2006
Forschungszentrum Karlsruhe Fluid/Structure Interaction for a High Pressure Diesel Injection Pump Solution domain consists of 3 subdomains: Housing, piston and lubrication gap Dividing lines, coupling conditions, different PDE systems Variables: displacements in z- and r-direction and stresses in housing and piston velocities in z- and r-direction and pressure in lubrication gap Nonlinear system of 6 PDEs in housing and piston 3PDEsingap piston Rectangular grids: 401 81 in housing 401 641 in gap 401 40 in piston gap housing Consistency order q=2 CPU time for master processor: HP XC6000, 32 proc., Itanium2 1.5 GHz, Quadrics interconnect: 452.5 min z 40 cf. SGI Alti 4700 y (LRZ Munich), 32 proc., Itanium2 1.6 GHz, NUMAlink: 385.5 min 20 8 0.0025 Torsten Adolph 16 HLRS-Workshop, October 19-20, 2006
Fluid/Structure Interaction for a High Pressure Diesel Injection Pump (continued) Piston/Housing Lubrication gap 3 elasticity equations in z-, ϕ-, r-direction 2 Navier-Stokes equations 1 E [σ z σ z,old ν(σ ϕ σ ϕ,old ) ν(σ r σ r,old )] w z =0 u u r + w u z = 1 ρ p r + η ρ 2 u r + 1 u 2 r r u r + 2 u 2 z 2 1 elasticity equation in rz-direction Equation of continuity 1+ν E (τ rz τ rz,old ) 1 ( u 2 z + w ) =0 r u r + u r + w z =0 2 equilibrium equations σ r r + τ rz z + 1 r (σ r σ ϕ )=0 Torsten Adolph 17 HLRS-Workshop, October 19-20, 2006
Fluid/Structure Interaction for a High Pressure Diesel Injection Pump (continued) Nested iterations for the solution process necessary pressure incrementation grid iteration w ma -iteration Newton iteration eit if p>p ma eit if w ma does not change anymore eit if p z=zma =0 eit if (Pu) d small enough Torsten Adolph 18 HLRS-Workshop, October 19-20, 2006
Fluid/Structure Interaction for a High Pressure Diesel Injection Pump (continued) Velocity w in z-direction for 2000 bar and its error Volume flow: 2.65 cm 3 /s Torsten Adolph 19 HLRS-Workshop, October 19-20, 2006
Concluding Remarks Black-bo PDE solver FDEM (URL: http://www.rz.uni-karlsruhe.de/rz/docs/fdem/literatur) User input: any PDE system, any domain, 2-D and 3-D Domain may consist of several subdomains with different PDEs Dividing lines Unique feature: error estimate Efficient parallelization with MPI We offer a service to solve the PDEs of cooperation partners. Torsten Adolph 20 HLRS-Workshop, October 19-20, 2006