• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

doc/H03-May-2022-1,077886

lp/H28-Dec-2020-1,5701,333

reference/H03-May-2022-

test/H28-Dec-2020-1,4841,293

tools/H28-Dec-2020-153104

.gitignoreH A D28-Dec-2020136 1312

MakefileH A D28-Dec-20201.3 KiB5026

README.rstH A D28-Dec-20204.4 KiB13489

console.pyH A D28-Dec-20204.1 KiB12198

gui.pyH A D28-Dec-20206.7 KiB213175

pylama.iniH A D28-Dec-202092 43

setup.pyH A D03-May-20223.6 KiB12095

README.rst

1=====================================================
2Calculating elastic properties of composite laminates
3=====================================================
4
5The purpose of this program is to calculate some properties of
6fiber-reinforced composite laminates. It calculates
7- engineering properties like Ex, Ey, Gxy
8- thermal properties CTE_x and CTE_y
9- physical properties like density and laminate thickness
10- stiffness and compliance matrices (ABD and abd)
11
12Although these properties are not very difficult to calculate, (the relevant
13equations and formulas can be readily found in the available composite
14literature) the calculation is time-consuming and error-prone when done by
15hand.
16
17As of version 2020-12-22. the internals have been updated to use
18
19* Halpin-Tsai approximation for E2 and to help calculate Ez,
20* periodic micromechanics model for single plies and
21* first order shear deformation theory for laminates.
22
23This helps yield better data for FEA.
24
25
26This program can _not_ calculate the strength of composite laminates;
27because there are many different failure modes, strengths of composite
28laminates cannot readily be calculated from the strengths of the separate
29materials that form the laminate. These strengths have to be determined
30from tests.
31
32The program has options for producing LaTeX and HTML output in addition to
33plain text output.
34
35The program and its file format are documented by a manual. This can be found
36in the ``doc`` subdirectory.
37
38There are basically two versions of this program; a console version primarily
39meant for POSIX operating systems and a GUI version primarily meant for
40ms-windows.
41
42You can try both versions without installing them first, with the following
43invocations in a shell from the root directory of the repository.
44
45Use ``python console -h`` for the console version, and ``python gui`` for the
46GUI version.
47
48
49Of note
50-------
51
52As of version 3 (2017-02-25), support for old style fiber properties (which
53also specified properties in the radial direction of the fiber) has been
54removed from the code.
55In the ``tools`` subdirectory of the source distribution a script called
56``convert-lamprop.py`` has been provided to convert old-style lamprop files to
57the new format.
58
59On 2020-10-03, lamprop has switched to using the release date as the version.
60So 4.2 became 2020-03-13.
61
62The installed scripts are an archive of compiled Python bytecode.
63This means that you have to re-install lamprop after updating Python to a new
64version.
65
66
67Requirements
68------------
69
70This program requires at least Python 3.6. It is *not* compatible with Python 2!
71It has no library requirments outside of the Python standard library.
72This version was developed and tested using Python 3.7 and 3.9.
73
74
75Developers
76++++++++++
77
78You will need py.test_ to run the provided tests. Code checks are done using
79pylama_. Both should be invoked from the root directory of the repository.
80
81.. _py.test: https://docs.pytest.org/
82.. _pylama: http://pylama.readthedocs.io/en/latest/
83
84
85Installation
86------------
87
88To install it for the local user, run::
89
90    python setup.py install
91
92This will install it in the user path for Python scripts.
93For POSIX operating systems this is ususally ``~/.local/bin``.
94For ms-windows this is the ``Scripts`` directory of your Python installation
95or another local directory.
96Make sure that this directory is in your ``$PATH`` environment variable.
97
98On a UNIX-like operating system, you can run ``make install`` as root instead
99for a system-wide install. This will additionally install the manual.
100By default, this install is done in the ``/usr/local/`` tree.
101Change the PREFIX variable in the Makefile in case you want to install
102somewhere else.
103
104
105Vim
106+++
107
108In the ``tools`` subdirectory you will find a vim_ syntax file for lamprop
109files. If you want to use it, copy ``lamprop.vim`` to ``~/.vim/syntax``, and
110set the filetype of your lamprop files to ``lamprop``.
111
112.. _vim: http://www.vim.org
113
114You can set the filetype by adding a modeline to your lamprop files:
115
116.. code-block:: vim
117
118    vim:ft=lamprop
119
120This requires that modeline support is enabled. You should have the following
121line in your ``vimrc``:
122
123.. code-block:: vim
124
125    set modeline
126
127Alternatively, if you use the ``.lam`` extension for your lamprop files you
128can use an autocommand in your ``vimrc``;
129
130.. code-block:: vim
131
132    autocmd BufNewFile,BufRead *.lam set filetype=lamprop
133
134