Onboarding FEM Devs: Difference between revisions

From FreeCAD Documentation
No edit summary
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
<translate>

<!--T:1-->
{{TOCright}}
{{TOCright}}


== Description ==
== Description == <!--T:2-->


<!--T:3-->
This page will orient new developers on how to setup their development environments in order to hack on the FEM workbench.
This page will orient new developers on how to setup their development environments in order to hack on the FEM workbench.


== Setting up a Dev Environment ==
== Setting up a Dev Environment == <!--T:4-->


<!--T:5-->
TBD
TBD


=== Prerequisites ===
=== Prerequisites === <!--T:6-->


<!--T:7-->
* Netgen
* Netgen
*


=== Recommended ===
=== Recommended === <!--T:8-->


<!--T:9-->
* Paraview
* Paraview


=== Compiling via Source ===
=== Compiling via Source === <!--T:10-->


<!--T:11-->
TBD
TBD


=== Compiling via Docker ===
=== Compiling via Docker === <!--T:12-->


<!--T:13-->
TBD
TBD


== Source Code Management ==
== Source Code Management == <!--T:14-->


<!--T:15-->
Keeping FreeCAD up-to-date is documented in [[Source code management]] page. Along with useful {{incode|git}} tips.
Keeping FreeCAD up-to-date is documented in [[Source_code_management|Source code management]] page. Along with useful {{incode|git}} tips.


== FEM Code Infrastructure ==
== FEM Code Infrastructure == <!--T:16-->


<!--T:17-->
The FEM code lives in {{incode|src/Mod/Fem}}
The FEM code lives in {{incode|src/Mod/Fem}}


<!--T:18-->
* {{incode|App/}} <small>console-mode application, defines basic structures and base classes for document objects, that are used by modules to build their own.</small>
* {{incode|App/}} <small>console-mode application, defines basic structures and base classes for document objects, that are used by modules to build their own.</small>
* {{incode|Gui/}} <small>GUI-mode application, defines the [[3D view]], tools/functions used by workbench to interact with UI and 3D view, defines base classes for [[view provider|view providers]].</small>
* {{incode|Gui/}} <small>GUI-mode application, defines the [[3D_view|3D view]], tools/functions used by workbench to interact with UI and 3D view, defines base classes for [[Viewprovider|view providers]].</small>
* {{incode|femcommands/}}
* {{incode|femcommands/}}
* {{incode|fem.dox}}
* {{incode|fem.dox}}
Line 56: Line 68:
* {{incode|TestFemGui.py}}
* {{incode|TestFemGui.py}}


=== Coding Conventions ===
=== Coding Conventions === <!--T:19-->


<!--T:20-->
Please see [https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Fem/coding_conventions.md coding_conventions.md] file on the FreeCAD repository.
Please see [https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Fem/coding_conventions.md coding_conventions.md] file on the FreeCAD repository.


== Adding New FEM Solvers ==
== Adding New FEM Solvers == <!--T:21-->


<!--T:22-->
A new FEM solver requires the following:
A new FEM solver requires the following:


<!--T:23-->
* Mesh exporter
* Mesh exporter
* Results importer
* Results importer
Line 73: Line 88:
* Having one or two beers
* Having one or two beers


