Object Oriented Programming for Partial Differential Equations

Similar documents
REDUCTION OF FINITE ELEMENT MODELS BY PARAMETER IDENTIFICATION

2.141 Modeling and Simulation of Dynamic Systems Assignment #2

Comparison of Stability of Selected Numerical Methods for Solving Stiff Semi- Linear Differential Equations

Numerical simulations of isotropic and die compaction of powder by the discrete element method

Simulation of Geomechanical Behavior during SAGD Process using COMSOL Multiphysics

2 Q 10. Likewise, in case of multiple particles, the corresponding density in 2 must be averaged over all

12 Towards hydrodynamic equations J Nonlinear Dynamics II: Continuum Systems Lecture 12 Spring 2015

Ph 20.3 Numerical Solution of Ordinary Differential Equations

DETECTION OF NONLINEARITY IN VIBRATIONAL SYSTEMS USING THE SECOND TIME DERIVATIVE OF ABSOLUTE ACCELERATION

ULTRASONIC WELDING OF COMPOSITE MATERAILS. ULTRASONIC BOOSTER DESIGN AND FEM SIMULATION

Analysis of Impulsive Natural Phenomena through Finite Difference Methods A MATLAB Computational Project-Based Learning

NUMERICAL MODELLING OF THE TYRE/ROAD CONTACT

Calculation of load limits by the method of Norton- Hoff-Friaâ, behavior NORTON_HOFF

Model Fitting. CURM Background Material, Fall 2014 Dr. Doreen De Leon

Donald Fussell. October 28, Computer Science Department The University of Texas at Austin. Point Masses and Force Fields.

821. Study on analysis method for deepwater TTR coupled vibration of parameter vibration and vortex-induced vibration

Modelling diabatic atmospheric boundary layer using a RANS-CFD code with a k-ε turbulence closure F. VENDEL

Generalized Rayleigh Wave Dispersion in a Covered Half-space Made of Viscoelastic Materials

An Inverse Interpolation Method Utilizing In-Flight Strain Measurements for Determining Loads and Structural Response of Aerospace Vehicles

Introduction to Robotics (CS223A) (Winter 2006/2007) Homework #5 solutions

Geometrically Exact Beam Formulation versus Absolute Nodal Coordinate Formulation

PY241 Solutions Set 9 (Dated: November 7, 2002)

Farid Samara 1, Dominic Groulx 1 and Pascal H. Biwole 2 1

SD Numerical Simulation Technique for Hydrodynamic Flow Gas- Solids Mixing Mantilla Núñez, Irla* 1 S. De Vicente C. 2

Free convection flow of Couple Stress fluid between parallel Disks

Moment of Inertia. Terminology. Definitions Moment of inertia of a body with mass, m, about the x axis: Transfer Theorem - 1. ( )dm. = y 2 + z 2.

lecture 37: Linear Multistep Methods: Absolute Stability, Part I lecture 38: Linear Multistep Methods: Absolute Stability, Part II

RECOVERY OF A DENSITY FROM THE EIGENVALUES OF A NONHOMOGENEOUS MEMBRANE

Modelling of damage in composite materials using interface elements

Numerical Modeling of Self-Compacting Mortar Flow Using Discrete Element Method

EE5900 Spring Lecture 4 IC interconnect modeling methods Zhuo Feng

Comparison of Charged Particle Tracking Methods for Non-Uniform Magnetic Fields. Hann-Shin Mao and Richard E. Wirz

In the session you will be divided into groups and perform four separate experiments:

Research Article Approximate Multidegree Reduction of λ-bézier Curves

On the Mutual Coefficient of Restitution in Two Car Collinear Collisions

Harmonic Standing-Wave Excitations of Simply-Supported Isotropic Solid Elastic Circular Cylinders: Exact 3D Linear Elastodynamic Response.

Research on coupling theory and its experiments between torque turbulence and bearing load of multi-support-rotor systems

Available online at ScienceDirect. Procedia Engineering 153 (2016 ) 45 50

Computational plasticity and viscoplasticity for composite materials and structures

