View Issue Details

IDProjectCategoryView StatusLast Update
0003038FEMFeaturepublic2018-09-22 11:03
ReporterKunda1 Assigned Tojoha2  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Product Version0.18 
Summary0003038: FEM - solver Fenics integration (Ongoing)
DescriptionIntegrate the Fenics as a solver for FEM
Fenics Project - http://fenicsproject.org/

Goals:

  1. XML/XDMF mesh import/export
  2. Interface classes for easy usage of cell functions and facet functions (scalars, tensors, vectors)
  3. Easy integration of boundary conditions (first Dirichlet, later Neumann and Robin)
  4. Pre defined solver classes (Abstract, ThermalStructural, Electromagnetics, TimeDependent/Transient (EulerForward, CrankNicolson, ...), ModalAnalysis)
  5. Case writer and convenient easy to use interface
  6. Tests with standard examples (preferably with know analytical solutions)
Additional InformationForum thread: https://forum.freecadweb.org/viewtopic.php?f=18&t=4677
Dev branch: https://github.com/berndhahnebach/FreeCAD_bhb/tree/femdev
TagsFEM, fenics, Solver(FEM)
FreeCAD Information

Activities

Kunda1

2017-05-27 00:41

administrator   ~0009164

c:FreeCAD:e98d6321bbf261a8ad34114e50c98a43aba72ebc:
c:FreeCAD:10dd719631392752a6963e78d872f8b86e083dc6:

Kunda1

2017-07-01 11:07

administrator   ~0009632

FreeCAD master 7b5adb94

Kunda1

2017-07-01 11:12

administrator   ~0009633

@berndhahnebach shall we add to the bug title (Ongoing) or should we resolve ticket?

berndhahnebach

2017-07-01 12:25

developer   ~0009635

Last edited: 2017-07-01 12:25

BTW: I do not do any development in this regard. Assigning to me make no sense IMHO.

May be we could resove the ticket, because the integration will take some time. It is even not clear if it will be integrated in FreeCAD or if it will be a separate module like the CFD analysis.

The advantage of haveing such an issue is we could refere to the issue, and we could collect forum links here.

bernd

berndhahnebach

2017-07-01 12:28

developer   ~0009636

Last edited: 2017-07-01 12:28