<!--T:24-->
See also:
See also:
* [[Add FEM Solver Tutorial]]
* [[Sandbox:Add_FEM_Solver_Tutorial|Add FEM Solver Tutorial]]
* [[Extend FEM Module]] page
* [[Extend_FEM_Module|Extend FEM Module]]
* The implementation efforts of the [https://github.com/berndhahnebach/FreeCAD_bhb/commits/femoofem oofem] solver
* The implementation efforts of the [https://github.com/berndhahnebach/FreeCAD_bhb/commits/femoofem oofem] solver
* The implementation efforts of the [https://github.com/FreeCAD/FreeCAD/compare/a03eb6b9625ba...dfc01ec949525 myStran] solver
* The implementation efforts of the [https://github.com/FreeCAD/FreeCAD/compare/a03eb6b9625ba...dfc01ec949525 myStran] solver


== Writing Unit Tests ==
== Writing Unit Tests == <!--T:25-->


<!--T:26-->
TBD
TBD


== Informative ==
== Informative == <!--T:27-->


<!--T:28-->
* [[Wrapping a Cplusplus class in Python]]
* [[Wrapping_a_Cplusplus_class_in_Python|Wrapping a Cplusplus class in Python]]
* [[Add FEM Equation Tutorial]]
* [[Add A Button In FEM Toolbar Tutorial]]
* [[Add_FEM_Equation_Tutorial|Add FEM Equation Tutorial]]
* [[Add_Button_to_FEM_Toolbar_Tutorial|Add Button to FEM Toolbar Tutorial]]


== Related ==
== Related == <!--T:29-->


<!--T:30-->
* FEM bugs in the [https://tracker.freecadweb.org/set_project.php?project_id=4;14 FreeCAD bugtracker]
* FEM bugs in the [https://tracker.freecadweb.org/set_project.php?project_id=4;14 FreeCAD bugtracker]
* Open FEM [https://github.com/FreeCAD/FreeCAD/search?q=FIXME+AND+fem FIXME] comments in the FreeCAD source code
* [[FEM Workbench]]
* Open FEM [https://github.com/FreeCAD/FreeCAD/search?q=TODO+AND+fem TODO] comments in the FreeCAD source code
* [[Category:FEM]]
* [https://forum.freecadweb.org/viewtopic.php?f=18&t=60574 Original thread discussion] for this wiki page
* https://github.com/FreeCAD/FreeCAD/search?q=FIXME+AND+fem
* [[FEM_Workbench|FEM Workbench]]
* https://github.com/FreeCAD/FreeCAD/search?q=TODO+AND+fem




</translate>
[[Category:FEM{{#translation:}}]]
[[Category:FEM{{#translation:}}]]
[[Category:Developer Documentation{{#translation:}}]]
[[Category:Developer Documentation{{#translation:}}]]

Revision as of 14:55, 3 November 2021

Other languages:

Description

This page will orient new developers on how to setup their development environments in order to hack on the FEM workbench.

Setting up a Dev Environment

TBD

Prerequisites

  • Netgen

Recommended

  • Paraview

Compiling via Source

TBD

Compiling via Docker

TBD

Source Code Management

Keeping FreeCAD up-to-date is documented in Source code management page. Along with useful git tips.

FEM Code Infrastructure

The FEM code lives in src/Mod/Fem

  • App/ console-mode application, defines basic structures and base classes for document objects, that are used by modules to build their own.
  • Gui/ GUI-mode application, defines the 3D view, tools/functions used by workbench to interact with UI and 3D view, defines base classes for view providers.
  • femcommands/
  • fem.dox
  • femexamples/
  • femguiobjects/
  • femguiutils/
  • feminout/
  • femmesh/
  • femobjects/
  • femresult/
  • femsolver/
  • femtaskpanels/
  • femtest/
  • femtools/
  • femviewprovider/
  • InitGui.py
  • Init.py
  • ObjectsFem.py
  • TestFemApp.py
  • TestFemGui.py

Coding Conventions

Please see coding_conventions.md file on the FreeCAD repository.

Adding New FEM Solvers

A new FEM solver requires the following:

  • Mesh exporter
  • Results importer
  • Solver object (needs changes in solver settings, unit tests, ObjectsFem modules as well)
  • Task and writer module (here is where the main solver input writing happens)
  • GUI tool to create a solver
  • GUI preference tab to set the solver binary path
  • A solver input writing unit test. Best to take the ccx cantilever. This is available for all mesh element types
  • Having one or two beers

See also:

Writing Unit Tests

TBD

Informative

Related