Yes. There is nothing in python AFAIK. If you gone write some def we could add it to FemMeshTools.py right under https://github.com/FreeCAD/FreeCAD/blob ... s.py#L1319joha2 wrote:Ah I see your point . Thanks for the file! So in principal I have to check for the second order elements to be sure whether there is a second order mesh or not.
Fenics as Solver
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: Fenics as Solver
Re: Fenics as Solver
For z88 I had to do it too. https://github.com/berndhahnebach/FreeC ... sh.py#L390
Re: Fenics as Solver
After splitting the import/export code into several files I have the problem of open which was renamed to pyopen. If there is any import/export in the same file, I know that I have to substitute open by pyopen. But now the situation changed. The open is accessed in another name space/module. So it is still necessary to reference to pyopen? I think not, because the open command is only overwritten in the main import/export file.
Best wishes
Johannes
Best wishes
Johannes
Re: Fenics as Solver
check OpenSCAD workbench AFAIK they have splitted the import and export too.
Re: Fenics as Solver
Thanks for the hint! They just splitted import and export in different files and doubled the open -> pyopen redefinition in every file. My situation is a bit different; I used 4 files to write the code for import/export (xml and xdmf), but the main file which couples this code to FreeCAD stays the same and just imports those 4 files.
https://github.com/joha2/FreeCAD/blob/f ... icsMesh.py
In the other files, there is just the normal open used, see e.g. last lines of
https://github.com/joha2/FreeCAD/blob/f ... icsXDMF.py
Best wishes
Johannes
https://github.com/joha2/FreeCAD/blob/f ... icsMesh.py
In the other files, there is just the normal open used, see e.g. last lines of
https://github.com/joha2/FreeCAD/blob/f ... icsXDMF.py
Best wishes
Johannes
Re: Fenics as Solver
Heyhey bernd,
I opened a brandnew pull request for Fenics XDMF export to your Femdev branch
I tested the code with several gmsh and netgen created meshes and it worked. (At least after import into Paraview. )
Best wishes
Johannes
I opened a brandnew pull request for Fenics XDMF export to your Femdev branch
I tested the code with several gmsh and netgen created meshes and it worked. (At least after import into Paraview. )
Best wishes
Johannes
Re: Fenics as Solver
@bernd was this ever merged in to master ?joha2 wrote:Heyhey bernd,
I opened a brandnew pull request for Fenics XDMF export to your Femdev branch
I tested the code with several gmsh and netgen created meshes and it worked. (At least after import into Paraview. )
Best wishes
Johannes
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Fenics as Solver
Is this possible yet?qingfeng.xia wrote:My current day-work project is using Fenics to solve multiphysics problem, once some one can export FreeCAD fem mesh to Fenics, we can solve more physics problem easily.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Fenics as Solver
Hey Kunda
thanks for pointing this out! At some point I had the feeling that such a Fenics export is only useful for myself
The mentioned export functions are merged into the femdev branch of bernd already. Though the merging into the
master branch is not done, yet. I would appreciate any testing of my import/export functions and any suggestions for improving.
It is planned to also implement some geometry based mesh selection which afterwards could be exported into Fenics mesh functions.
Best wishes
Johannes
thanks for pointing this out! At some point I had the feeling that such a Fenics export is only useful for myself
The mentioned export functions are merged into the femdev branch of bernd already. Though the merging into the
master branch is not done, yet. I would appreciate any testing of my import/export functions and any suggestions for improving.
It is planned to also implement some geometry based mesh selection which afterwards could be exported into Fenics mesh functions.
Best wishes
Johannes
-
- Posts: 227
- Joined: Tue Sep 22, 2015 1:47 pm
- Location: Oxford UK/Shenzhen China
- Contact:
Re: Fenics as Solver
as it is my day-time work, paid by project, also part of my project, it would not been open source soon. We need to finish the project first, then think about generalize it and publish it.
it is hard to do domain splitting, and make is more object orient. I have not found a good way to sequence the multiple solvers.
it is hard to do domain splitting, and make is more object orient. I have not found a good way to sequence the multiple solvers.
Kunda1 wrote:Is this possible yet?qingfeng.xia wrote:My current day-work project is using Fenics to solve multiphysics problem, once some one can export FreeCAD fem mesh to Fenics, we can solve more physics problem easily.
Ubuntu 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd