Felt in FEM Workbench

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
Sudhanshu
Posts: 357
Joined: Mon Oct 15, 2018 5:22 am

Re: Felt in FEM Workbench

Post by Sudhanshu »

bernd wrote: Sun Apr 07, 2019 8:27 pm
As stated, to get started just use gmsh.
Ok, I will start with Gmesh.
Thanks!
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Felt in FEM Workbench

Post by vocx »

bernd wrote: Sun Apr 07, 2019 8:27 pm Just to make clear. Netgen was never included in FreeCAD source. FreeCAD needs to be compiled and linked against Netgen to make Netgen mesher inside FreeCAD working. May be, may be not, the provided FreeCAD binaries for various operating systems include netgen mesher or not!

As stated, to get started just use gmsh.
You are right. I didn't word that exactly correctly. What I meant to say is that in the free software world, especially with a license like GPL, linking against a particular library is somehow considered "including" that library in your code. So, currently Netgen isn't linked against FreeCAD, but of course, it can be used externally, just like Gmsh is.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
hardeeprai
Posts: 177
Joined: Sun May 23, 2010 2:41 pm
Location: Ludhiana, Punjab, India
Contact:

Re: Felt in FEM Workbench

Post by hardeeprai »

Sudhanshu wrote: Sun Apr 07, 2019 9:20 pm Ok, I will start with Gmesh.
@ Sudhanshu

Anything worth to report?
--
H.S.Rai
User avatar
Sudhanshu
Posts: 357
Joined: Mon Oct 15, 2018 5:22 am

Re: Felt in FEM Workbench

Post by Sudhanshu »

hardeeprai wrote: Mon Apr 15, 2019 4:27 pm
@ Sudhanshu

Anything worth to report?
I have created the basic versions of solver.py, writer.py and tasks.py.
You can view the files here.
Now I need to register felt solver in various files.

I have some doubts in the tasks.py.

What does the Container class do? Does it store the various parameters like constraints and material properties?

Code: Select all

...
# get member, empty lists are not supported by oofem 
self.materials_linear = []
self.materials_nonlinear = []
...


What is the meaning of "member" and "empty lists" here?
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Felt in FEM Workbench

Post by bernd »

Sudhanshu wrote: Tue Apr 16, 2019 11:31 am I have some doubts in the tasks.py.

What does the Container class do? Does it store the various parameters like constraints and material properties?

Code: Select all

...
# get member, empty lists are not supported by oofem 
self.materials_linear = []
self.materials_nonlinear = []
...


What is the meaning of "member" and "empty lists" here?
yep the analysis member are collected and tbey will be parameter for the writer class. Empty lists is empty thus an ampty list will be given to the writer and thus the writer can not write this constraint and thus this constraint is not supported by the writer. Since your input file is a string in writer ATM you can pass a bunch of empty lists to the writer. If your solver runs you can step by step give live to the empty lists and implement the writer for this. Just see the oofem commits.

cheers bernd

looks good so far. Does the solver run? I assume not because you did not adapt the settings module and some other things. see first two commits in oofem
User avatar
Sudhanshu
Posts: 357
Joined: Mon Oct 15, 2018 5:22 am

Re: Felt in FEM Workbench

Post by Sudhanshu »

bernd wrote: Tue Apr 16, 2019 7:24 pm
looks good so far. Does the solver run? I assume not because you did not adapt the settings module and some other things. see first two commits in oofem
So I was editing the settings.py and came around the following code which I didn't fully understood:

Code: Select all

"oofem": _SolverDlg(
        default="oofem",
        param_path=_PARAM_PATH + "oofem",
        use_default="UseStandardOofemLocation",
        custom_path="OofemBinaryPath"),
Here you are adding values to the _SOLVER_PARAM variable but I don't understand exactly how and what do these values mean?

Similarly in testobject.py, what are following lines doing:

Code: Select all

...
        self.assertEqual('Fem::FemSolverObjectOofem', type_of_obj(ObjectsFem.makeSolverOofem(doc)))
...
        self.assertTrue(is_of_type(ObjectsFem.makeSolverOofem(doc), 'Fem::FemSolverObjectOofem'))
...
        self.assertTrue(is_derived_from(ObjectsFem.makeSolverOofem(doc), 'App::DocumentObject'))
        self.assertTrue(is_derived_from(ObjectsFem.makeSolverOofem(doc), 'Fem::FemSolverObject'))
        self.assertTrue(is_derived_from(ObjectsFem.makeSolverOofem(doc), 'Fem::FemSolverObjectPython'))
        self.assertTrue(is_derived_from(ObjectsFem.makeSolverOofem(doc), 'Fem::FemSolverObjectOofem'))
...    
        self.assertTrue(ObjectsFem.makeSolverOofem(doc).isDerivedFrom('Fem::FemSolverObjectPython'))
....
@Bernd, can you please explain these lines to me.
User avatar
Sudhanshu
Posts: 357
Joined: Mon Oct 15, 2018 5:22 am

Re: Felt in FEM Workbench

Post by Sudhanshu »

bernd wrote: Tue Apr 16, 2019 7:24 pm
looks good so far. Does the solver run? I assume not because you did not adapt the settings module and some other things. see first two commits in oofem
I have followed the first two commits.
You can check them here.

So, the solver should run now right?
But how can I test it?

I don't think that it will appear in the FreeCAD that I have since its the one I installed using apt.
Should I compile my repo and install that FreeCAD, or is there any other way?
User avatar
hardeeprai
Posts: 177
Joined: Sun May 23, 2010 2:41 pm
Location: Ludhiana, Punjab, India
Contact:

Re: Felt in FEM Workbench

Post by hardeeprai »

Sudhanshu wrote: Thu Apr 18, 2019 7:16 amI have followed the first two commits.
You can check them here.
In your sample file written inline at https://github.com/Sudhanshu-Dubey14/Fr ... /writer.py , the lines from 127 to 135 are not needed, as these are for GUI of FElt, named "Velvet", which will not be used in your case.
--
H.S.Rai
User avatar
hardeeprai
Posts: 177
Joined: Sun May 23, 2010 2:41 pm
Location: Ludhiana, Punjab, India
Contact:

Re: Felt in FEM Workbench

Post by hardeeprai »

Sudhanshu wrote: Thu Apr 18, 2019 7:16 amI have followed the first two commits.
You can check them here.
Refer file name "1DBeam.out.m0.1.vtu" mentioned at line number 124 of https://github.com/Sudhanshu-Dubey14/Fr ... t/tasks.py
With your current code, you can't create this file.
--
H.S.Rai
User avatar
hardeeprai
Posts: 177
Joined: Sun May 23, 2010 2:41 pm
Location: Ludhiana, Punjab, India
Contact:

Re: Felt in FEM Workbench

Post by hardeeprai »

Sudhanshu wrote: Thu Apr 18, 2019 7:16 am ... I installed using apt.
Should I compile my repo and install that FreeCAD, or is there any other way?
When you do development in Python, you need not to compile FreeCAD.
--
H.S.Rai
Post Reply