Return to
the
examples
Classical
Laminate Analysis in Excel using FeResPost COM Component
Purpose
of the excel workbook
The excel
workbook discussed here illustrates what is
possible to do with excel, VBA and FeResPost COM component. In this
case one is
particularly interested in classical laminate analysis capabilities of
FeResPost. In this page, one presents the excel workbook usage, but not
the
programming of VBA code. Information on this VBA code can be found
in FeResPost User Manual, and of course, you can read the VBA code with
excel
VBA editor.
The
workbook we present here is provided with
FeResPost COM example in "COMEX/EX06/LaminateAnalysis.xls" excel
file. To run this example, you need to register properly the
corresponding
version of FeResPost COM component. The way to do it is explained in FeResPost
Reference Manual.
Note that
the excel workbook we describe here is used
to perform Classical Laminate Analysis (CLA) with FeResPost in excel,
without
interaction with Nastran or Samcef finite element results
post-processing. It
allows though to import CLA entities from Nastran and Samcef FE models.
But the
reader should be aware that FeResPost's CLA classes are more powerful
than what
is presented here. In particular, they can interact with other
FeResPost
classes and be used in FEM results post-processing by for example:
- Calculating
composite failure criteria from ply stresses or strains extracted from
Nastran OP2, XDB or HDF5 files, or from Samcef DES&FAC files.
- Calculating
ply stresses and strains from shell forces, shell curvatures, shell
moments... also extracted from Nastran OP2, XDB or HDF5 files, or from Samcef
DES&FAC files.
(This
makes the CLA classes of FeResPost a very powerful tool for composite
assessment in structure.)
Excel
workbook
At the moment, we just present different worksheets that can be used to
perform
classical laminate analysis (CLA) calculations. (You can access the VBA
code of
the application via excel VBA editor, but we do not explain here how
this code
works.)
"ClaDb" worksheet
The "ClaDb" worksheet should be considered as the main worksheet of
the excel workbook. Among other things, it allows you to:
- Import and
export CLA entities (materials, laminates or loads):
- The difference
between "importation" and "reading" is that reading is meant for an
entire CLA database and that the previously stored CLA entities are
removed before reading the new ones. On the other hand, the importation
adds or replaces entities to the previous database.
- The
importation can be done for an entire database, or only for materials,
laminates or laminate loads.
- One can import
CLA entities from a FeResPost neutral data file (NDF), from an ESAComp
database, from a Nastran model or from a Samcef model. The Combo box in
the spreadsheet allows the specification of the type of file one wants
to read or import.
- The
exportation of stored database can be done only in NDF file. This is
done by clicking on "Save FeResPost NDF file" button.
- The list of
available CLA entities (materials, laminates and laminate loads) is
visible in the "ClaDb" worksheet.
- When you open
the workbook, the list of entities is generally not empty:
- This is
because a hidden spreadsheet called "NeutralLines" stores a database in
NDF format, and the content of this hidden spreadsheet is read
automatically when the workbook is open. (The spreadsheet can be made
visible with excel VBA editor.)
- You can update
the content of this hidden spreadsheet by clicking on
"SaveDbToNeutralLines" button.
- On the other
hand, by clicking on "RetrieveDbFromNeutralLines" button, you retrieve
the previously stored composite database.
- When closing
the workbook, excel proposes you:
- To export the
current composite database in an external NDF file.
- To save the
current composite database in the "NeutralLines" workbook.
- To save the
current workbook.
If you want to retrieve the current
composite database next time you open the workbook, you have to make
sure that
the two previous operations have been done. (Be careful with this
because it is
a common mistake to forget one of the operations.)
- You can remove
entities stored in the database by selecting the corresponding range in
the list of materials, laminates or loads and clicking on "Delete
Selected Entities" button.
"MatEdit" worksheet
The "MatEdit" worksheet allows you to create or modify materials
(ClaMat objects) in the composite database:
- The "Combo
box" allows you to select a material existing in the composite database
for examination or modification.
- The "Insert in
DataBase" is used to insert the current material in the composite
database. The inserted material is made active in the Combo box. If a
material with the same ID already exists in the database, it is
replaced by the new one.
The edition of material properties is done by filling the lower
tables in
the worksheet:
- "Material ID"
table allows to define the ID (string and/or integer identification)
and the type of material (isotropic, anisotropic...).
- The columns
"Moduli, CTEs, CMEs..." are meant to contain information related to the
material stiffnesses, CTE, CME, thermal or moisture conductivity.
- The
"Allowables" columns are devoted to the definition of allowables used
in the calculation of composite failure criteria.
- The "Units"
columns specify the system of units associated to the material and its
data.
Note that the user is entirely responsible for the data inserted in the
different tables. Data that can not be interpreted by FeResPost are
simply
ignored when the material is inserted in the composite database. User
is
referred to the description of "ClaMat" class and theoretical
background in FeResPost
User Manual to identify which data must be defined.
"LamEdit" worksheet
The "LamEdit" worksheet is used to create new laminates (ClaLam
objects) or modify existing ones. The worksheet has three form controls:
- The "Existing
Laminate Selector" Combo box is used to select a laminate from the
composite database in order to modify it.
- The "Existing
Material Search" Combo box is used to find materials existing in the
composite database. This Combo box has been added to facilitate the
identification of materials already defined in the database.
- The "Insert in
DataBase" button inserts the defined laminate in the composite
database. If a laminate with the same ID already exists in the
database, it is replaced by the new one. The inserted laminate is made
the active one in the "Existing Laminate Selector" Combo box.
The data defining the laminate must be introduced in the tables below
the
controls:
- When a new
laminate is defined, it must identified with an integer/string ID.
- The reference
temperature (refT) and moisture content (refH) can be defined.
These values correspond to the temperature or moisture content at which
the laminate is supposed stress free. (The use of temperature or
moisture in laminate load response is optional.)
- The biggest
table contains the definition of laminate layup. Each ply is
characterized by:
- A ply ID
(integer and/or string).
- A material
identified by its integer and/or string ID.
- A thickness.
- An angle
defining the orientation of the ply with respect laminate axes.
- An
interlaminate shear stress (ILSS) allowable.
- One table is
devoted to the definition of laminate allowables. It is the same table
as for the material allowables. These allowables must be defined if one
wants to calculate laminate failure criteria using laminate allowables
instead of ply material allowables. (This is not very common though,
except for strain cut-off or combined strain criteria for which the
allowable is also often related to laminate thickness and not only to
ply materials.) User is referred to the description of "ClaLam" class
and theoretical background in >FeResPost
Reference Manual to identify which data must be defined.
- As for
material definition, you can define the system of units in which
laminate definition quantities are expressed.
"LoadEdit" worksheet
The composite database also allows to defined and store "ClaLoad"
objects. The "LoadEdit" worksheet allows to define or modify these
"ClaLoad" objects. The worksheet has two form controls:
- The "Existing
Load Selector" Combo box allows to select a ClaLoad object already
defined in the composite database in order to modify it.
- The "Insert in
DataBase" button inserts the defined load in the composite database. If
a load with the same ID already exists in the database, it is replaced
by the new one. The inserted load is made the active one in the
«Existing Load Selector" Combo box.
The following data allow the definition of load object:
- A load ID
(integer and/or string) must be associated to the ClaLoad object.
- The in-plane
force or strain components are defined by three real values.
- The bending
moments or curvature components are defined by three real values.
- The
out-of-plane shear force or strain components are defined by two real
values.
- Temperature
and/or moisture content can also be considered in the definition of
laminate loading.
- Finally, as
for the material or laminate definition a system of units can be
associated to the ClaLoad object.
For all the mechanical components of laminate loading, one can choose
to define
the component as strain or curvature, or as force or moment. This is
the reason
why a Combo box is associated to each component. The Combo box has two
values:
"SC" (strain/curvature) or "FM" (force/moment).
"DbUnitsEdit" worksheet
This worksheet allows you to modify the system of units associated to
entities
stored in the composite database. In the spreadsheet, one finds the
following
elements:
- The "Current
Db Units" table gives the system of units associated to the current
composite database. Note that this system of units is associated to the
database, but not to all the entities stored in the database.
- The "New
Units" contains the definition of a new system of units one wishes to
associate to the composite database, or to entities stored in the
database.
- Several Combo
boxes allow to select the new units. This facilitates the choice of a
valid unit for the different physical quantities.
- Several
buttons allow to modify the composite database using the new units:
- The
"SetDbUnits" button allows to associate a new unit system to the
composite database. This button does not modify the units of entities
stored in the database.
- The
"SetUnitsAllEntities" and "ChangeUnitsAllEntities" allow to modify the
systems of units associated to all the entities stored in the database
(materials, laminates and loads).
- Then three
"SetUnits*" and "ChangeUnits*" allow to modify the units of materials,
laminates or loads separately.
Note the difference between the "setting" and "changing" of
units:
- When units are
"set", the numerical values of corresponding entities are not modified.
This means that one really changes the physical quantities.
- On the other
hand, when units are "changed", the numerical values associated to
these units are converted. This means that the physical object
remains the same.
"MatProperties" worksheet
The "MatProperties" worksheet allows you to examine material
properties:
- A Combo box
allows to select a material defined in the database.
- A Scroll bar
allows you to select an angle corresponding to the direction wrt which
the different properties will be displayed.
Then, the following properties are displayed:
- The system of
units associated to the material.
- The stiffness
and compliance matrices.
- The CTE and
CME properties.
- The thermal
and moisture conductivity matrices.
"LamProperties" worksheet
The "LamProperties" worksheet allows you to examine material
properties:
- A Combo box
allows to select a laminate defined in the database.
- A Scroll bar
allows you to select an angle corresponding to the direction wrt which
the different properties will be displayed.
Then, the following properties are displayed:
- The system of
units associated to the laminate.
- The stiffness
and compliance matrices ABBD and abbd.
- The
out-of-plane shear stiffness and compliance matrices G and g.
- The laminate
thickness, surfacic mass and average densities.
- The CTE and
CME properties.
- The thermal
and moisture conductivities.
- A list of
engineering constants.
"LamLoadResponse_A"
worksheet
The "LamLoadResponse_A" worksheet allows the calculation of laminate
load response and ply failure indices for a specified loading. The
loading is
selected among the loads stored in the composite database.
The calculation data are defined as follows:
- A Combo box
allows to select a laminate stored in the composite database.
- A Combo box
allows to select a load stored in the composite database.
- A Scroll bar
allows to specify an angle corresponding to the orientation of the
loading wrt the laminate.
- Three Combo
boxes allow to specify whether ply results are estimated at lower face,
mid-thickness and/or upper face of each ply.
- A Combo box
allows to specify whether ply stress and strain results are given in
ply axes, or in a coordinate system defined wrt laminate axes.
- A Scroll
bar allows to define an angle wrt laminate axes. This angle corresponds
to the coordinate system in which laminate stresses-strains are
expressed, and ply stresses and strains if required wrt laminate axes.
- The
spreadsheet allows to calculation of up to five failure criteria. For
each criterion, three Combo boxes define the calculations data:
- The selected
criterion.
- One can
require failure indices, reserve factors or an equivalent scalar stress
(when applicable).
- One can also
specify whether the calculation of failure criterion is done with
laminate or material allowables.
- For each
criterion, a cell contains the safety factor used in the calculation of
reserve factor.
The following results are calculated:
- The laminate
in-plane and bending or out-of-plane shear stress-strain state.
- Ply stresses,
strains and failure indices.
"LamLoadResponse_B" worksheet
This worksheet performs the same calculations as "LamLoadResponse_A",
but the loading applied to the laminate id directly defined in the
spreadsheet.
One no longer selects a loading defined in the composite database.
The definition of loading is done by specifying the different
components by
filling the corresponding cells. Combo boxes allow to define whether
the
component is defined as shell force or moments, or as average strain or
curvature. For the other data, please go to the description of "LamLoadResponse_A" worksheet
for
more information.
"LamMinMaxCalcArray" worksheet
In "LamMinMaxCalcArray" worksheet, one calculates critical (i.e. the
value for most critical ply) failure indices, reserve factors or
equivalent
stresses, for several composite failure criteria and several load cases.
The calculation data are defined as follows:
- A Combo box
allows to select a laminate stored in the composite database.
- A Scroll bar
allows to specify an angle corresponding to the orientation of the
loading wrt the laminate.
- Three Combo
boxes allow to specify whether ply results are estimated at lower face,
mid-thickness and/or upper face of each ply.
- The
spreadsheet allows to calculation of up to five failure criteria. For
each criterion, three Combo boxes define the calculations data:
- The selected
criterion.
- One can
require failure indices, reserve factors or an equivalent scalar stress
(when applicable).
- One can also
specify whether the calculation of failure criterion is done with
laminate or material allowables.
- For each
criterion, a cell contains the safety factor used in the calculation of
reserve factor.
- A "MIN" or
"MAX" value that specifies whether one wishes the most critical or less
critical criterion.
(In the spreadsheet, that calculates
the most critical ply, the "MIN/MAX" value is calculated by a formula
that depends on the type of result that is calculated. Its result is
"MAX" for equivalent stress, and "MIN" otherwise.)
The calculation is done by calling "calcPliesMinMaxCriterionArray"
that returns a matrix that performs the array calculation by a single
function
call. Note that a "LamMinMaxCalcArray" scalar version of the
spreadsheet
exists. In that version, each calculated value is obtained by a
separate call
to "calcPliesMinMaxCriterionArray" VBA function.
References
More information on this example, and the manual
explaining the functions used in this example are given in FeResPost
Reference Manual.