Professional Documents
Culture Documents
SORTA2020 Paper Palaversa-Prebeg-Andric
SORTA2020 Paper Palaversa-Prebeg-Andric
net/publication/346220803
CITATIONS READS
0 579
3 authors:
Jerolim Andrić
University of Zagreb
49 PUBLICATIONS 236 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Marin Palaversa on 24 November 2020.
Abstract
This paper deals with use of open-source software in ship structural analysis. Some advantages and disadvantages
of open-source software over standard commercial software are discussed. Object-oriented programming is briefly
explained and its importance and benefits in software development are demonstrated on examples from OOFEM.
After that, major characteristics and code architecture of OOFEM are described. Role of structural analysis in ship
structural design is touched on. Classification societies’ requirements on finite element analysis of ship structures
are identified and OOFEM is assessed w.r.t them. An upgrade to OOFEM’s library of finite elements is proposed
based on the foregoing discussion.
Key words: ship structural design; ship structural analysis; finite element analysis; open-source software; FEM
software
Sažetak
Ovaj se članak bavi upotrebom softvera otvorenog kôda u analizi brodskih konstrukcija. Raspravlja se o nekim
prednostima i nedostacima softvera otvorenog kôda nasuprot standardnim komercijalnim softverima. Ukratko je
objašnjeno objektno-orijentirano programiranje te su njegova važnost i benefiti kod razvoja softvera prikazani na
primjerima iz OOOFEM-a. Nakon toga su opisane glavne karakteristike i arhitektura kôda OOFEM-a. Ukratko je
opisana uloga analize konstrukcije u projektiranju brodskih konstrukcija, prepoznati su zahtjevi klasifikacijskih
društava prema analizi metodom konačnih elemenata te je izvršena procjena OOFEM-a prema ovim zahtjevima.
Predložena je nadogradnja biblioteke konačnih elemenata OOFEM-a na temelju prethodne rasprave.
Ključne riječi: projektiranje brodske konstrukcije; analiza brodske konstrukcije; analiza metodom konačnih
elemenata; softver otvorenog kôda; MKE softver
List of abbreviations
CS – classification society
FE – finite element
FEA – finite element analysis
FEM – finite element method
OO – object-oriented
OSS – open-source software
1. Introduction
Structural analysis is part of ship structural design process [1]. Its primary aim is to
determine response of ship’s structure to loads imposed on it [1]. Since the second half of the
20th century, a great development has occurred in field of the rational ship structural analysis
(i.e. structural analysis based on first-principles methods such as the finite element method) [1].
There is a lot of good commercial software available on the market that is routinely applied to
ship structural problems every day. A survey [2] conducted among structural designers that
work in the field of offshore structures revealed that the most widely used software for structural
1
XXIV. simpozij ‘Teorija i praksa brodogradnje’ SORTA 2020.
15. - 17. listopad 2020., Malinska, Otok Krk, HR
analysis based on the finite element method (FEM) are ANSYS, Nastran (MSC’s and
Siemens’s) and Abaqus respectively. No open-source software (OSS) was reported by any
company that took part in the survey. On the other hand, 25% of all users that employ
computational fluid dynamics’ analyses in their work reported that they use OpenFOAM, OSS
based on the finite volume method.
In this paper we present some advantages and disadvantages of using OSS in ship structural
analysis. Importance of object-oriented (OO) design of its code architecture is discussed and
benefits it brings are demonstrated on finite element analysis (FEA) software called OOFEM.
At the end, we touch on a role of ship structural analysis within overall ship structural design
process and the most important requirements that classification societies (CSs) impose on FEA
software.
1
Source: http://www.oofem.org/en/courses
2
Source: https://www.openfoam.com/training/schedule.php
2
24th Symposium on Theory and Practice of Shipbuilding SORTA 2020.
15th – 17th Oct 2020, Malinska, Krk Island, Croatia
forum was 40% which is quite high if compared with that of 20% on OpenFOAM’s forum [3],
which definitely must be taken into account if this is the only support a user can rely on.
The next assessment measure for an open-source project is activity of its developers. It can be
carried out very easily if the project is located on Github, Bitbucket or a similar service. Some
of the measures are number of commits in a time period, number of active forks, etc. [3] E.g.
the number of commits to OOFEM’s repository on Github was 9 (in a 30-days period prior to
the date of data collection) while that of another FEA software called FreeFEM was 92 (these
and other data can be found in [3]). They show that FreeFEM’s developers’ community is more
active or, at least, that it was more active in the surveyed period. Additionally, one should take
care of these measures even in a longer time perspective because if a project dies out, no new
code is developed. This is especially important if one just wants to use the software (and not to
develop it) because, without an active developers’ community, the software can become
unusable due to bugs that are not fixed, lack of adaptability to new operating systems or their
new features, etc.
The last set of assessment criteria is related to programming language(s) and design of code
architecture. Most of open-source FEA software developed in last two or three decades has
been written in C++ programming language. However, older software (e.g. Code Aster) could
be written in Fortran. This is of less importance today as Fortran now enables object-oriented
programming paradigm, but it may represent an obstacle if a user does not have time to spend
on learning a new programming language.
3
XXIV. simpozij ‘Teorija i praksa brodogradnje’ SORTA 2020.
15. - 17. listopad 2020., Malinska, Otok Krk, HR
that methods need in order to execute correctly are packed together in an object. This concept
in OO programming is called encapsulation. It facilitates readability of code because it is close
to way people see things and not computers or, as [5] states, “object-oriented thinking lends
itself to an anthropomorphic view of objects”.
Methods (operations) and attributes (data) of an object can be accessible either only from within
the object or from other objects as well. Those who belong to the former make up object’s
implementation while the latter belong to object’s interface. Concept of class’s (or object’s)
interfaces is an important one because they represent a means of communication between
objects. Because objects communicate only through their interfaces, deciding what goes to an
interface and what stays in the implementation is very important. When something changes in
object’s interface, all other objects that use the changed method or attribute must adopt the same
changes (e.g. if a list of parameters of a method changes, all methods of other objects that invoke
the changed method will have to adapt). Thus, we try to keep interfaces to a minimum [6]. On
the other hand, this enables us to change method’s implementation and, if the interface remains
the same, nothing needs to be changed in related objects. This greatly contributes to code’s
maintainability.
Another great benefit of OO programming is code reuse, which also enhances software
extensibility. This is supported primarily through inheritance, polymorphism and composition,
all being important OO concepts. Inheritance enables one object to inherit methods and
attributes of another object which means that they do not have to be re-written when a new class
is created. Inheritance is not limited to only one child class (or subclass), which can lead to
creation of large class hierarchies typical for object-oriented code. Polymorphism is related to
different implementations of a method inherited from a superclass (parent class) in subclasses
(child classes). This is primarily used for defining common interfaces. More on all of these
concepts can be found in [5] and [6]. Later, in Chapter 3, we shall demonstrate their use on
examples from OOFEM.
4
24th Symposium on Theory and Practice of Shipbuilding SORTA 2020.
15th – 17th Oct 2020, Malinska, Krk Island, Croatia
5
XXIV. simpozij ‘Teorija i praksa brodogradnje’ SORTA 2020.
15. - 17. listopad 2020., Malinska, Otok Krk, HR
Figure 4 UML diagram of partial hierarchy of classes associated with EngngModel class
Slika 4 UML dijagram djelomične hijerarhije klasa povezanih s klasom EngngModel
6
24th Symposium on Theory and Practice of Shipbuilding SORTA 2020.
15th – 17th Oct 2020, Malinska, Krk Island, Croatia
Figure 5 UML diagram of partial hierarchy of classes associated with FEMComponent class
Slika 5 UML dijagram djelomične hijerarhije klasa povezanih s klasom FEMComponent
7
XXIV. simpozij ‘Teorija i praksa brodogradnje’ SORTA 2020.
15. - 17. listopad 2020., Malinska, Otok Krk, HR
Going down the class hierarchy of Figure 5 we come to Element class. This class represents a
FE no matter if it is employed in structural analysis, fluid mechanics (FMElement),
thermodynamics (TransportElement) or any other field where the FEM is used to solve
governing equations. Thus, the Element class declares only those attributes and methods that
are common to all the FEs: giveNumberOfNodes, computeVolume, computeArea,
computeNumberOfDofs, etc. For example, calculation of element’s stiffness matrix is declared
only in one of Element’s child classes, namely StructuralElement class. What would happen if,
e.g., computeStiffnessMatrix were declared at Element class’s level or computeVolume at
StructuralElement’s level? The former would mean that all child classes of Element class inherit
it. So, a FMElement would have a computeStiffnessMatrix method that it, obviously, does not
need and it would only be a burden on computer’s memory and would hinder code’s readability
and thus maintainability. If the latter were true, then computeVolume would have to be rewritten
in all classes at the same hierarchical level, i.e. FMElement, TransportElement, etc. This would
hinder code reuse, a benefit of OO programming that we have discussed. Thus, we can argue
that one of the most delicate decisions when designing software’s code architecture by applying
OO paradigm is to find a right place in class hierarchy for each attribute and method because
the opposite cancels out benefits of OO programming.
Going further down the hierarchy tree, we come to StructuralElement class which represents a
base class for all FEs used in structural analysis (linear, non-linear, static, dynamic…). It
declares methods for typical operations encountered in solid mechanics when the FEM is used:
computeMassMatrix, computeStiffnessMatrix, computeLoadVector,
computeConstitutiveMatrixAt, etc. It can be seen that the aforementioned method
computeStiffnessMatrix is declared as abstract at this level and is implemented in subsequent
classes (e.g. NLStructuralElement). The reason why it is declared at this level lies in fact that
all FEs used in structural mechanics have a stiffness matrix. Thus, it is sensible to provide a
common interface here. However, because the stiffness matrix is not calculated in the same
manner for all structural FEs, the implementation of the method is left for lower classes, e.g.
we can see that the implementation is provided within NLStructuralElement class.
NLStructuralElement class is a parent class for all 2D and 3D elements (e.g. plate and shell
elements) whose stiffness matrices are calculated as ∫𝑉 𝑒 𝑩𝑇 𝑫𝑩 d𝑉 (where B is the strain-
displacement matrix, D is the constitutive matrix and Ve is FE’s volume). In case of some minor
departures from this procedure, the method can be overridden in NLStructuralElement’s child
classes as it is the case with MITC4 FE.
Classes at the lowest level in the hierarchy of NLStructuralElement are related to concrete
membrane (e.g. PlaneStressElement, PlaneStrainElement…), shell and plate (e.g. MITC4Shell,
Quad1Mindlin…) and 3D (Structural3DElement) elements. Some methods appear for the first
time only at this level, e.g. computeBmatrixAt. Again, in order to understand why this level is
a right level for the foregoing method, we need to think about which elements calculate the
strain-displacement matrix B in the same way (e.g. calculation of B matrix for a plate element
differs from that of a plane stress element because it depends on assumptions given by the
chosen plate theory). All of these examples demonstrate benefits of using OO programming
concepts of inheritance and polymorphism. An underlying concept of encapsulation enables
creation of all these classes in the first place. A bit less obvious is use of composition which we
shall not go into here (see more in [5] and [6]).
We have mentioned that two objects communicate with each other over their interfaces. We
have also said that all attributes and methods declared as public of an object make up object’s
interface. There are a few benefits of such an approach. One of the main benefits is that when
something changes within one object, it can still be accessed by other object(s) if its interface
8
24th Symposium on Theory and Practice of Shipbuilding SORTA 2020.
15th – 17th Oct 2020, Malinska, Krk Island, Croatia
remains the same. This greatly contributes to the maintainability of the code because a
developer changes only what is relevant not having to go through large portions of code to
check whether something else must be changed too.
Let’s consider the following example. There are two methods, one within an EngngModel
object that solves the governing equations (e.g. solveYourself in Figure 4) and the other one that
computes and returns FE’s stresses (computeStressVector). During solution of the problem, the
EngngModel method invokes computeStressVector of a FE used in the analysis. As we can see
in Figure 5 computeStressVector is declared as public (little plus sign next to it) in
StructuralElement class, which means that it belongs to StructuralElement’s interface, and
therefore it can be seen and accessed from a method that belongs to another object. It can also
be seen that it is declared as abstract (italic typeface) and that it is inherited by
StructuralElement’s subclasses where it retains the same name, return type and a list of
parameters, which means that the interface remains the same for all “structural FEs” (child
classes of StructuralElement). Thus, when the EngngModel’s method wants to know stresses
of any StructuralElement, it literally uses the same call (the same code). If we had different
formats of computeStressVector for each element, different call code would be needed in the
EngngModel’s method. Also, when we change way of stresses’ calculation for an existing FE
or when we add a new FE, nothing needs to be changed in the calling method (that of
EngngModel in this example) as long as it inherits the StructuralElement’s method
computeStressVector. This adds to code maintainability tremendously because the programmer
does not have to make changes in all other calling methods too. The whole process is facilitated
by declaring general interfaces by means of abstract methods whose implementation is provided
in subclasses, which represents a prime example of using inheritance and polymorphism in
practice.
9
XXIV. simpozij ‘Teorija i praksa brodogradnje’ SORTA 2020.
15. - 17. listopad 2020., Malinska, Otok Krk, HR
vessels, ro-ro and car carriers, large cruise vessels (L > 150 m), etc. Additionally, FEA is
required in case of novel designs of ship structures or structural elements, for fatigue and
buckling assessment, etc. For these reasons, CSs have come up with a set of criteria for FEAs
of ship structures that we touch on in the sequel, following their description as given in [12].
Figure 6 Structural analysis’ software (MAESTRO in the example from [10]) within the rational ship structural
design
Slika 6 Softver za analizu konstrukcije (MAESTRO u primjeru iz [10]) unutar racionalnog projektiranja
brodske konstrukcije
From CS’s point of view “any recognised software can be used provided that all specifications
on mesh size, element type, boundary conditions, etc. can be achieved with this computer
program” [12]. A FEA software must comprise following FEs: rod (truss) elements, beam
elements, membrane elements and shell elements [12]. CSs requirements on these FEs can be
found in Table 1.
10
24th Symposium on Theory and Practice of Shipbuilding SORTA 2020.
15th – 17th Oct 2020, Malinska, Krk Island, Croatia
Beside FEs, there are requirements on loads and boundary conditions as well. FEA software
must support following load types: point (concentrated), pressure (distributed) and body (e.g.
gravitational and inertial forces) loads. A user must be able to specify three forces (one force in
direction of each axis) and three moments (one moment about each axis) in every grid point
[12]. Furthermore, he must be able to define different load combinations that act simultaneously
on ship’s structure called load cases.
The supported boundary conditions must include fixed (clamped) and pinned ends as well as
combinations of constrained translations and rotations. Special boundary conditions including
rigid links and end-beams should also be available [12].
All element types, reactions in boundary conditions, shear, in-plane, axial and von Mises stress
should be available for analysis’ report [12]. Moreover, a user should have a possibility to see
compliance of analysis’ results with design criteria including plate and stiffened panel buckling
analysis [12].
Based on the foregoing CSs requirements, it is possible to assess OOFEM’s capabilities at time
before any upgrades to its code are made. This is very important, as demonstrated in Chapter 2,
because it determines an amount of work that needs to be invested before software is ready for
use in ship structural analysis. Additional requirements may come from one’s research interests
where FEA software may be only a part of a broader set of tools as described in [3]. However,
we shall make a brief assessment only w.r.t CSs requirements mentioned above.
Figure 7 Structural response of a three-cargo hold FE model of bulk carrier described in [10] from
visualisation software View3D based on analysis’ results imported from FEA software
Slika 7 Odziv konstrukcije MKE modela tri skladišta broda za prijevoz rasutog tereta opisanog u [10] iz
softvera za vizualizaciju View3D prema rezultatima analize uvezenima iz MKE softvera
As explained in [13], regarding boundary conditions and load cases, we have not found any
deficiencies w.r.t CSs requirements. When it comes to loads, OOFEM can model both
concentrated and distributed loads. However, distributed loads are evaluated by means of
numerical integration of the load vector (see more in [14]). In many engineering applications,
distributed loads are modelled by equal distribution to all nodes (“intuitively” as termed in
[14]). In our examples, this is probably not a major difference because CSs usually regard
11
XXIV. simpozij ‘Teorija i praksa brodogradnje’ SORTA 2020.
15. - 17. listopad 2020., Malinska, Otok Krk, HR
distributed loads as equally distributed, but it might be different from something that a user has
got used on. So, we plan to implement such a definition of distributed loads.
Most of the additional work will probably go into extension of OOFEM’s library of FEs because
no satisfactory membrane and plate/shell FE was found in OOFEM. When we started to use
OOFEM, it comprised, as explained in [3], the following 4-node quadrilateral membrane, plate
and shell elements (terminology according to [15]) of interest in the analysis of thin-walled
structures: PlaneStress2d, QdktPlate and MITC4Shell. We conducted a series of simple tests
with these FEs and their properties were found to be unsatisfactory [13]. Thus, our plan is to
implement membrane and plate/shell FEs whose properties are close to properties of similar
FEs in commercial software widely used in ship structural analysis (e.g. Nastran and Ansys).
Furthermore, it is necessary to implement a beam FE based on Euler-Bernoulli beam theory
and to change the way beam FEs are described in OOFEM, namely instead of asking a user to
provide beam’s cross-sectional properties directly (area, moments of inertia, etc.), he will
specify characteristic dimensions of beam’s cross-section while the properties will be calculated
by a software procedure.
Table 1 CSs requirements on FEs used in ship structural analysis (according to [12])
Tablica 1 Zahtjevi klasifikacijskih društava prema konačnim elementima koji se upotrebljavaju u analizi
brodskih konstrukcija (prema [12])
Finite element Characteristics Remarks
1D; axial stiffness; constant
Rod (truss)
cross-section along length
1D; axial, torsional and bi-
directional shear and bending N/A
Beam stiffness; constant cross-
sectional properties along
length
2D; bi-axial and in-plane Inner angles between 45o and 135o;
Membrane
stiffness; constant thickness aspect ratio close to 1 (never to exceed 3
for 4-node and 5 for 8-node FEs); shape
2D; in-plane (membrane) and functions should include “incompatible
Shell out-of-plane (bending) modes”; use of triangular elements
stiffness; constant thickness should be avoided; assessment based on
membrane (in-plane) stresses
5. Conclusion
In this paper we deal with benefits and challenges of open-source software (OSS) from point
of view of ship structural analysis. It is emphasized that OSS is rarely totally free. Activity of
users’ community and software developers associated with an OSS project is of paramount
importance for future work on the software. Some measures that can help in assessing these are
proposed. Moreover, code architecture of prospective OSS is important. In this regard, we take
a closer look on object-oriented (OO) programming paradigm. It is shown that it contributes
greatly to readability and reusability of the code, which enhances software’s extensibility and
maintainability. This is all demonstrated on examples from OOFEM.
OOFEM, OSS for FEA, is described, its fundamental classes and their interactions as well as
its code structure related to classes that describe FEs. At the end, we touch on role and position
of structural analysis within ship structural design process and go through the most important
12
24th Symposium on Theory and Practice of Shipbuilding SORTA 2020.
15th – 17th Oct 2020, Malinska, Krk Island, Croatia
requirements of CSs on FEAs and then use them to assess capabilities of OOFEM at its initial
state, i.e. before any changes are made to the code from our side.
REFERENCES
[1] Hughes OF, Paik JK. Ship Structural Analysis and Design. New Jersey: SNAME; 2010.
[2] Committee IV.2 Design methods. In: Kaminski, ML, Rigo, P, editors. Proceedings of the 20th
International Ship and Offshore Structures Congress (ISSC 2018), Amsterdam: IOS Press, 2018.
[3] Palaversa, M, Prebeg, P, Andric, J. Opportunities of Using Open-Source FEA Software in Ship Structural
Design. In: Bertram, V, editor. 19th Conference on Computer Applications and Information Technology
in the Maritime Industries – COMPIT ’20; Pontignano, Italy, 17.8.-19.8.2020. Hamburg: TUHH; 2020 [in
print]
[4] Chen, G, Xiong, Q, Morris, PJ, Paterson, EG, Sergeev, A, Wang, Y-C. OpenFOAM for Computational
Fluid Dynamics. Notices of the AMS, 2014 Apr; 61(4): 354-63.
[5] Rouson, D, Xia, J, Xu, X. Scientific Software Design: The Object-Oriented Way. New York: Cambridge
University Press; 2011.
[6] Weisfeld, M. The Object-Oriented Thought Process. 4th ed. Boston: Addison-Wesley; 2013.
[7] Patzak, B, Bittnar, Z. Design of object-oriented finite element code. Advances in Engineering Software.
2001; 32: 759-67.
[8] Nguyen, DT. Parallel-Vector Equation Solvers for Finite Element Engineering Applications. New York:
Springer SBM; 2002.
[9] Andric, J, Piric, K, Prebeg, P, Andrisic, J, Dmitrasinovic, A. Structural design and analysis of a large
'open type' livestock carrier. Ships and Offshore Structures, 2018; 13 (S1): 167-81.
[10] Andric, J, Prebeg, P, Andrisic, J, Zanic, V. Structural optimisation of a bulk carrier according to IACS
CSR-BC. Ships and Offshore Structures. 2018; 15(2): 123 – 37.
[11] Common Structural Rules for Bulk Carriers and Oil Tankers. London: IACS; 2018.
[12] DNVGL-CG-0127 Finite element analysis. Hovik: DNVGL; 2015.
[13] Palaversa, M, Prebeg, P, Andrić, J. REMAKE Project Deliverable 2.1 - Definition of Requirements for
OOFEM Upgrade, Zagreb: University of Zagreb, Faculty of Mechanical Engineering and Naval
Architecture; 2019.
[14] MacNeal, RH. Finite Elements: Their Design and Performance. New York: Marcel Dekker; 1994.
[15] Patzak, B. OOFEM Element Library Manual [Internet]. Prague: CTU; 2018 [cited 2019 March]. 62 p.
Available from: http://www.oofem.org/resources/doc/elementlibmanual/elementlibmanual.pdf
13