My dev branch ( https://github.com/berndhahnebach/FreeCAD_bhb/tree/femdev ) is just the half official FEM dev branch where I collect all kind of FEM development from all kind of people and try to resolve any problems before makeing a PR. This just to make it easier for Werner and Yorik. That is why the Fenics mesh stuff was collected in my dev branch.

bernd

joha2

2017-07-01 13:03

developer   ~0009638

@Kunda1 I would suggest, you assign this issue to me. Further I would recommend to (like you suggested) to put (ongoing) into title. This is because it is a large effort to implement an appropriate Fenics interface in FreeCAD and we just went through the very first steps (i.e. mesh import/export).

Best wishes
Johannes

berndhahnebach

2017-07-01 14:07

developer   ~0009639

Ahh I did not know you have an account Johannes. Than for sure it is best to assign this issue to Johannes (joha2).

@Johannes:
Do you guys have branch where all the development is taking place or do you go step by step?

Kunda1

2017-07-01 21:57

administrator   ~0009642

A-Ok @joha2
Soon you will have elevated tracker permissions and we can then assign this ticket to you.

joha2

2017-07-01 22:00

developer   ~0009643

Last edited: 2017-07-01 22:01

Thanks @Kunda1
Unfortunately I have no own branch for these Fenics integrations. I just do it step by step and for every new part of the feature I make a new feature branch which is deleted once integrated into master.

Best whishes
Johannes

joha2

2017-07-02 09:19

developer   ~0009645

@berndhahnebach ahhh I thought your questions from 2017-07-01 14:07 came from Kunda1, sorry! I think at the moment it's only me who's developing some Fenics interface. Loooo had some nice ideas about a quite generic solver interface which should also be capable to feed Fenics a while ago, but now he is busy porting FreeCAD to python3, afaik.

Most of the guys using Fenics told me that the most cumbersome task is to setup a mesh with the appropriate boundary conditions, so I think mesh and selecting parts of it and marking them is the primary task.

Up to now for these small enhancements it was not necessary to open up an own branch, therefore I only let you merge small feature branches. (Maybe they are also better for review.)

I am not sure if it is really necessary to provide a nice interface like for the calculix solver. Maybe it is sufficient to provide only a raw python scripting interface which loads Fenics and all other necessary modules and also contains the main code of the finite element analysis. Afterwards it would be nice to do the post processing with the vtk interfaces anyway. But these are things to be clarified in the far future.

Best wishes
Johannes

berndhahnebach

2017-07-02 09:55

developer   ~0009646

Last edited: 2017-07-02 09:55

Most of the guys using Fenics told me that the most cumbersome task is to setup a mesh with the appropriate boundary conditions, so I think mesh and selecting parts of it and marking them is the primary task

joha2
.

FreeCAD is a bit different (smarter) than most FEM tools, even the quite expensive ones. In FreeCAD FEM we do not select parts of the mesh, we select parts of the geometry instead. All constraints and boundaries are defined at the geometry. Afterwards a smart meshing process generates a mesh which includes all the constraint and boundary groups for the solver. It is what we do with Calculix and z88. The elmer integration (GSoC project) is done the same way. Have you tried some mechanical CalculiX analysis?

I like your way of going in small steps and merge them into master immediately. That way we have what we have. We try to do that in FreeCAD mostly. That way we do not produce some dead code branch if someone for some reason has a break in his develpment or stops development at all.

In the regard of solver handling and Fenics we could disscuss this if we have something set up what works. In the regard of solver handling in general we will probably see some improvement in FEM soon as a result of the Elmer GSoC project. Stay tuned!

keep up the good work bernd

berndhahnebach

2017-07-02 09:58

developer   ~0009647

@Kunda1:

I can not reassign this to joha2. Might because he is a reporter and not a developer?

bernd

joha2

2017-07-02 10:11

developer   ~0009648

Hey bernd, yes I think my access level is too low to be assigned to a ticket. I think Kunda1 will lift it to developer, soon.

I remember we had some discussion about marking the boundaries and stuff in the Fenics thread. I also tried some mechanical Calculix analyses, but since my OCC kernel is quite old (6.8.0 I think), I had more or less some problems performing them. But the standard one-side fixed beam example worked well. HoWil implemented some Fenics script doing the same model and I performed also a modal analysis for that example in Fenics.

Nevertheless I also thought about implementing marking via NodeSets and via tool parts which is a bit incompatible with the mesh groups, but offers some more flexibility (since the mesh functions of Fenics are also quite general.) Maybe we should discuss how all three approaches could be put together appropriately in more detail soon.

Best wishes
Johannes

kkremitzki

2017-07-02 23:27

administrator   ~0009650

@joha2 I just set your access level to developer.

joha2

2017-07-03 22:28

developer   ~0009662

@kkremitzki thanks!

wmayer

2017-08-12 11:55

administrator   ~0009894

https://github.com/FreeCAD/FreeCAD/pull/923
https://github.com/FreeCAD/FreeCAD/commit/0d471dbed872782c66b5b04a815dc356886c3423

joha2

2018-07-19 22:41

developer   ~0011538

Last edited: 2018-07-19 22:42

@Kunda1 and @berndhahnebach maybe it is trivial, but since this issue is quite outdated I want to add some changesets from the last few months to the changeset history but I cannot find out how. Is it possible that my access level is too low?

Best wishes and thanks in advance
Johannes

Kunda1

2018-07-27 13:59

administrator   ~0011548

@joha2 the changeset addon of this bugtracker is very buggy, teoretically you can submit PRs and reference
issue 0003038
in the commit summary and the changeset should be immediately attached (which doesn't work consistently anymore). You do need a higher permission to add a changeset from within the bugtracker, which is also subject to not working consistently.

Let me know which commits and I will manually associate them (if possible under the current buggy conditions).

joha2

2018-07-29 16:41

developer   ~0011563

@kunda1 thanks for this information. So this means the bugtracker is buggy? Is it a problem of the underlying software? Is this subject to be fixed or is it not fixable?

The changesets following are taken from the git commit history from master (my username together with Fenics related stuff) and are ordered from oldest to newest:
  1. commit 785d660dd78fdc7dfd643a88b7f2bf3d54b3e7cc
  2. commit 0b98673c7cb9b490d557bffceab8687e9e2d7989
  3. commit bd4bc9c2578ecc1d6b07736d22437658137bd1e7
  4. commit f95ca7185c128a5bfd31a3521269783f4683360f
  5. commit b611cfc8ed3c08131f8f60571e3aa374eb80edf2
  6. commit 0456928fd13ad328596e435f909af9ae0ebc4d06
  7. commit 8da914fb7036bfc8536227091b3bebc30cb5296d
  8. commit 7161b98a7987fc4e6625b7a73e36732307a7ad9e
  9. commit fa05b1b068a36b782c29d68b76a25eef649b38ed
  10. commit 0d471dbed872782c66b5b04a815dc356886c3423
  11. commit 90f3aada2df7e9449f879f79effc348d39755753
  12. commit 7072b3f938f328aef315eb95969d7c1142f34650
  13. commit 3b8fa5cb24ff331512c8c0d59456265384ca7c54
  14. commit ccfe39d115c546027897f32e03ab9e19f6ee3c4b
  15. commit 24452df93e94ee5d8f4dcba9f697dd9b43a96ac9

Thanks for your efforts. If you need further information, do not hessitate to ask me.

Best wishes
Johannes

Kunda1

2018-07-30 00:01

administrator   ~0011564

@joha2 the issue is the MantisBT plugin called SourceIntegration that integrates with Github, it malfunctions in a way that we have to manually manage it most of the time. @kkremitzki have tried working on it. Anyway, if I wrote those commits a certain way and they turn in to link this will tell us which commits are currently recognized by this plugin (note the plugin needs to be bumped since we are behind about 1 month in git commits).

c:FreeCAD:785d660dd78fdc7dfd643a88b7f2bf3d54b3e7cc:
c:FreeCAD:0b98673c7cb9b490d557bffceab8687e9e2d7989:
c:FreeCAD:bd4bc9c2578ecc1d6b07736d22437658137bd1e7:
c:FreeCAD:f95ca7185c128a5bfd31a3521269783f4683360f:
c:FreeCAD:b611cfc8ed3c08131f8f60571e3aa374eb80edf2:
c:FreeCAD:0456928fd13ad328596e435f909af9ae0ebc4d06:
c:FreeCAD:8da914fb7036bfc8536227091b3bebc30cb5296d:
c:FreeCAD:7161b98a7987fc4e6625b7a73e36732307a7ad9e:
c:FreeCAD:fa05b1b068a36b782c29d68b76a25eef649b38ed:
c:FreeCAD:0d471dbed872782c66b5b04a815dc356886c3423:
c:FreeCAD:90f3aada2df7e9449f879f79effc348d39755753:
c:FreeCAD:7072b3f938f328aef315eb95969d7c1142f34650:
c:FreeCAD:3b8fa5cb24ff331512c8c0d59456265384ca7c54:
c:FreeCAD:ccfe39d115c546027897f32e03ab9e19f6ee3c4b:
c:FreeCAD:24452df93e94ee5d8f4dcba9f697dd9b43a96ac9:

Kunda1

2018-08-01 20:13

administrator   ~0011579

@kkremitzki when you get a chance could you bump the SI plugin ? Thanks

Kunda1

2018-08-03 22:15

administrator   ~0011589

@kkremitzki thanks for updating SI and bumping commits. As you can see above the plugin is still malfunctioning. By doing a search on FreeCAD/FreeCAD in GH using author-name:joha2 shows many of the above commits have not been pulled in by SourceIntegration.

wmayer

2018-08-07 15:41

administrator   ~0011603

https://github.com/FreeCAD/FreeCAD/commit/bf45030595c6f32a5186af53f6bf92b8ae9ecda3

berndhahnebach

2018-09-18 15:59

developer   ~0011794

I just cleaned FEM issues. I did closed a few of such ongoing issues. Do we really need such ongoing issue? IMHO it is better to open an issue for a specific problem or feature and close it if this specific problem is solved. All this ongoing conversation takes place in the forum ATM.

jm2c bernd

Kunda1

2018-09-22 11:03

administrator   ~0011808

@joha2 per bernd in 0003038:0011794 please open a new ticket related Fenics integration when appropriate. Closing this ticket for now.

Related Changesets

FreeCAD: master d751423d

2017-03-03 09:25:31

joha2


Committer: yorik Details Diff
FEM: fenics xml mesh format, add mesh import Affected Issues
0003038
mod - src/Mod/Fem/Init.py Diff File
mod - src/Mod/Fem/importFenicsMesh.py Diff File

FreeCAD: master 7f72f9ed

2017-03-05 12:16:52

joha2


Committer: yorik Details Diff
FEM: fenics import/export: one line documentation, fixed make_femmesh call Affected Issues
0003038
mod - src/Mod/Fem/importFenicsMesh.py Diff File

FreeCAD: master 85c2e6a1

2017-05-26 15:41:13

joha2


Committer: Yorik van Havre Details Diff
FEM: Fenics meshes, add support for xdmf format, some more improvements Affected Issues
0003038
mod - src/Mod/Fem/App/CMakeLists.txt Diff File
mod - src/Mod/Fem/CMakeLists.txt Diff File
mod - src/Mod/Fem/Init.py Diff File
mod - src/Mod/Fem/importFenicsMesh.py Diff File
mod - src/Mod/Fem/importToolsFem.py Diff File
add - src/Mod/Fem/readFenicsXDMF.py Diff File
add - src/Mod/Fem/readFenicsXML.py Diff File
add - src/Mod/Fem/writeFenicsXDMF.py Diff File
add - src/Mod/Fem/writeFenicsXML.py Diff File

FreeCAD: master 3708c760

2017-05-26 15:41:17

Bernd Hahnebach


Committer: Yorik van Havre Details Diff
FEM: Fenics meshes, flake8 Affected Issues
0003038
mod - src/Mod/Fem/importFenicsMesh.py Diff File
mod - src/Mod/Fem/readFenicsXDMF.py Diff File
mod - src/Mod/Fem/readFenicsXML.py Diff File

FreeCAD: master 7b5adb94

2017-06-27 05:15:40

joha2


Committer: Bernd Hahnebach Details Diff
FEM: issue 0003038 Fenics mesh import/export: removed lxml dependency Affected Issues
0003038
mod - src/Mod/Fem/readFenicsXML.py Diff File
mod - src/Mod/Fem/writeFenicsXDMF.py Diff File
mod - src/Mod/Fem/writeFenicsXML.py Diff File

Issue History

Date Modified Username Field Change
2017-05-18 10:50 Kunda1 New Issue
2017-05-18 10:55 Kunda1 Status new => confirmed
2017-05-26 20:53 Kunda1 Changeset attached => FreeCAD master d751423d
2017-05-26 20:54 Kunda1 Changeset attached => FreeCAD master 7f72f9ed
2017-05-27 00:41 Kunda1 Note Added: 0009164
2017-05-28 00:05 Kunda1 Changeset attached => FreeCAD master 3708c760
2017-05-28 00:05 Kunda1 Changeset attached => FreeCAD master 85c2e6a1
2017-07-01 11:07 Kunda1 Note Added: 0009632
2017-07-01 11:10 Kunda1 Assigned To => berndhahnebach
2017-07-01 11:10 Kunda1 Status confirmed => assigned
2017-07-01 11:12 Kunda1 Note Added: 0009633
2017-07-01 11:13 Kunda1 Tag Attached: #pending
2017-07-01 12:25 berndhahnebach Note Added: 0009635
2017-07-01 12:25 berndhahnebach Note Edited: 0009635
2017-07-01 12:28 berndhahnebach Note Added: 0009636
2017-07-01 12:28 berndhahnebach Note Edited: 0009636
2017-07-01 13:03 joha2 Note Added: 0009638
2017-07-01 14:07 berndhahnebach Note Added: 0009639
2017-07-01 21:57 Kunda1 Summary FEM - Fenics integration => FEM - Fenics integration (Ongoing)
2017-07-01 21:57 Kunda1 Note Added: 0009642
2017-07-01 22:00 joha2 Note Added: 0009643
2017-07-01 22:01 joha2 Note Edited: 0009643
2017-07-01 22:03 joha2 Tag Attached: FEM
2017-07-01 22:03 joha2 Tag Attached: fenics
2017-07-02 09:19 joha2 Note Added: 0009645
2017-07-02 09:55 berndhahnebach Note Added: 0009646
2017-07-02 09:55 berndhahnebach Note Edited: 0009646
2017-07-02 09:58 berndhahnebach Note Added: 0009647
2017-07-02 10:11 joha2 Note Added: 0009648
2017-07-02 23:27 kkremitzki Note Added: 0009650
2017-07-03 01:14 Kunda1 Assigned To berndhahnebach => joha2
2017-07-03 22:28 joha2 Note Added: 0009662
2017-07-04 00:39 Kunda1 Changeset attached => FreeCAD master 7b5adb94
2017-07-08 16:05 berndhahnebach Summary FEM - Fenics integration (Ongoing) => FEM - solver Fenics integration (Ongoing)
2017-07-13 11:23 Kunda1 Tag Attached: Solver(FEM)
2017-07-15 14:41 Kunda1 Tag Detached: #pending
2017-08-12 11:55 wmayer Note Added: 0009894
2018-07-19 22:41 joha2 Note Added: 0011538
2018-07-19 22:42 joha2 Note Edited: 0011538
2018-07-19 22:49 joha2 Product Version 0.17 => 0.18
2018-07-19 22:49 joha2 Description Updated
2018-07-19 22:53 joha2 Description Updated
2018-07-27 13:59 Kunda1 Note Added: 0011548
2018-07-29 16:41 joha2 Note Added: 0011563
2018-07-30 00:01 Kunda1 Note Added: 0011564
2018-08-01 20:13 Kunda1 Note Added: 0011579
2018-08-03 22:15 Kunda1 Note Added: 0011589
2018-08-07 15:41 wmayer Note Added: 0011603
2018-09-18 15:59 berndhahnebach Note Added: 0011794
2018-09-22 11:03 Kunda1 Status assigned => closed
2018-09-22 11:03 Kunda1 Resolution open => fixed
2018-09-22 11:03 Kunda1 Note Added: 0011808