Supplementary Information for Design of Bending Multi-Layer Electroactive Polymer Actuators

Kernel Methods and Support Vector Machines

Approximate method for temperature-dependent characteristics of structures with viscoelastic dampers

8.1 Force Laws Hooke s Law

PH 221-2A Fall Waves - I. Lectures Chapter 16 (Halliday/Resnick/Walker, Fundamentals of Physics 9 th edition)

N-Point. DFTs of Two Length-N Real Sequences

ACTIVE VIBRATION CONTROL FOR STRUCTURE HAVING NON- LINEAR BEHAVIOR UNDER EARTHQUAKE EXCITATION

ESTIMATING AND FORMING CONFIDENCE INTERVALS FOR EXTREMA OF RANDOM POLYNOMIALS. A Thesis. Presented to. The Faculty of the Department of Mathematics

Successive Model-Updating of the dynamic behaviour of casing bodies on a practical example of an axial piston pump

Golden ratio in a coupled-oscillator problem

c 2007 by Arun Prakash. All rights reserved.

The linear sampling method and the MUSIC algorithm

POD-DEIM MODEL ORDER REDUCTION FOR THE MONODOMAIN REACTION-DIFFUSION EQUATION IN NEURO-MUSCULAR SYSTEM

Improved Direct Displacement-Based Design Procedure for Performance-Based Seismic Design of Structures

Data-Driven Imaging in Anisotropic Media

Lecture #8-3 Oscillations, Simple Harmonic Motion

An Approximate Model for the Theoretical Prediction of the Velocity Increase in the Intermediate Ballistics Period

Chapter 6 1-D Continuous Groups

Hysteresis model for magnetic materials using the Jiles-Atherton model

ESTIMATE OF THE TRUNCATION ERROR OF FINITE VOLUME DISCRETISATION OF THE NAVIER-STOKES EQUATIONS ON COLOCATED GRIDS.

XV International PhD Workshop OWD 2013, October On the theory of generalized pendulum on a vibrating base

Four-vector, Dirac spinor representation and Lorentz Transformations

+ -d-t-' )=1. = vpi. Aportaciones Matematicas Comunicaciones 17 (1996) 5-10.

