Elmer Static current equation

About the development of the FEM module/workbench.

Moderator: bernd

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

Re: Elmer Static current equation

Post by bernd » Mon Aug 03, 2020 1:44 pm

I have been away a few days ...

If we would follow FEM naming shema we would need to call all the names freetextinput_whatIsTheTextInputFor.py etc
HoWil
Posts: 1199
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Elmer Static current equation

Post by HoWil » Mon Aug 03, 2020 2:52 pm

bernd wrote:
Mon Aug 03, 2020 1:44 pm
If we would follow FEM naming shema we would need to call all the names freetextinput_whatIsTheTextInputFor.py etc
My intention was to keep all e.g. constraints start with constraint....py . Isn‘t this more intuitive?
I can rename everything but will implement freetextinput for equations before to show its benefits with a new equation type.
HoWil
Posts: 1199
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Elmer Static current equation

Post by HoWil » Mon Aug 03, 2020 2:55 pm

raback wrote:
Mon Aug 03, 2020 1:03 pm
Hi HoWil

The non-GUI tutorials are not automatically tested for when developing Elmer. Some of the test cases may be a little outdated being ~10 years old. There are hundreds of test cases that on the other hand are tested frequently.

Not it happens that this "ThermalActuator" also exists as a test case which has been somewhat modernized. I just took the additional step of transfering the original Ansys mesh into Gmsh format. This way the workflow could perhaps more easily be adopted in FreeCAD as the Gmsh format might be better supported there?

For the files see:
https://github.com/ElmerCSC/elmerfem/tr ... alActuator

-Peter
Thanks, Peter.
But as I pointed out before, the problem is not the mesh.
Will test the new model and will report back.
HoWil
Posts: 1199
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Elmer Static current equation

Post by HoWil » Mon Aug 03, 2020 3:59 pm

HoWil wrote:
Mon Aug 03, 2020 2:55 pm
Will test the new model and will report back.
The simulation works now... got temperature and displacement information!
Thank you, Peter :!:

EDIT
I used:

Code: Select all

ElmerGrid 14 2 actuator.msh
ElmerSolver thermal_actuator.sif
By uncommenting line 18 in the .sif

Code: Select all

Post File = "actuator.vtu"
one can import and view the results as .vtu files:
HoWil
Posts: 1199
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Elmer Static current equation

Post by HoWil » Mon Aug 03, 2020 7:09 pm

bernd wrote:
Mon Aug 03, 2020 1:44 pm
If we would follow FEM naming shema we would need to call all the names freetextinput_whatIsTheTextInputFor.py etc
@Bernd: Can you please have a look at https://github.com/HoWilgh/FreeCAD/tree ... etextinput
I get a

Code: Select all

Unknown command 'FEM_EquationElmerFreetextinput'
when I open the compiled FC and change into FEM-WB while I do not know where I have missed a thing.
User avatar
Sudhanshu
Posts: 355
Joined: Mon Oct 15, 2018 5:22 am

Re: Elmer Static current equation

Post by Sudhanshu » Wed Aug 05, 2020 8:22 pm

HoWil wrote:
Mon Aug 03, 2020 7:09 pm
bernd wrote:
Mon Aug 03, 2020 1:44 pm
If we would follow FEM naming shema we would need to call all the names freetextinput_whatIsTheTextInputFor.py etc
@Bernd: Can you please have a look at https://github.com/HoWilgh/FreeCAD/tree ... etextinput
I get a

Code: Select all

Unknown command 'FEM_EquationElmerFreetextinput'
when I open the compiled FC and change into FEM-WB while I do not know where I have missed a thing.
Looks like the error you get when the command in Workbench.cpp is not added in the FreeCadGui but I can clearly see that you have added the command in femcommands/commands.py
I am currently compiling your branch, so I will get a better idea regarding this later.

Till then I would suggest you to remove Mod/Fem from your build directory and recompile. Let's if that helps.
User avatar
Sudhanshu
Posts: 355
Joined: Mon Oct 15, 2018 5:22 am

Re: Elmer Static current equation

Post by Sudhanshu » Wed Aug 05, 2020 8:59 pm

Sudhanshu wrote:
Wed Aug 05, 2020 8:22 pm
Looks like the error you get when the command in Workbench.cpp is not added in the FreeCadGui but I can clearly see that you have added the command in femcommands/commands.py
I am currently compiling your branch, so I will get a better idea regarding this later.
I get this when running cmake:

Code: Select all

CMake Error at src/Mod/Fem/CMakeLists.txt:395 (ADD_CUSTOM_TARGET):
  Cannot find source file:

    /run/media/sudhanshu/Thunder/Repos/FreeCAD_sd/src/Mod/Fem/femobjects/equation_elmer_freetextinput.py

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
And indeed, this file mentioned here: https://github.com/HoWilgh/FreeCAD/blob ... s.txt#L144 is nowhere to be found here: https://github.com/HoWilgh/FreeCAD/tree ... femobjects
HoWil
Posts: 1199
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Elmer Static current equation

Post by HoWil » Thu Aug 06, 2020 5:29 am

Dear Sudhanshu,
Thank you very much! :!:

I will test that this evening.
There are to many places where one has to change things, especially if you are a spare time programmer as I am! Bernd is simplifying things a lot but it is still an aged and grown system. Hope there are ways to simplify it further.

Thanks again.
User avatar
bernd
Posts: 10956
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Elmer Static current equation

Post by bernd » Thu Aug 06, 2020 11:00 am

HoWil wrote:
Thu Aug 06, 2020 5:29 am
There are to many places where one has to change things, especially if you are a spare time programmer as I am! Bernd is simplifying things a lot but it is still an aged and grown system. Hope there are ways to simplify it further.
I am spare time programmer as well :mrgreen: I do not plan to do any more refactoring changes on the Python file structure in FEM.

We would need to document it somewhere what is needed to add an new object and command. As a start this could be used: https://github.com/FreeCAD/FreeCAD/comp ... fc9471ab49
HoWil
Posts: 1199
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Elmer Static current equation

Post by HoWil » Sat Aug 08, 2020 10:11 am

bernd wrote:
Thu Aug 06, 2020 11:00 am
I am spare time programmer as well :mrgreen:
We know that you are more than that 8-)
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests