This is a workbench for FreeCAD to support design and structural analysis of thin composite laminate structures.
This is very much a work in progress. A lot is subject to change or refactoring. Lots of code needs unit testing and handling input errors.
This requires a modified version of FreeCAD, mainly to support FEM analysis. https://github.com/jwharington/FreeCAD/tree/fem-orthotropic
- Element for fibre composite
- Classical theory for fibre reinforced material properties
- Various material fabrics (uni, bidirectional etc)
- Element for homogeneous (one part) core material
- May be orthotropic or isotropic
- Element for homogeneous (single part) layered composites
- Classical Laminate Theory merging of laminates
- Symmetric (odd, even) and non-symmetric layups
- Elements for fibre reinforced composites
- Construction of shells in laminate materials
- LCS varies across the laminate shell by draping material
- Visualisation of fibre orientation across the part
- Visualisation of fabric draping strains across the part
- Tool for creating seam/overlap/transition regions
- Tool for constructing stiffeners with custom profiles
- Tool for aligning zero fibres
- Tool for managing fibre orientations across cut lines like seams
- Tool for managing fibre orientations around edges with matching fibre orientation
- Construction of aligned texture plans for layup
- Some preliminary work on constructing part lines/planes
- Some preliminary work on constructing moulds
- Tool for cutting darts and creating seam/overlap/transition regions
- Analysis tools such as average fibre length, % of plies in each orientation
- Local coordinate system with orthotropic materials in FreeCAD FEM solver
- Composite material support in FreeCAD FEM using Calculix solver
- Computation of FEM stress exposure factor calculations including stress/strain/Tsai-hill
- Refactoring to allow use of lower-level code without FeaturePython objects/gui
- Design rules
- Hybrid (2 fibre material) fabrics
- Failure modes implement as plug in to FEM
- CompositeShell should have code sensitive to whether laminate is Fibre
- Seam detection and splitting when unwrap fails or high strain
- Mesh_PolyCut
- Scale expand drape if positive linear strain .scale
- TexturePlan
- add easement
- add overlaps at darts?
Terminology:
- splice
- butt joint
- joint
https://compositematerialshub.com/bonded-joints/
use CreateLabels.py from FEM for displaying layers?
The workbench now includes a lightweight compositeexamples framework for
scriptable, reproducible model build examples.
Current examples include:
ud_plate_basicquasi_iso_laminate_platetubular_shell(full 360° shell midsurface)cylindrical_panel_segment(open shell segment)conical_panel_segment(open shell segment, gentle taper)
- Open the Composites workbench.
- Use Composites → Run Composite Example (or the matching toolbar button).
- The command runs the default example (
ud_plate_basic) via:runner.run("ud_plate_basic", run_solver=False)
This intentionally builds model state without requiring a hard solver run.
Inside Python (or from FreeCADCmd -c style scripting), call:
from freecad.Composites.compositeexamples import runner
print(runner.list_examples())
result = runner.run("ud_plate_basic", run_solver=False)
print(result)run_solver defaults to False and examples are expected to keep solver steps
optional.
For shell-segment examples (tubular_shell, cylindrical_panel_segment,
conical_panel_segment), setting run_solver=True now attempts a full FEM job:
analysis + solver + mesh generation + constraints + CalculiX run.
After solve, shell examples also attempt a failure-criteria postprocess using
Composites Tsai-Wu and Hashin evaluators and return a failure_report
(max index + hotspot elements) when stress components are available.
- Create a module in
freecad/Composites/compositeexamples/examples/, for examplemy_example.py. - Implement:
def build(doc=None, run_solver=False):
# Build model entities, optionally using doc.
# Keep run_solver optional.
return {"doc": doc, "laminate": some_laminate}- Register it in
freecad/Composites/compositeexamples/registry.pyby adding anEXAMPLESentry:
"my_example": {
"module": ".examples.my_example",
"name": "My example",
}- Verify with unit/smoke tests under
freecad/Composites/compositestests/test_compositeexamples.py.
Most tests under freecad/Composites/compositestests use mocks and can run
without a FreeCAD runtime. For integration testing inside a real FreeCAD
process, run:
~/opt/FreeCAD-build/bin/FreeCADCmd -P /home/jmw/opt/FreeCAD-CompositesWB \
freecad/Composites/compositestests/run_freecad_integration_tests.pyThis runs test_integration_freecad.py and exits non-zero if a test fails.