Felt in FEM Workbench

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
bernd
Posts: 7534
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Felt in FEM Workbench

Postby bernd » Sat Apr 20, 2019 10:17 am

fist thing you should do is make a new document, add an FEM analysis container and afterwards a FELT solver object by Python. This is the new object you created. Than run your new solver object and see what error will be given. I do not assume it will run right straight away ... :shock: ;)
User avatar
Sudhanshu
Posts: 50
Joined: Mon Oct 15, 2018 5:22 am

Re: Felt in FEM Workbench

Postby Sudhanshu » Sat Apr 20, 2019 4:44 pm

hardeeprai wrote:
Sat Apr 20, 2019 6:22 am
Sudhanshu wrote:
Thu Apr 18, 2019 7:16 am
I 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.
Ah! Yes, I overlooked that.
Thanks for pointing it out. I have removed those lines.
You can check that here.
User avatar
Sudhanshu
Posts: 50
Joined: Mon Oct 15, 2018 5:22 am

Re: Felt in FEM Workbench

Postby Sudhanshu » Sat Apr 20, 2019 4:46 pm

hardeeprai wrote:
Sat Apr 20, 2019 6:42 am
Sudhanshu wrote:
Thu Apr 18, 2019 7:16 am
I 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.
I guess you are right.
Then, should I just create a simple text file as output?
But then how will I show it on the FreeCAD GUI or the FreeCAD console?
User avatar
Sudhanshu
Posts: 50
Joined: Mon Oct 15, 2018 5:22 am

Re: Felt in FEM Workbench

Postby Sudhanshu » Sat Apr 20, 2019 4:50 pm

hardeeprai wrote:
Sat Apr 20, 2019 6:44 am
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.
I am still confused. :?:
How will FreeCAD then pick up the code from my repository?
There has to be some kind of connection, some way to tell FreeCAD that new code has been added, that to in some repo other than its official one.
User avatar
Sudhanshu
Posts: 50
Joined: Mon Oct 15, 2018 5:22 am

Re: Felt in FEM Workbench

Postby Sudhanshu » Sat Apr 20, 2019 5:39 pm

bernd wrote:
Sat Apr 20, 2019 10:17 am
fist thing you should do is make a new document, add an FEM analysis container and afterwards a FELT solver object by Python. This is the new object you created. Than run your new solver object and see what error will be given. I do not assume it will run right straight away ... :shock: ;)
So I followed what you said. Here is the the screenshot of everything I did before solving:

Image

I did not get FElt solver as an option in GUI and I wasn't expecting that anyway.

bernd wrote:
Sat Apr 20, 2019 10:17 am
...and afterwards a FELT solver object by Python.
So is there a command to add the solver object from the python console?
User avatar
bernd
Posts: 7534
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Felt in FEM Workbench

Postby bernd » Sat Apr 20, 2019 6:42 pm

sure, there is ... if you really followed the first two commits of oofem you should have been added a method to ObjectsFem module. This method should make it easy to add a new FELT solver. Import ObjectsFem and run this method should add you a new FELT solver ...
cheers bernd
User avatar
bernd
Posts: 7534
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Felt in FEM Workbench

Postby bernd » Sat Apr 20, 2019 6:47 pm

how do you develop is up to you. One way is just change the python files in the nodule path of installed FreeCAD, the other way is to clone the FreeCAD cource code from github make your changes and compile FreCAD. I surely prefere the second way, but you can start with the other way too. The first two commits would work with both ways ...

cheers bernd
User avatar
bernd
Posts: 7534
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Felt in FEM Workbench

Postby bernd » Sat Apr 20, 2019 6:51 pm

hardeeprai wrote:
Sat Apr 20, 2019 6:44 am
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.
As said this would be the way where you just chage files in FreeCAD mod directory.
User avatar
Sudhanshu
Posts: 50
Joined: Mon Oct 15, 2018 5:22 am

Re: Felt in FEM Workbench

Postby Sudhanshu » Sat Apr 20, 2019 7:20 pm

bernd wrote:
Sat Apr 20, 2019 6:42 pm
sure, there is ... if you really followed the first two commits of oofem you should have been added a method to ObjectsFem module. This method should make it easy to add a new FELT solver. Import ObjectsFem and run this method should add you a new FELT solver ...
cheers bernd
Oh, so the ObjectsFem.makeSolverCalculixCcxTools(doc, name) method is called when I press the Solver button in the GUI.
Cool!!
And so, in my case, the function ObjectsFem.makeSolverFElt(doc, name) should be called from the console.

bernd wrote:
Sat Apr 20, 2019 6:51 pm
hardeeprai wrote:
Sat Apr 20, 2019 6:44 am
When you do development in Python, you need not to compile FreeCAD.
As said this would be the way where you just chage files in FreeCAD mod directory.
When you say FreeCAD mod directory, are you referring to this:

Code: Select all

sudhanshu@dubey:/snap/freecad/8/opt/local/FreeCAD-0.18/Mod/Fem$ ls
femcommands    feminout  femobjects  femsolver  femtools    Init.py        Resources
femguiobjects  femmesh   femresult   femtest    InitGui.py  ObjectsFem.py  TestFem.py


So by putting my files here, I would be able to test them in FreeCAD?
User avatar
hardeeprai
Posts: 146
Joined: Sun May 23, 2010 2:41 pm
Location: Ludhiana, Punjab, India
Contact:

Re: Felt in FEM Workbench

Postby hardeeprai » Sat May 04, 2019 12:19 pm

Sudhanshu wrote:
Sat Apr 20, 2019 7:20 pm
When you say FreeCAD mod directory, are you referring to this:

Code: Select all

sudhanshu@dubey:/snap/freecad/8/opt/local/FreeCAD-0.18/Mod/Fem$ ls
femcommands    feminout  femobjects  femsolver  femtools    Init.py        Resources
femguiobjects  femmesh   femresult   femtest    InitGui.py  ObjectsFem.py  TestFem.py


So by putting my files here, I would be able to test them in FreeCAD?
Yes.

@ Sudhanshu

It is long, we have not heard from you. Have you progressed further or any thing else who did related to FElt solver?
--
H.S.Rai