Sep 29, 2016 - experience and work have been done using java for .... SDE platform could be considered both as a desktop application and web based one through the ...... programming interfaces for users who wish to develop research.
The Symplegma project
Symplegma Introduction Options and choices
The Symplegma project, a java computational mechanics framework.
SDE Description
Java code
Christos G. Panagiotopoulos
jFEM jBEM FuturEye PDE Climax GEN
Conclusions
29-09-2016 Technical University of Crete School of Production Engineering & Management
The Symplegma project
The Symplegma project
Symplegma Introduction Options and choices
SDE Description
Java code
What is Symplegma?
jFEM jBEM FuturEye PDE Climax GEN
Conclusions
The Symplegma project
Symplegma: a computational mechanics framework and beyond The Symplegma project
Symplegma Introduction Options and choices
SDE Description
Java code jFEM jBEM FuturEye PDE Climax GEN
Conclusions
• An effort of a coordinated utilization of, several years,
experience and work have been done using java for implementation of computational mechanics methods. • Initiated in 2008 at AUTh, further developed mainly at
UoS and at CUP, while the current form is given during a stay at FORTH. • Main orientation of the project and the respective software
is education and research.
The Symplegma project
Computational mechanics and numerical computing The Symplegma project
From International Association for Computational Mechanics website Symplegma Introduction Options and choices
SDE Description
Computational Mechanics (CM) is the development and application of numerical methods and digital computers to the solution of problems posed by Engineering and Applied Science with the objectives of understanding and harnessing the resources of nature.
Java code jFEM jBEM FuturEye PDE Climax GEN
Conclusions
Interdisciplinary CM involves different fields of expertise. Its three pillars are mathematics, computer science, and mechanics. Computational fluid dynamics, computational thermodynamics, computational electromagnetics, computational solid mechanics are some of the many specializations within CM.
The Symplegma project
Numerical methods The Symplegma project
Symplegma Introduction Options and choices
SDE Description
Java code jFEM jBEM FuturEye PDE Climax GEN
Conclusions
Mathematics Ordinary and Partial differential equations, linear algebra and numerical analysis. Methods FEM, FDM, and BEM are the most popular numerical methods used in order of dominance. In solid mechanics FEM are far more prevalent, whereas in fluid mechanics, thermodynamics, and electromagnetism, FDM are almost equally applicable. The BEM is in general less popular, but has a niche in certain areas (e.g., acoustics, fracture).
The Symplegma project
Recent publications on numerical computing The Symplegma project
Some recently published booka on numerical modelling and scientific calculations. 1. G.E. Stavroulakis, M.E. Stavroulaki & A.D. Muradova (2015) Computational Mechanics, HEAL-Link∗ (in greek)
Symplegma Introduction Options and choices
2. M. Plexousakis & P. Chatzipantelidis (2015) Numerical solution of partial differential equations, HEAL-Link∗ (in greek)
SDE
3. T. Hatzigogos & F. Karaoulanis (2015) Finite element method for geotechnical mechanics, HEAL-Link∗ (in greek)
Description
Java code jFEM jBEM FuturEye PDE Climax GEN
4. J.T. Katsikadelis (2016) The Boundary Element Method for Engineers and Scientists: Theory and applications, Academic Press, Elsevier
Conclusions
5. H.P. Langtangen, S. Linge (2016) Finite Difference Computing with Partial Differential Equations∗ 6. H.P. Langtangen, K.A. Mardal (2016) Introduction to Numerical Methods for Variational Problems∗ ∗
Released under Creative Commons license The Symplegma project
Java? The Symplegma project
General Java is a general purpose, computer programming language, gained
Symplegma Introduction Options and choices
SDE Description
Java code jFEM jBEM FuturEye PDE Climax GEN
Conclusions
widespread popularity. Appealing features of Java include: clean and simple syntax, high level of maintainability of Java code, portability, automatic memory management, multithreading and networking capabilities, wealth of libraries and tools.
Science Early interest in Java from the scientific communities to determine the level of performance offered by Java, and its suitability for developing scientific software. The Java Grande Forum (JGF) was an initiative to encourage interest in Java amongst the scientific and HPC communities.
The Symplegma project
Java for numerics? The Symplegma project
Symplegma Introduction Options and choices
SDE Description
Java code jFEM jBEM FuturEye PDE Climax GEN
Conclusions
• JScience: Java tools and libraries for the advancement of
sciences. • JAS: Java Algebra System Project. • SymJava: A Java library for fast symbolic-numeric
computation. • GeoGebra: an interactive geometry, algebra, statistics and
calculus application, intended for learning and teaching mathematics and science. • jLab: Scientific Scripting for the Java Platform. • Gaia: An efficient framework for Java data processing
systems in HPC environments. . . . to mention but a few . . . The Symplegma project
The Symplegma components The Symplegma project
Symplegma Introduction Options and choices
• Java code/libraries of numerical methods. • An integrated yet simple graphical environment called SDE
(Symplegma Development Environment).
SDE Description
Java code
• A domain specific language (DSL)1 to be used as the
interpreter’s language which we call Climax.
jFEM jBEM FuturEye PDE Climax GEN
Conclusions
1
Well known DSLs, in the context of mathematics, could be considered the Matlab and Mathematica. Another example is the UFL (Unified Form Language) of the FEniCS Project, a domain specific language for declaration of finite element discretizations of variational forms. The Symplegma project
Why and for what reason? The Symplegma project
Symplegma Introduction Options and choices
SDE Description
Java code jFEM jBEM FuturEye PDE Climax GEN
Conclusions
Java We consider Java as an alternative, and not subsitute, language for numerical, scientific and engineering computations. Still FORTRAN, C and C++ are the dominants together with Python playing a crucial role in the field. Java should be considered both for the language and the Java Virtual Machine, while lot of significant languages running on the JVM have been arised (e.g. Groovy, Scala, Clojure, Jython, JRuby, etc.). Symplegma & SDE Symplegma and the respective platform SDE are considered to become an integrated computational mechanics platform with main orientation research and education. Substitution of commercial or open source code capable to handle huge problems of industry is not considered. The Symplegma project
Compiled or Interpreted implementation? The Symplegma project
Compilation In a compiled implementation of a language, a compiler translates the source code directly into code that is specific to the target machine (machine code) specific to a given processor and operating system. Then the
Symplegma Introduction Options and choices
SDE Description
Java code jFEM jBEM FuturEye PDE Climax GEN
computer will run the machine code on its own.
Interpretation In an interpreted implementation of a language, the source code is not directly run by the target machine. What happens instead is that another program reads and then executes the original source code. This other program is also known as the interpreter. The interpreter is usually written specifically for the native machine.
Conclusions
Symplegma implementation? Symplegma, following java (and/or groovy), is compiled into Java bytecode to be interpreted or compiled by JVM. The Java bytecode can be used in any processor and operating system assuming that it is eqquiped with some JVM. A JIT compiler (part of JVM) may compile the bytecode into native machine code (faster) at runtime, applying sophisticated optimization techniques. The Symplegma project
Programming or Scripting mode? The Symplegma project
Programming In computer software, a general-purpose programming language is a programming language designed to be
Symplegma Introduction Options and choices
SDE Description
Java code jFEM jBEM FuturEye PDE Climax GEN
Conclusions
used for writing software in a wide variety of application domains (a general-purpose language).
Scripting A computer script is a list of commands that are executed by a certain program or scripting engine in order to achieve a specific goal. Scripting could be seen as programming at a high and flexible abstraction level.
Symplegma mode? We may consider the SDE platform as a general purpose program in order to produce both scripts, taking advantage of Groovy or BeanShell (etc.), and integrated applications, taking advantage of Java itself, both of these modes together with predefined code unified in Climax .
The Symplegma project
Web or Standalone application? The Symplegma project
Standalone application Not being experts in IT, we define here the standalone or desktop application as any software that can be
Symplegma Introduction Options and choices
SDE Description
Java code jFEM jBEM FuturEye PDE Climax GEN
Conclusions
installed on a single computer (laptop or a desktop) and used to perform specific tasks.
Web based application Opposing the above definition for desktop applications, we consider (again in a simplified manner) web based applications those for which by some means Internet connectivity is necessary.
Symplegma application? SDE platform could be considered both as a desktop application and web based one through the technology of Java Web Start. Using Java Web Start technology, standalone Java software applications can be deployed with a single click over the network. Java Web Start ensures the most current version of the application will be deployed, as well as the correct version of the Java Runtime Environment (JRE, the software package that contains what is required to
run
a Java program).
The Symplegma project
Proprietary or Open source software? The Symplegma project
Proprietary Proprietary software is computer software for which the software’s publisher or another person retains
Symplegma Introduction Options and choices
SDE Description
Java code jFEM jBEM FuturEye PDE Climax GEN
Conclusions
intellectual property rightsusually copyright of the source code, but sometimes patent rights.
Open-source Open-source software (OSS) is computer software with its source code made available with a license in which the copyright holder provides the rights to study, change, and distribute the software to anyone and for any purpose. Open-source software may be developed in a collaborative public manner.
Symplegma license? Software freedom plays a fundamental role in education. With the aim of increasing collaboration and communication within the scientific computing community we have adopted the open-source model for the Symplegma development using an appropriate license (e.g. GNU, Creative Commons, etc).
The Symplegma project
The Symplegma project
Symplegma Introduction Options and choices
SDE Description
Java code jFEM jBEM FuturEye PDE Climax GEN
SDE: An integrated development environment for Symplegma components
Conclusions
The Symplegma project
Description of SDE environment The Symplegma project
Symplegma Introduction Options and choices
SDE Description
Java code jFEM jBEM FuturEye PDE Climax GEN
Conclusions
The (a) (b) (c)
SDE environment consists of three segments the text area (input) the communication area (output) the area of graphical visualization (output) The Symplegma project
SDE text area The Symplegma project
The input text area is a tabbed text editor and file viewer. Symplegma Introduction Options and choices
SDE Description
Java code jFEM jBEM FuturEye PDE Climax GEN
Conclusions
• syntax highlight • auto suggetions and completion • commentization • input command interaction
Regarding the latter, text in these areas could be used as input commands or scripts passed to the BeanShell or GroovyShell interpreter. The result of execution of these commands/scripts interacts with the communication text area and/or the visualization area (Graphics panel).
The Symplegma project
SDE communication area The Symplegma project
Symplegma Introduction Options and choices
SDE Description
Java code jFEM jBEM FuturEye PDE Climax GEN
Conclusions
The communication area is where the program communicates unidirectionally with the user. It is a tabbed area of four fixed tabs as its components. All these four tabs are ASCII textual viewers. • Output tab which actually is the output stream for the
program. • Console tab shows the numbered commands that have
been passed to and executed by the interpreter. • Errors tab is the errors/warnings output stream • Comments area consists of simple messages or comments
that the program sends to the user.
The Symplegma project
SDE area of graphical visualization The Symplegma project
Symplegma Introduction Options and choices
SDE Description
Java code jFEM jBEM FuturEye PDE Climax GEN
Conclusions
A two dimensional (2D) visualization area has been implemented using java graphics for the swing components. Three dimensional (3D) is a future plan possibly developed by utilization of java3d or jogl (java openGL) libraries. Graphics panel is interactive with some standard operations: • standard transformations (translation, zoom) • choice of colours, etc. • goemetry display • at rest results display • animation of results
The Symplegma project
The Symplegma project
Symplegma Introduction Options and choices
SDE Description
Java code jFEM jBEM FuturEye PDE Climax GEN
The java source code, classes and libraries
Conclusions
The Symplegma project
Java implementation of computational mechanics The Symplegma project
Symplegma Introduction Options and choices
Besides pure Java, Symplegma includes the java code of computational mechanics implementation, already existed, or under development. • Finite element method of engineering approach using
jFEM, a java implementation have been developed.
SDE Description
Java code jFEM jBEM FuturEye PDE Climax GEN
Conclusions
• Boundary element method of engineering approach using
jBEM, a java implementation have been developed. • FEM numerical solution of PDEs utilizing FuturEye2 • A general domain specification for user defined approaches
of direct interaction with SDE components. 2
Still on a trial basis for SDE compatibility. Developed by Prof. Yueming Liu, Department of Mathematics, University of Texas at Arlington, USA. The Symplegma project
The code skeleton The Symplegma project
Symplegma Introduction Options and choices
SDE Description
Java code jFEM jBEM FuturEye PDE Climax GEN
Conclusions
Pre-processing
Processing
• Declare variables
• Declare algorithms
• Define domains
• Set analysis’ parameters
• Define nodes
• Do the analysis
• Define element • Define other necessary
entities
Post-processing • Manipulating results • Visualize • Plotting
The Symplegma project
The Symplegma project
Symplegma Introduction Options and choices
SDE Description
Java code jFEM jBEM FuturEye PDE Climax GEN
jFEM: The finite element method implementation
Conclusions
The Symplegma project
FEM “Hello world” and its code The Symplegma project
Symplegma Introduction Options and choices
SDE Description
Java code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
jFEM jBEM FuturEye PDE 16 Climax GEN 17
Conclusions
18 19 20 21 22 23 24 25 26 27
# fem ” H e l l o w o r l d ” l i k e import jfem . ∗ ; // a s k t h e u n i v e r s e t o p r o v i d e a domain aDomain=t h e U n i v e r s e . FEMDomain ( ) ; // d e f i n e a node and add i t i n t o t h e domain aNode= new Node ( 1 , 0 . 0 ) ; aDomain . putNode ( aNode ) ; // d e f i n e some m a t e r i a l aMate r = new E l a s t i c M a t e r i a l ( 1 , 1 0 0 0 . 0 ) ; aDomain . p u t M a t e r i a l ( aMate r ) ; // d e f i n e a c r o s s s e c t i o n ( t h e a r e a o f t h a t one d o f e l e m e n t ) a C r o s s S e c t i o n = new C r o s s S e c t i o n ( 1 , 1 . 0 ) ; aDomain . p u t C r o s s S e c t i o n ( a C r o s s S e c t i o n ) ; // d e f i n e some e l e m e n t and t h e n put i t i n t h e domain anElem = new OneDOF ( 1 , aDomain . ge tNode ( 1 ) , aDomain . g e t M a t e r i a l ( 1 ) , aDomain . g e t C r o s s S e c t i o n ( 1 ) , 1) ; aDomain . p u t E l e m e n t ( anElem ) ; // c o n s t r u c t some l o a d s and a l o a d c a s e aL oadC ase = new L oadC ase ( 1 ) ; aL oadC ase . putL oad ( new Load ( 1 0 0 . 0 , 1 , 1) ) ; aDomain . putL oadC ase ( aL oadC ase ) ; // d e f i n e t h e a n a l y s i s t h a t w i l l manage p r o b l e m ’ s s o l u t i o n t h e A n a l y s i s = new S t a t i c A n a l y s i s ( aDomain ) ; // now we may a s k t h e A n a l y s i s t o a n a l y s e . . . t heA n a ly sis . analyse (1) ; theAnalysis . endAnalysis () ; // // d e f o r m a t i o n theGP . p l o t D e f o r m ( 1 , 0 . 5 , 1) The Symplegma project
FEM “Hello world” and its code The Symplegma project
Symplegma Introduction Options and choices
SDE Description
Java code jFEM jBEM FuturEye PDE Climax GEN
Conclusions
The Symplegma project
A simple truss example3 The Symplegma project
Symplegma
• Modulus of elasticity
Introduction Options and choices
E=2.1×108 kN/m2
SDE
• Section area A=0.001m
Description
• Force F =70N
Java code jFEM jBEM FuturEye PDE Climax GEN
Conclusions
3
Example taken from Stavroulakis, Stavroulaki & Muradova, Computational Mechanics, HEAL-link, (sec. 3.6.1) The Symplegma project
A simple truss example 1 2 3 4 5 6 Symplegma 7 8 Introduction 9 Options and choices 10 11 SDE 12 Description 13 14 Java code 15 jFEM 16 jBEM FuturEye PDE 17 18 Climax GEN The Symplegma project
Conclusions
19 20 21 22 23
import jfem .∗ aDomain=t h e U n i v e r s e . FEMDomain ( ) // d e f i n e t h e n o d e s aDomain . putNode ( new aDomain . putNode ( new aDomain . putNode ( new aDomain . putNode ( new
Node ( 1 Node ( 2 Node ( 3 Node ( 4
,0.0 ,0.0) ) ,1.5 ,0.0) ) ,1.5 ,0.866) ) ,0.0 ,0.866) )
// d e f i n e m a t e r i a l aDomain . p u t M a t e r i a l ( new E l a s t i c M a t e r i a l ( 1 , 2 . 1 ∗ 1 0 8 . 0 ∗ 1 0 0 0 . 0 ) ) ; // d e f i n e C r o s s S e c t i o n s aDomain . p u t C r o s s S e c t i o n ( new C r o s s S e c t i o n ( 1 , 0 . 0 0 1 ) ) ; // d e f i n e e l e m e n t s aDomain . p u t E l e m e n t ( new T r u s s 2 d ( 1 , aDomain . ge tNode ( 1 ) , aDomain . ge tNode ( 2 ) aDomain . g e t M a t e r i a l ( 1 ) , aDomain . g e t C r o s s S e c t i o n ( 1 ) ) ) aDomain . p u t E l e m e n t ( new T r u s s 2 d ( 2 , aDomain . ge tNode ( 2 ) , aDomain . ge tNode ( 3 ) aDomain . g e t M a t e r i a l ( 1 ) , aDomain . g e t C r o s s S e c t i o n ( 1 ) ) ) aDomain . p u t E l e m e n t ( new T r u s s 2 d ( 3 , aDomain . ge tNode ( 4 ) , aDomain . ge tNode ( 3 ) aDomain . g e t M a t e r i a l ( 1 ) , aDomain . g e t C r o s s S e c t i o n ( 1 ) ) ) aDomain . p u t E l e m e n t ( new T r u s s 2 d ( 4 , aDomain . ge tNode ( 1 ) , aDomain . ge tNode ( 4 ) aDomain . g e t M a t e r i a l ( 1 ) , aDomain . g e t C r o s s S e c t i o n ( 1 ) ) ) aDomain . p u t E l e m e n t ( new T r u s s 2 d ( 5 , aDomain . ge tNode ( 1 ) , aDomain . ge tNode ( 3 ) aDomain . g e t M a t e r i a l ( 1 ) , aDomain . g e t C r o s s S e c t i o n ( 1 ) ) ) aDomain . p u t E l e m e n t ( new T r u s s 2 d ( 6 , aDomain . ge tNode ( 4 ) , aDomain . ge tNode ( 2 ) aDomain . g e t M a t e r i a l ( 1 ) , aDomain . g e t C r o s s S e c t i o n ( 1 ) ) ) The Symplegma project
, , , , , ,
A simple truss example The Symplegma project
24 25 26 27 28 29 Symplegma 30 Introduction 31 Options and choices 32 33 SDE 34 Description 35 36 Java code 37 jFEM 38 jBEM FuturEye PDE 39 40 Climax GEN 41 Conclusions 42 43 44 45 46 47 48 49
// c o n s t r u c t some l o a d s Load aLoad ; L oadC ase aL oadC ase ; aL oadC ase = new L oadC ase ( 1 ) ; aLoad =new Load ( − 70 , 2 , 2) ; aL oadC ase . putL oad ( aLoad ) ; // put L oadC ase t o domain aDomain . putL oadC ase ( aL oadC ase ) ; // b o u n d a r y c o n d i t i o n s d o u b l e Ak=10.0 e 16 ; ConstraintElement aConstraintElement ; i n t i d =0; f o r ( i n t i =1; i