SOFEA

Matlab object-oriented Finite Element toolkit

and the book:

A Pragmatic Introduction to the
Finite Element Method
for Thermal and Stress Analysis


by Petr Krysl

Rationale ****** Downloads (the latest version 07/03/2010)

site stats visitors.


Rationale

I have been able to obtain considerable boost to my own work from several open source projects over the years (Thank you, guys!), and I also have made the libraries and toolkits that I designed myself available to others. Open source works!


The material on this page is intended to be an educational resource for undergraduate or graduate courses of finite element analysis, for mechanical, chemical, civil, and other engineering students. You will find here a book and an accompanying software toolkit for Matlab. Both are available as open source, with hyperlinked and print-optimized versions of the book, and full source code.


By making both resources available to everyone, I'm hoping to be able to collect feedback and suggestions that will improve the book, and to initiate an exchange of ideas and insights concerning the Matlab toolkit SOFEA.



Both the software and the book are protected by the GNU General Public License.


For the software, any ideas, suggestions, and design insights are welcome. However, I will decide whether I'm going to include any modifications in my version of SOFEA, which is going to be available from this web site. You, on the other hand, have the freedom to work any modifications into your own version of the toolkit. Rationale: The software is aimed at a particular audience, the students of the finite element method. Not all design ideas, enhancements, performance boosts, and so on are suitable for educational software. That said, I will always consider branching off an experimental version of the toolkit if such an idea looks truly promising.

