Download elsA Design and Implementation Tutorial

Transcript
Ref.: /ELSA/MDEV-06001
Version.Edition : 1.0
Date : Jan 10, 2006
Page :
22 / 75
elsA
Design and Implementation Tutorial
5.
KERNEL DESIGN
5.1
Classification and Design organization
DSNA
CFD concepts can be classified as: geometrical, topological, numerical and physical concepts. In order to solve a CFD
problem, we have defined a limited number of basic classes responsible of the following actions:
1. to take into account the fluid physical properties in the flow;
2. to build and control the numerical space region where the system of equations is solved;
3. to build the system of equations: compute the terms arising from the spatial discretization (flux, source terms);
controls the application of the boundary conditions;
4. to control the time evolution of the solution.
So, the kernel has been designed as a set of consistent modules (or components). A module is responsible for a set
of well-defined functionalities. Ideally, developers should be able to work inside a module, without having to know the
implementation details of any other modules. Achieving a good decomposition is very important to improve ease of
development and maintenance.
Moreover, this OO model has been split into sub-models with the aim to keep dependencies as local as possible. These
modules are organized into layers in such a way that each layer should only affect the layers above. The goal of this
organization is to achieve mono-directional relationships. The advantage is then that the maintenance becomes much
easier, since one layer’s interface affects only the upper layers. Avoiding cyclic dependency greatly simplify test policy.
5.1.1
Naming convention
Each module is identified by a key of 3 to 5 letters, the first one being capitalized. Inside each module, each class name is
then prefixed by the key of the module it belongs to. Example: TurKL belongs to the Tur module.
5.2
Overview of the layers
elsA kernel includes about 400 classes grouped in 26 modules specialized for a given CFD task. These modules are further
organized in 6 layers:
• Base;
• Geometry;
• Physical model;
• Space Discretization;
• Solver;
• Factory (top level).