( ') ( ) 3. Magnetostatic Field Introduction

Chapter 1: Basics of Vibrations for Simple Mechanical Systems

Uniaxial compressive stress strain model for clay brick masonry

Kinetic Theory of Gases: Elementary Ideas

DIRECT NUMERICAL SIMULATION OF DAMAGE PROGRESSION IN LAMINATED COMPOSITE PLATES USING MULTI-SCALE MODELLING

Name: Partner(s): Date: Angular Momentum

Solving initial value problems by residual power series method

L2 IntroSurvey. EIEN20 Design of Electrical Machines, IEA, Today s goal. L2: Variety of electrical machines.

COS 424: Interacting with Data. Written Exercises

Description of the nonlinear viscoelastic and thixotropic properties of human blood by the modified model of Maxwell-Gurevich-Rabinovich

On the Navier Stokes equations

Ch 12: Variations on Backpropagation

Support Vector Machine Classification of Uncertain and Imbalanced data using Robust Optimization

Chapter 2: Introduction to Damping in Free and Forced Vibrations

Mathematical Study on MHD Squeeze Flow between Two Parallel Disks with Suction or Injection via HAM and HPM and Its Applications

Incorporating strain gradient effects in a multi-scale constitutive framework for nickel-base superalloys

Traction transmission gearbox mechanical properties numerical calculation and strength analysis

Kinetic Theory of Gases: Elementary Ideas

COMPONENT MODE SYNTHESIS, FIXED-INTERFACE MODEL Revision A

Anisotropic reference media and the possible linearized approximations for phase velocities of qs waves in weakly anisotropic media

III.H Zeroth Order Hydrodynamics

A new Lagrangian of the simple harmonic oscillator 1 revisited

Computer Model For Sieves Vibrations Analysis, Using an Algorithm Based on the False-Position Method

2.003 Engineering Dynamics Problem Set 2 Solutions

A BLOCK MONOTONE DOMAIN DECOMPOSITION ALGORITHM FOR A NONLINEAR SINGULARLY PERTURBED PARABOLIC PROBLEM

Plastic ductile damage evolution and collapse of plates and shells

On the characterization of non-linear diffusion equations. An application in soil mechanics

Excitability of guided waves in composites with PWAS transducers

P016 Toward Gauss-Newton and Exact Newton Optimization for Full Waveform Inversion

Comput. Methods Appl. Mech. Engrg.

Using a De-Convolution Window for Operating Modal Analysis

Reading from Young & Freedman: For this topic, read the introduction to chapter 25 and sections 25.1 to 25.3 & 25.6.

Chapter 8 Deflection. Structural Mechanics 2 Dept of Architecture

On the approximation of Feynman-Kac path integrals

Order Recursion Introduction Order versus Time Updates Matrix Inversion by Partitioning Lemma Levinson Algorithm Interpretations Examples

INTERNATIONAL JOURNAL OF CIVIL AND STRUCTURAL ENGINEERING Volume 2, No 1, 2011

ANALYTICAL INVESTIGATION AND PARAMETRIC STUDY OF LATERAL IMPACT BEHAVIOR OF PRESSURIZED PIPELINES AND INFLUENCE OF INTERNAL PRESSURE

Strain Rate and Temperature Effects on the Nonlinear Behavior of Woven Composites

Transcription:

Procedia Coputer Science Volue 51, 2015, Pages 1013 1022 ICCS 2015 International Conference On Coputational Science Object Oriented Prograing for Partial Differential Equations E. Alberdi Celaya 1 and J. J. Anza Aguirrezabala 2 1 Departent of Applied Matheatics, University of the Basque Country UPV/EHU, Bilbao, Spain elisabete.alberdi@ehu.es 2 Departent of Applied Matheatics, University of the Basque Country UPV/EHU, Bilbao, Spain juanjose.anza@ehu.es Abstract After a short introduction to the atheatical odelling of the elastic dynaic proble, which shows the siilarity between the governing Partial Differential Equations (PDEs) in different applications, coon blocks for Finite Eleent approxiation are identified, and an Object Oriented Prograing (OOP) ethodology for linear and non-linear, stationary and dynaic probles is presented. Advantages of this approach are coented and soe results are shown as exaples of this ethodology. Keywords: PDEs, FEM, OOP, ODEs 1 Introduction Nuerous phenoena of science and engineering are odelled atheatically using systes of Partial Differential Equations (PDEs). Mass, oentu and energy balances, with appropriate constitutive laws are the basis of a broad class of Boundary Condition (BC) probles fro which the acroscopic oveent of solids, fluids and gases with their corresponding forces can be deduced. Flow solutions for heat and ass transport probles can be obtained in a siilar way, and interaction probles between different edia can be studied. The analytical solution of PDEs in a general doain is not possible and it is necessary the use of nuerical ethods, aong which the Finite Eleent Method (FEM) is the ost capable in general, to deal with any shape doains and non-linear probles. The FEM has transfored the operating ode of the design engineering in the last 50 years where the linear coputations have been consolidated as a echanical and structural design tool. Traditionally, the developent of nuerical software has been based on procedural languages such as Fortran or C, but in the last years there is an increasing interest of applying the paradigs of the Object Oriented Prograing (OOP), which allow an efficient reutilization, extension and aintenance of the codes [8, 10]. In the procedural prograing (sequential), sall changes in the data structures could lead to unpredictable effects. On the other hand, in Selection and peer-review under responsibility of the Scientific Prograe Coittee of ICCS 2015 c The Authors. Published by Elsevier B.V. doi:10.1016/j.procs.2015.05.246 1013

OPP for Partial Differential Equations Alberdi and Anza the OOP, ethods are linked to their specific data by the definition of abstract classes which are set in objects. Hence, the polyorphis allows the sae function to respond in different ways depending on the type of object it is acting on. The encapsulation increases the strength and the security of the code as the object data is accessible only fro its ethods, and the inheritance perits classes to be organized in hierarchies, aking easier to reuse the code without odifications, see Matlab [1]. In this paper an OOP architecture to solve PDEs, odelling the continuous edia by the FEM is presented. The paper is organized as follows: in Section 2 the forulation of the atheatical odelling of the elastic dynaic proble is done. In Section 3 the objects that confor this architecture are described: stationary coputations in Section 3.1 and the dynaical ones in Section 3.2. Finally in Section 4, the application of this ethodology to several probles is reported. 2 The Elastic Dynaic Proble The general case of the elastic dynaic deforation with volue forces f and aterial density ρ is odelled by the Navier s dynaic equations [5]: (λ + μ) ( u)+μ 2 u + f = ρu tt (1) being λ and μ the Laé constants. For 2D probles, u is the displaceent vector with two coponents u(x,t)andv(x,t), being x =(x, y), and the PDE syste represents the oentu conservation at each point of the doain. Considering the constitutive Laé equations: ( ) σ = λ u +2μ u +( u) T (2) the syste (1) takes the for of the dynaic equilibriu: σ + f = ρu tt (3) which is the starting point to work with non-linear constitutive equations, such as plasticity, and with non-linear large deforations. The forulation is copleted with the Initial and Boundary Conditions: { { Dirichlet: u(x,t)=g(x,t), x Γ g u(x, 0) = u 0 (x) BC: IC: Neuann: σ(u(x,t)) n = t(x,t), x Γ t u t (x, 0) = u (4) 0(x) The introduction of a vectorial weighting function, and the integration by parts leads to the weak forulation that adits the virtual work interpretation: Ω δε : σdω = δu tdγ t + Γ t Ω δu fdω δu ρu tt dω, δu V (5) Ω being V = { } ( w(x) H 1 (Ω) : w(x) =0, x Γ ) g and δε = 1 2 δu +( δu) T. We will take n nodes in the FEM discretization, and we will define the sall support FEM functions N j (x), that verify N j (x i )=δ ji,beingδ the Kronecker delta and i, j theindexesof 1014

OPP for Partial Differential Equations Alberdi and Anza the nodes. Then the 2D approxiation in atrix forat is given by: ( ) ( ) uh (x,t) N1 N u(x,t) u h (x,t)= = n 0 0 v h (x,t) 0 0 N 1 N n }{{} N u 1.. u n v 1.. v n }{{} U = N U (6) The operation ε : σ is given by ε : σ = ε T σ,whereε and σ are defined by: { ε =(ε x,ε y, 2ε xy ) T σ =(σ x,σ y,σ xy ) T (7) So, the approxiation to the linear deforation ε h canbewritteninatrixforas: ε x x 0 ( ) ε h = ε y = 0 uh (x) y = 2ε v h (x) } L {{ N } U = B U (8) xy B h y x } {{ } L } {{ } N U Considering the virtual displaceent δu = NδU and the virtual deforation δε = BδU in (5), the following syste of differential equations is obtained [2]: MU + F int (U) =F ext (9) M = Ω N T ρndω being: F int (U) = Ω BT σdω F ext (U) = Ω N T fdω+. Γ t N T tdγ t The linear version for plane strain is obtained with the constitutive law σ = Dε, where: 1 ν ν 0 E D = ν 1 ν 0 (10) (1 + ν)(1 2ν) 1 2ν 0 0 2 being E and ν the Young and Poisson odulus respectively. Then (9) takes the final for for the linear elastic plane strain proble: MU + KU = F ext, where: K = B T DBdΩ (11) We observe that the FEM approxiation to a linear or non-linear proble, originates a syste of Ordinary Differential Equations (ODEs) which is defined by doain integrals. These integrals can be calculated eleent by eleent and assebled. All the integrands involved are fored by physical constants and by soe operators acting on the FEM functions. Hence, if we have coon procedures for the nuerical evaluation of eleent integrals of the type of (9) and (11), the systes of equations associated to the FEM approxiation of any probles could be built. In the sae way, if we have procedures to solve linear systes, linear stationary probles will be solved. Iterative procedures will allow us to solve non-linear stationary probles. And if we add procedures to solve ODEs, probles depending on tie could be solved: solving a linear syste in each step when the PDE is linear or a non-linear syste otherwise. Ω 1015

OPP for Partial Differential Equations Alberdi and Anza (aggregation): an eleent object (objelef ), a aterial object (objat) and the object obju. After solving the proble, the solution is saved in obju to be used in the post-processing. The Finite Eleent object (objelef ) coputes the eleent contributions, perforing the loop in the points of integration. Integrands are sapled, weighted and added according to the Gauss nuerical integration forulae. This object has two objects aong its data: the parent eleent (objelep) and the point of integration (objpint). The parent eleent object (objelep) provides the weights and the values of the shape functions (atrix N of (6)) and their derivatives, in the integration points of the parent eleent. It also gives the ethods that copute the derivatives of the shape functions (atrix B of (7)) in the points of integration of the real eleents. Six types of parent eleents have been ipleented: the segent, the triangle and the quadrilateral, being possible to use linear and quadratic interpolation in the three cases. The coon data and ethods (functions) lie in a basic class, fro which the six entioned classes (types) inherit, copleting the basic class with its particular data and ethods. The point of integration object (objpint) provides the values of the integrands in (9), (11) and (14), for Laplace and elasticity inlcuding the axisyetric case and integrands of the tangent atrices. Again, the objects inherit fro a basic class adding coplexity through a tree structure for. The deforation object (objdef ) calculates the deforation and the atrix B in the point of integration. The coon data and procedures lie in a basic class fro which 4 classes inherit: one class for the Laplace gradient; one class for the linear deforation and two classes for non-linear deforations (one for probles with large rotations and displaceents but sall deforations, and one for probles with large deforations), [3]. The aterial object (objat) ipleents the constitutive law which gives the flux in ters of the gradient in the potential proble (Laplace); and the law that gives the stress in ters of the deforation in the elasticity proble. Two linear cases for the two linear probles (elasticity and Laplace) have been ipleented. Four types of non-linear aterial classes inherit fro the linear elastic class, adding the linear elastoplasticity, the neohookean and the incopressible neohookean functionality, and the Hencky aterial in the principal directions. In the sae way, two types of non-linear aterial classes inherit fro the linear Laplace class: one introduces a siple constitutive non-linear law, and another odifies the constant tension force in a vibrating string to depend on the transverse displaceent u. The third object aggregated in the ain object objfe is the ethod object (objethod), which can be linear, non-linear and dynaic. The object objfty is only used in the dynaic case and it will be explained in Section 3.2. For linear stationary coputations, the object ethod is reduced to the object objlinsys, which constructs the syste of equations using the proble and the esh object functions, and proceeding to solve it. In the non-linear case, the object ethod is the Newton Raphson object (objnr) (12), which aggregates the linear syste object (objlinsys) and the jacobian object (objj ). There are two types of jacobian objects: one uses analytic derivation to copute the jacobian atrix J (13), and the other uses finite differences of the residual vector. 3.2 Objects for dynaic coputations For dynaic coputations, the starting point is the second order ODE syste (9), which can be solved directly using ethods like Newark [9], the HHT-α [6], etc. But it is also possible 1018

OPP for Partial Differential Equations Alberdi and Anza to transfor the ODE syste (9) into an equivalent first order ODE syste: { d(t) =U(t) v(t) =U (t) { d (t) =U (t) =v(t) Mv (t) =MU (t) = F int (d) Cv + F ext (15) The syste (15) can be written as follows in atrix for: ( ) ( ) ( ) I 0 d (t) v(t) 0 M v = (t) R(d) Cv My = f(t, y) (16) }{{}}{{}}{{} M y f(t,y) where f and j = f/ y are given by: f 1 (t, y) y 2 = v, ( f 2 (t, y) ) R(y ( 1 ) Cy 2 = R(d) Cv f1 f f(t, y) 1 v v y j = = 1 y 2 = d v y f 2 y 1 f 2 y 2 (R(d) Cv) d (R(d) Cv) v ) ( ) 0 I = J(U) C and J(U) is given by (13). The ODE syste (16) can be solved by ipleenting nuerical ethods to solve first order ODEs or doing the connection with the Matlab odesuite in which a set of codes to solve ODEs [11] is offered. Soe nuerical ethods for first order ODEs have been ipleented in this work (such as, the trapezoidal rule, the BDF and NDF ethods [12], superfuture-point schees [4]). The step by step advancing process of the different nuerical ethods is organized with a coon structure: the initialization, the loop in steps and the step actualization. These three functions are coon nearly for all the nuerical ethods and they are ipleented in a basic class, fro which the specific ethods inherit and add their particular step function to solve their specific advancing forula. Any object ethod has aong its data the object objfty which provides with the values of f and j = f/ y of the ODE syste (16). Three different classes have been ipleented depending on the type of proble: diffusion, wave or elastodynaics, and the general case, where the user has to define a text file with the specific syste to solve y = f(t, y). 3.3 Trapezoidal rule Given the ODE syste defined by (16), the advancing forula of the trapezoidal rule is: where: (17) M y n+1 = M y n + h 2 (f(t n,y n )+f(t n+1,y n+1 )) (18) The forula (18) is iplicit and it is solved iteratively by Newton ethod: y +1 n+1 = y n+1 ( J(y n+1 ) ) 1 R ( y n+1 ), =0, 1, 2,... (19) R ( yn+1) = 2 h M ( ) ( ) yn+1 y n fn + fn+1 J ( y n+1) = R(y n+1 ) y n+1 = 2 h M j n+1 And values of f and j are calculated using (16) and (17). The trapezoidal object specifies the step function (19) and the residual and the jabobian (20) to copute the iteration of the Newton Raphson object (objnr). (20) 1019

OPP for Partial Differential Equations Alberdi and Anza 3.4 Backward Differentiation Forulae BDF Following the sae procedure the backward differentiation forulae, BDFs [12], have been ipleented. The BDF have been widely used due to their good stability properties. In the k-step BDF the value y n+k is calculated using the previous values y n+j for j =0,..., k 1: k ˆα j Myn+j = hf(t n+k,y n+k ) (21) j=0 ˆα j are the coefficients of the BDF ethod. The iplicit forula (21) is solved iteratively by the Newton ethod: R ( ( yn+k) = 1 h ˆα k Myn+k + k 1 j=0 ˆα My ) j n+j fn+k J ( (22) yn+k) = R(y n+k ) y n+k = 1 h ˆα M k jn+k where f and j are given by (16) and (17). The BDF object specifies the step function (21) and the residual and the jabobian (22) to copute the iteration of the Newton Raphson object (objnr). In a siilar way, the nuerical ethods entioned previously can be ipleented. 4 Nuerical results 4.1 Exaple 1: Elastoplastic traction of a cylinder with cavity An axisyetric cylinder with a radius of 20 units, a length of 40 units and a central spherical cavity of a radius of 5 units has been considered in this exaple. The cylinder defors in siple traction with an axial force of P =3 10 5 units. The values for Young, Poisson and hardening odulus are E =2 10 6, ν =0.25 and H =10 6 respectively. Yield stress is σ e = 2000 units. Due to the syetry only one forth of the plane section has been discretized, and it will be analysed in 2D in the axisyetric plane. This is an elastic proble, with linear deforation and non-linear aterial. 4.1.1 Static case The left iage of Figure 3 shows the esh, the stresses and the deforation (scale factor of 5) after 10 quasi-static steps. The stress concentration around the hole can be observed. The right iage of the sae figure shows the isoregions for plastic deforation which reaches the whole cross section with an average value of about 3%. 4.1.2 Dynaic case The left iage of Figure 4 shows the tie evolution of the vertical displaceent of the upper central node, for a tie interval of 10 units using the trapezoidal ethod with 500 steps. We can see the peranent plastic deforation and the elastic vibration around it (for a low density ρ = 1). The block starts its elastoplastic deforation fro null initial conditions, due to the axial force. We observe that after the static deforation is reached, the deforation reains because of the accuulated inertia. The right iage of Figure 4 shows the final plastic deforation at the end of the tie interval. 1020