As far as the textbook is concerned: please let me know what you think, your opinions and suggestions are very much appreciated. However, unless I will be comfortable teaching from a textbook that would incorporate these ideas and suggestions, I will not include them in my version of the textbook. I will however post these here (with the author's permission of course) for the benefit of others. As with the software, while complying with the license you are permitted to do whatever you like with the textbook . However, I would request that proper credit be given to those parts of the textbook that have been taken literally or with modifications from my work.

Downloads


Upcoming version

No updates are currently planned, but corrections and improvements will be posted if and when needed.

Version 07/03/2010

The h-adaptive procedure was re-implemented, and is now available for both stress analysis and heat conduction. The @feblock_defor_taut_wire.body_load() method contained an error in the calculation of the Jacobian. Over a dozen new examples of computations, especially adaptive thermal analyses.

Version 03/22/2010

Minor fix of some graphics issues.

Version 03/13/2010

Implementation of simple h- adaptive procedure for 2-D triangulations. At this point it is available only for stress analysis. The toolkit: New class methods: feblock_defor_ss/field_from_integration_points_spr, feblock_defor_ss/error_elementwise to support the h-adaptive analysis. Meshing: targe2_mesher_adapt -- mesh generator adapter to construct graded triangular mesh. Stress 2-D: cookstress_had, circular_hole_had, circular_hole_t6_had, cookstress_had, Floyd_had, shear_wall_had-- examples of h-adaptive analysis. Utilities: simplex_grid_interpolation-- interpolate in a triangulation. isoparamipol1d -- isoparametric interpolation in 1-d.



Version 05/16/2009

The toolkit: Selection of geometric cells: gcell_select now enables the "facing" selection option (select cells that face in a given direction, such as the interior surface of a cylinder or a sphere). Meshing examples: test_Acylinder


Version 05/13/2009

The toolkit: Class gcell_T4 (tetrahedron): added isosurface drawing. feblock/lumped_hrz: a convenience function for lumping element matrices. Additional examples: heat_diffusion/CompBlock, CompBlocktrans, moving_source, pnpDuctNewton, pnpDuctNewton1, pnpDuctNewton1q4, pnpDuctNewtonFull, pnpDuctqNewton1, pnpSquareNewton, pnpSquareNewton1, shocking1, sq1qq, step_heat_flux_demo, t3nafems_demo, t3nafemsc. Additional examples: miscellaneous/circle_areaq, circles, circlesq, ex614, show_derivatives, tc1, tc2. Additional examples: stress/2-D/precho, examples/stress/3-D/comp_plate_sym, examples/stress/3-D/plate_vibration_w_shift, examples/taut_wire/wvib33cg1, examples/taut_wire/wvibTut1, examples/thermo_mechanical/thermstrainbeam, meshing/t4blob. Functions for generating structured graded meshes: meshing/blockx, meshing/blockx1d, meshing/blockx2d. Function for gluing meshes: meshing/merge_nodes.m


Version 04/22/2009

The toolkit: A few additional functions for generating structured graded meshes. Additional examples.


Version 03/13/2009

The toolkit: Corrected the sign in the computation of the flux loads (class feblock_diffusion). Example t3nafems: discovered a problem with the numbering of the equations in this particular example. From an incorrectly plotted result I have also incorrectly concluded in Section 8.2 of the textbook that the convergence was very slow. With the correct numbering the convergence is as expected.


Version 02/13/2009

The toolkit: Additional examples. Minor cleanup (Contents files). The automatic triangulation package now includes an executable compiled for the latest Intel-based MacOSX.


Version 02/09/2009

The toolkit: Additional examples. The automatic triangulation package now includes an executable compiled for the latest MacOSX. The solved exercises: Additional exercises.


Version 01/14/2009

The toolkit: No change. The solved exercises: Additional exercises.


Version 01/05/2009

The toolkit: taut_wire plotting revised to comply with the textbook.


Version 01/03/2009

The toolkit: Updated methods graphic_viewer/@graphic_viewer/camcenter.m, sysmat/@sparse_chol_sysmat/reinitialize.m. New examples: heat_diffusion/Composite_block.m, actuator1h8.m, actuator2.m, concrete_wall.m, concrete_wall_l3.m, layeredSquare.m, pnpSquare.m, pnpSquare1.m, t3nafemsl3.m. taut_wire/w1d.m, w1ssupp.m, wvibRich.m. thermo_mechanical/actuatod1h8.m, actuatod2.m New meshing functions: L2_to_L3.m, t4blockc2.m. New utility functions: left_handed_axes.m, make_patch.m, mlar.m. Minor modifications: graphic_viewer/@graphic_viewer/reset.m, sysmat/@sparse_chol_sysmat/sparse_chol_sysmat.m, sysmat/@sparse_sysmat/assemble.m. Modified examples: taut_wire/w1.m, w2.m, woverspec.m. Corrected: targe2_mesher.m.


Version 12/22/2008

The toolkit: No change. The solved exercises: Updated.


Version 12/23/2008

The toolkit: No change. The solved exercises: Updated.


Version 12/22/2008

The toolkit: No change. The solved exercises: Updated.


Version 12/18/2008

The toolkit: No change. The solved exercises: Updated.


Version 12/17/2008

The toolkit: No change. The solved exercises: Updated.


Version 12/15/2008

The toolkit: No change. The solved exercises: Updated.


Version 10/01/2008

The toolkit: Fixed error introduced in the automatic triangle mesher code. (Note to self: don't touch code that isn't broken.)


Version 08/31/2008

The toolkit: The first version of a function to import an ABAQUS mesh added (Abaqus_mesh_import). The draw method of several geometric-cell classes was improved to treat transparency correctly. A method for computing integrals of fields over manifolds added (measure_field). New examples: boxgirder2f -- two-coordinate analysis of transient heat distribution in a box girder; tuning_fork, tuning_fork_w_shift -- tuning fork vibration analysis.


Version 08/21/2008

The toolkit: The @field/draw documentation was fixed. The @graphic_viewer/draw_polygon method: higher ambient lighting. examples/mesh_gen/test_block: testing all 2-D block mesh generation functions. examples/heat_diffusion/SpacerHeatFlow1D, examples/heat_diffusion/SpacerHeatFlow2D: new examples of axisymmetric analysis. meshing/targe2_mesher_vl: improved interface.


Version 08/05/2008

The toolkit: The object viewer had a serious bug when displaying arrays of sofea objects. This had been repaired, and the object array display was also unified among OBgui and OB. The display of modeling axes was enhanced to provide for a size parameter.


Version 05/31/2008

The toolkit: The system matrix class has been supplemented with an efficiency function to add a vector to the diagonal. The helper function gcell_select() used to search the geometrical cells (finite elements) has been enhanced to select cells that are connected together by "flooding". This is useful for instance to select a piece of the boundary surface. (


Version 05/13/2008

The toolkit: The color mapping class had a bug which caused the colors to become hard to interpret when the map overflowed. The standard CAD colormap (cadcolors ()) has been added.


Version 04/30/2008

The toolkit: The built-in function sphere () was shadowed by a mesh generation example of the same name. The treatment of graphics for the tetrahedron element was fixed so that transparency is handled correctly.


Version 04/25/2008

The toolkit: Additional functions to create tetrahedral meshes of rectangular blocks of different orientation of the tetrahedra; reinitialize() methods for system matrices to enable repeated zeroing out and assembly without re allocation of the system matrix.


Version 04/16/2008

The toolkit: Minor corrections in a few draw() methods, method to extrapolate from quadrature points to the nodes. A new example (NAFEMS LE1).


Version 03/07/2008

The toolkit: Minor corrections.


Version 02/13/2008

The toolkit: Improved sparse-matrix functions: added implementation of the Matlab Backslash operator (for convenience and efficiency); improved and corrected assembly of non-symmetric element contributions; optimized Cholesky factorization sparse-matrix class. Added mesh renumbering (profile -- reverse Cuthill-McKee -- and Cholesky -- Symmetric approximate minimum degree permutation -- optimization) functions: check out examples/stress/3-D/Rod_cable_analogy_big.m.


My apologies. The version of the archives posted yesterday and the day before was incorrectly formatted (a CVS issue). Please download them again if you're having trouble.


Version 12/31/2007

The book is available in bookstores in hardback and paperback versions. Check it out at Amazon (Amazon.com link).

The toolkit: A number of additional and improved meshing functions. Alternative sparse-matrix class for environments with fragmented memory (sparse_separow_sysmat).



Version 09/29/2007

The book is available in bookstores in hardback and softback versions. Check it out at Amazon (Amazon.com link).

The toolkit: Very minor fixes to bring it up to date for Matlab R2007b. A number of additional and improved meshing functions. Class for a general anisotropic material. Alternative sparse-matrix class for environments with fragmented memory.



Version 04/13/2007

The book is available in bookstores in hardback and softback versions. Check it out at Amazon(Amazon.com link).

The toolkit: Very minor fixes to bring it up to date for Matlab R2007a.



Version 01/06/2007

The book is in press, and will be available probably in April 2007 (Amazon.com link).

The toolkit: Documentation of the toolkit is completed and fleshed out; the code is consistent with the printed version of the book.



Version 01/05/2007

The book is in press, and will be available probably in April 2007 (Amazon.com link).

The toolkit: A few minor errors have been corrected. Documentation of the toolkit is practically in place, and the code is believed to be consistent with the printed version of the book.



Version 12/31/2006

The book is in press, and will be available probably in April 2007 (Amazon.com link).

The toolkit: Many minor things cleaned up and the code is believed to be consistent with the printed version of the book.



Version 11/10/2006

The book is in press, and will be available probably in April 2007 (Amazon.com link).

The toolkit: Many minor things cleaned up and the code is believed to be consistent with the printed version of the book (one more check will be performed in December).



Version 03/03/2006

The book: no change.

The toolkit: Many additional examples, a few corrections of errors or inconsistencies.



Version 01/05/2006

The book: now includes a chapter on error control, a chapter on stress computation, and a chapter on convergence.


The toolkit: The heat diffusion and stress analysis are now operational for linear and quadratic elements. Selective reduced integration is sketched out.



Version 12/21/2005

The book: Work continuing on error control. The third part on stress analysis mostly usable, with just a few holes to fill in before the textbook will be used in the upcoming quarter.


The toolkit: The code for the geometric cells has been re-factored to unify treatment of volume, surface, and curve integrations via operations on manifolds. The stress analysis for 3-D, 2-D including plane strain, plane stress, and axially symmetric analysis is included in this version, with a few examples. Treatment of materials for reduced -dimension models with a property class and a separate material class. Includes a few simple thermomechanical analyses.



Version 12/05/2005

The book: The first part now incorporates a new section on dynamics, both free vibration and transient dynamics. Work has begun on a the chapter on error control. The third part on stress analysis sketched out, including the Galerkin formulation and introduction to the Matlab code for stress analysis. A few examples of free vibration with tetrahedra, including material models for composite materials.


The toolkit: The preliminary version of the stress analysis part is included in this version, with a few examples. Includes a simple transient thermomechanical analysis. Added orthotropic and transversely isotropic materials.



Version 11/20/2005

The book: The first part is usable, with a new chapter on boundary conditions. The second part, thermal analysis, has been supplemented with a discussion of the boundary conditions. Work has begun on a the chapter on error control. The third part on stress analysis has been started, with the formulation of the PDE model almost complete.


The toolkit: Fixed a number of inconsistencies. The heat diffusion code is in place. The preliminary version of the stress analysis part is included in this version, with a few examples. Includes a simple transient thermomechanical analysis.



Version 11/05/2005

The book: The first part is usable. The second part, thermal analysis has been fleshed out with the description of quadratic elements, integration on manifolds, and other miscellanea. Work has begun on a the chapter on error control.


The toolkit: The heat diffusion code is in place, including three-dimensional problems. Additional elements: four-node quadrilateral, eight-node hexahedron. The preliminary version of the stress analysis part is included in this version, with a few examples.



Version 10/29/2005

The book: The first part is usable. The second part, thermal analysis has been fleshed out with the description of quadratic elements, integration on manifolds, and other miscellanea.


The toolkit: The heat diffusion code is in place, the wire vibration needs a few more methods. The code for treatment of the geometric cells as representations of manifolds, from zero-dimensional (point), to three-dimensional (solid) is now factored into appropriate classes and the manifolds are treated uniformly. Quadratic triangles and quadratic line elements are available. The stress analysis part is not included in this version.



Version 10/25/2005

The book: The first part is usable. The second part, thermal analysis, is at the stage where elements other than the triangle are introduced. This will take a few days to fill in. The third part, stress analysis, has not been started yet.


The toolkit: The heat diffusion code is all in place, the wire vibration needs a few more methods. The stress analysis part is not included in this version as it is in a refactoring stage (SOFEA is a redesign of a prior toolkit; most of the design decisions in the old toolkit seem to be acceptable, so the planned changes are relatively few at this point).