Knowledge Amalgamation for Computational Science and Engineering Theresa Pollinger, Michael Kohlhase, and Harald Köstler Computer Science, FAU Erlangen-Nürnberg August 15, 2018
Outline Introduction: CSE? Preliminaries A Running Example Theory Graphs Creating ExaSlang Layer 0 M O SIS: Combining MaMoReD and ExaStencils Amalgamating the Model between Theory and Application M O SIS 1.0: Implementation of M O SIS Conclusion
Introduction: CSE?
CSE? Computational Science and Engineering: Simulation as the “third mode of discovery” T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 1
CSE? Computational Science and Engineering: Simulation as the “third mode of discovery” Domain Knowledge Application Simulations Domain Expertise Simulations Practice Model Simulations Numerics Knowledge Knowledge Research Sub-Disciplines in CSE and Competencies T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 1
CSE? Computational Science and Engineering: Simulation as the “third mode of discovery” 2D thermal simulation results, source: [HTf] T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 2
The Gap Between Informal PDE Theory and Simulations Practice: It’s always the same questions. . . Domain expert T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 3
The Gap Between Informal PDE Theory and Simulations Practice: It’s always the same questions. . . Domain expert Simulations expert T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 3
The Gap Between Informal PDE Theory and Simulations Practice: It’s always the same questions. . . Did the user enter everything correctly ? Have they fully specified the problem they want to solve? Can there even exist a sensible solution to this problem? Can it be obtained with the chosen method ? What do they need to do to get their results? Domain expert Simulations expert T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 3
Our Answer: Automating the Knowledge Amalgamation based on MaMoReD! T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 4
Our Answer: Automating the Knowledge Amalgamation based on MaMoReD! Mathematical Models as Research Data: • the mathematical model, • all its assumptions, • and the mathematical background in whose terms it is defined, T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 4
Our Answer: Automating the Knowledge Amalgamation based on MaMoReD! Mathematical Models as Research Data: • the mathematical model, • all its assumptions, • and the mathematical background in whose terms it is defined, are research data in their own right, and as such are represented as as a flexiformal theory graph T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 4
Preliminaries
A Running Example An engineer who wants to simulate the heat in the walls of her house T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 5
A Running Example An engineer who wants Her friend, a simulations to simulate the heat in the expert walls of her house T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 5
A Running Example a b k 1 k 2 An engineer who wants x Her friend, a simulations to simulate the heat in the expert walls of her house One-dimensional heat conduction problem T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 5
The (Static) Heat Equation ρ c p ∂ T ∂ t − ( ∇ · ( k ∇ T )) = ˙ in Ω q V (heat equation) T = T 0 in Ω at t = 0 T = T ′ on ∂ Ω with ρ the mass density of the material c p the specific heat capacity k the thermal conductivity ˙ q V the volumetric heat flux / “heat sources” in the material T ′ the temperature profile at the boundary T 0 the initial temperature distribution T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 6
The (Static) Heat Equation � − ∇ · ( k ∇ T ) = ˙ in Ω q V T = T ′ on ∂ Ω with k the thermal conductivity ˙ q V the volumetric heat flux / “heat sources” in the material T ′ the temperature profile at the boundary T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 6
The (Static) Heat Equation � − ∇ · ( k ∇ T ) = ˙ in Ω q V T = T ′ on ∂ Ω with k the thermal conductivity ˙ q V the volumetric heat flux / “heat sources” in the material T ′ the temperature profile at the boundary ...basically gives us a Poisson equation with Dirichlet boundary conditions � − ∆ u = f in Ω (Poisson Equation) u ( x ) = u ′ on ∂ Ω , . . . which is always uniquely solvable [KA00] T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 6
...and its Solution − ∆ u = sin( x · π ) in ( 0 , 1 ) f = ˙ q V = sin( x · π ) u ( 0 ) = 1 u ( 1 ) = 0 a b 1 0 . 8 0 . 6 k 1 k 2 0 . 4 0 . 2 0 . 2 0 . 4 0 . 6 0 . 8 1 x Heat equation solution example One-dimensional heat conduction problem T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 7
...and its Solution − ∆ u = sin( x · π ) in ( 0 , 1 ) u = sin( x · π ) − x + 1 u ( 0 ) = 1 π 2 u ( 1 ) = 0 a b 1 0 . 8 0 . 6 k 1 k 2 0 . 4 0 . 2 0 . 2 0 . 4 0 . 6 0 . 8 1 x Heat equation solution example One-dimensional heat conduction problem T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 7
The ExaStencils Framework for Stencil Codes Stencil Code: Algorithm that can be expressed as stencils, e. g., most FD schemes ExaStencils: Code that generates highly optimized stencil solvers (itself written in Scala) [Kro+17] ExaSlang: domain specific language (DSL) for the description of the problem to be simulated, and for the solver to be used [KK16] T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 8
The ExaStencils Framework for Stencil Codes Stencil Code: Algorithm that can be expressed as stencils, e. g., most FD schemes ExaStencils: Code that generates highly optimized stencil solvers (itself written in Scala) [Kro+17] ExaSlang: domain specific language (DSL) for the description of the problem to be simulated, and for the solver to be used [KK16] Layer 1 : Continuous model Layer 2 : Discretization Layer 3: Solution algorithm Layer 4: Application specification The ExaSlang language stack T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 8
The ExaStencils Framework for Stencil Codes Stencil Code: Algorithm that can be expressed as stencils, e. g., most FD schemes ExaStencils: Code that generates highly optimized stencil solvers (itself written in Scala) [Kro+17] ExaSlang: domain specific language (DSL) for the description of the problem to be simulated, and for the solver to be used [KK16] Layer 1 : Continuous model Layer 2 : Discretization Layer 3: Solution algorithm Layer 4: Application specification The ExaSlang language stack But there is no way of detecting whether the input is invalid (over-/underspecified, conflicting...) interactivity T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 8
Theory Graphs Theory Morphisms Inclusion : transports information, “inheritance” View : maps symbols to apply concept of reasoning, “example”, “duck typing”, “refinement”, “implementation” Structure : copies information, allows renaming of symbols, “instantiation” Meta Theory Relation (too meta for us now) [Koh14] T. Pollinger | CS, FAU Erlangen-Nürnberg | Knowledge Amalgamation for Computational Science and Engineering August 15, 2018 9
Theory Graphs Poisson’s Equation PE = λ u : unknown _ type . ∆ u . = f Unknown Source unknown_type = f : Ω → R Ω → R m Differential Operators ∆ : { m : N } (Ω → R m ) → (Ω → R ) . . . Calculus Spatial Domain Ω : type , n : N . . . Ω _in_Rn : ⊢ Ω ⊂ R n Ω _sc : ⊢ Ω is connected R n Topology . . . . . . A theory graph example: The Static Heat Equation as Poisson’s Equation
Recommend
More recommend