Elsevier

Computers & Geosciences

Volume 96, November 2016, Pages 136-146
Computers & Geosciences

Research Paper
LibHalfSpace: A C++ object-oriented library to study deformation and stress in elastic half-spaces

https://doi.org/10.1016/j.cageo.2016.08.011Get rights and content

Highlights

  • The library exploits the OOP to supply a coherent development framework.

  • A set of deformation source solutions is provided in a structured framework.

  • The interface allows creating new source models using the boundary elements method.

  • The same reference and unit systems are employed.

Abstract

The study of deformation processes in elastic half-spaces is widely employed for many purposes (e.g. didactic, scientific investigation of real processes, inversion of geodetic data, etc.). We present a coherent programming interface containing a set of tools designed to make easier and faster the study of processes in an elastic half-space. LibHalfSpace is presented in the form of an object-oriented library. A set of well known and frequently used source models (Mogi source, penny shaped horizontal crack, inflating spheroid, Okada rectangular dislocation, etc.) are implemented to describe the potential usage and the versatility of the library. The common interface given to library tools enables us to switch easily among the effects produced by different deformation sources that can be monitored at the free surface. Furthermore, the library also offers an interface which simplifies the creation of new source models exploiting the features of object-oriented programming (OOP). These source models can be built as distributions of rectangular boundary elements. In order to better explain how new models can be deployed some examples are included in the library.

Introduction

The modelling of deformations at the Earth surface often assumes an elastic half space as the simplest representation of the crust containing the deformation source. Many mathematical tools allow us to study more realistic representations of the Earth crust. For example the EDGRN/EDCMP fortran code (Wang et al., 2003) describes the crust as a multi-layered half-space with the aim of computing the deformation produced by an earthquake. Boundary element methods (BEM, Aliabadi, 2012) can be used to create complex geometries (e.g. Bonafede and Neri, 2000), while finite element models (FEM, Zienkiewicz et al., 2014) are suitable to describe deformation fields in 3D-heterogeneous crustal structures both due to seismic (e.g. Trasatti et al., 2011b) and volcanic (e.g. Trasatti et al., 2011a) sources. Furthermore numerical methods allow the use of elasto-plastic constitutive laws (e.g. Trasatti et al., 2005) which overcome the unrealistic results sometimes provided by pure elastic models (Bonafede and Ferrari, 2009). However, the assumption of a homogeneous elastic half-space is always necessary for a first validation of the results provided by more complex mathematical tools. For example, the EDGRN/EDCMP code provides an external link to the analytical solution for a rectangular dislocation in an elastic half-space (Okada, 1992) to check the accuracy of numerical results.

Many analytical (or semi-analytical) solutions are available to compute the strain and stress fields produced by different sources of deformation in an elastic half-space. In the category of pressurized sources, the following are widely used in literature: the isotropic Mogi (1958) source, the dipping finite prolate spheroid (Yang et al., 1988), the horizontal circular crack (Fialko et al., 2001), the point-like triaxial ellipsoids (Davis, 1986). Together with the analytical solutions provided by Okada (1992) for rectangular dislocations, this set of solutions is often used to study the deformation produced at the free surface by one or more sources present in the crust. Many codes are available which provide different implementations of the solutions for strain and stress fields produced by the cited deformation sources. These codes are often inhomogeneous in many aspects. For example the original code by Okada (dc3d.f) is written in Fortran, while Fialko et al. (2001) provide the Matlab code to compute the deformation fields produced by a penny-shaped crack and a prolate spheroid. Furthermore the solutions often use different reference systems and the input/output data are generally given in different units. All these aspects contribute to make uneasy the reuse of existing codes in new projects.

In this article we present an object-oriented library written in C++ which makes available in a coherent programming framework the following resources for illustrative purposes:

  • some deformation source models widely used in literature (Mogi source, penny-shaped crack, Davis ellipsoids, etc.). The list is by no means exhaustive but may be extended by the interested users (e.g. adding dislocation models in anisotropic media, Garg et al., 1996 and Singh et al., 2005);

  • a standard interface designed to create complex source models as distributions of rectangular boundary elements. Each user might contribute to implement extended sources with prescribed geometries or to extend the functionalities of already implemented sources (e.g. adding the method to compute the gravity changes for a finite source).

The framework is written exploiting the object-oriented programming (OOP) paradigm (Schildt, 2003), a programming approach which allows codes to be structured in an efficient way, enhancing readability, maintainability and code reuse. In Section 2, we describe the library structure in terms of class relationships. The library programming interface is also described in detail. In order to better explain its usage some examples are provided and commented in Section 3. Finally, in Section 4, we briefly discuss the structure of our framework in terms of the OOP paradigm and draw our conclusions.

Section snippets

LibHalfSpace: class hierarchy structure

The LibHalfSpace library makes available a set of deformation sources, each of which is implemented in a corresponding class. In the framework of object oriented programming, a class is a new data type which extends the C++ native set of data types. With respect to data structures, the definition of a class must be completed by the functions (class methods) which can manipulate the data of the class (class data). Data and methods are known as class members. Only class methods can manipulate a

Applications

In this section we illustrate the application of the LibHalfSpace framework with some examples. To develop an application which exploits our framework, the first step is to include the following line:

# include “HalfSpace.h” in the source files where the framework tools are invoked. This header file is used to include all the header files containing the declarations about the framework classes. Obviously the header files must be installed in a directory known by the compiler. Alternatively,

Discussion and conclusions

LibHalfSpace, the programming interface for deformation source models here presented, has been designed in order to make available to users a set of tools organized in a coherent framework. Many of the included tools are already available in the literature as individual codes. However in these cases, the extreme heterogeneity (in terms of programming language, reference systems and measurement units) requires significant efforts in reusing the already available codes in new projects. Instead

Acknowledgments

We acknowledge financial support from Dipartimento di Fisica and Astronomia, University of Bologna, for a research fellowship, Category: Post-Doc. Two anonymous reviewers contributed with valuable suggestions on a previous version of this paper.

References (23)

  • P.M. Davis

    Surface deformation due to inflation of an arbitrarily oriented triaxial ellipsoidal cavity in an elastic half-space, with reference to Kilauea Volcano, Hawaii

    J. Geophys. Res.

    (1986)
  • View full text