The Package Architecture

LamAna is a package of modules the originally stemmed from a simple legacy script (circa 2014). It has since been updated and abstracted to analyze more general problems related to laminates.

This repository is designed to accept various geometry constructs given a specific, customized model that is based on classical laminate theory. The package architecture is diagramed below.

API Diagram

API Diagram

As shown, each diamond represents a module. The diagram illustrates the relationships in passing data-filled LaminateModels and FeatureInput objects between modules. The user-related areas are highlighted blue. The package is most extensible in these blue areas.

Package Module Summary

This section details some important modules critical to LamAna’s operation. The following table summarizes the core and feature modules in this package, what they intend to do and some important objects that result. Objects that get passed between modules are italicized. The Auxillary (or Utility) modules house support code that will not be discussed.

Module Classifier Purpose Product
input_ Backend Backend code for processing user inputs for all feature modules. User Input object i.e. Geometry
distrubtions Feature Analyze stress distributions for different geometries. FeatureInput object, Case, Cases
ratios Feature Thickness ratio analyses for optimizing stress-geomtry design. FeatureInput object
predictions Feature Failure predictions using experimental and laminate theory data. FeatureInput object
constructs Backend Code for building Laminate objects. LaminateModel object
theories Backend Code for selecting Model objects Model object
<models> Extension Directory of user-defined, custom LT models Model objects
output_ Backend Code for several plotting objects, exporting and saving Output object e.g. plots, xls, figures

The components of the lamana project can thus be distinguished as three types:

  • Frontend: user-interacted, feature modules of particular interest that utilize laminate theory models
  • Extension: directories/modules extending capabilities of the repository, e.g. models directory containing user defined laminate theories (Classical_LT, Wilson_LT).
  • Backend: remaining Core modules, input_, constructs_, theories_, output_; workhorse factories of LaminateModel objects.

Note

This project is forked from legacy code: Script - Laminate_Stress_Constant_Thickness_3a3.ipynb.

Note

Only the distributions Feature module is implementated as of LamAna 0.4.10. ratios and predictions will be added in future releases.

Intermodular Products

The key inter-modular products will be mentioned briefly. These objects have information that is exchanged between package modules. These objects are illustrated as circles in the API Diagram.

FeatureInput

A FeatureInput is a Python dictionary that contains information from both a Feature module and user-information processed by the input_ module. Here is a sample dict; the associated items are tabulated:

FeatureInput = {
    'Geometry': Geometry,                           # defined in Case
    'Parameters': load_params,
    'Properties': mat_props,
    'Materials': materials,                         # set material order
    'Model': model,
    'Globals': None,                                # defined in models
}
Key Value Description
'Geometry' Geometry object a single tuple of Geometry thicknesses
'Parameters' load_params loading parameters
'Properties' mat_props material properties, e.g. modulus, Poisson’s ratio
'Materials' materials index ordered list of materials from DataFrame index
'Model' model str selected string of model name
'Globals' None a placeholder for future ubiquitous model variables

Note

PEP8 discusses use of trailing underscore to avoid conflicts with Python keywords.

LaminateModel

A LaminateModel is a pandas DataFrame object that combines data processed by the constructs.Laminate and theories.<model> classes. Details of this object will be discussed further in the constructs section.