Page 1 of 1

[solved] Can't install DesignSPHysics via Addon-Manager

Posted: Thu Jan 19, 2023 2:50 pm
by shIxx
Hello community,

when I try to install DesignSPHysics via the addon manager, the WB is first downloaded (approx. 80mb) then unpacked and then the message "DesignSPHysics was successfully installed from the zip file" appears. But FreeCAD does not prompt me to restart and the following is displayed in the output window:

Code: Select all

15:31:26  Addon Developer Warning: Repository URL set in package.xml file for addon Curves workbench (https://github.com/tomate44/CurvesWB) does not match the URL it was fetched from (https://github.com/JMG1/ExplodedAssembly)
15:31:26  Addon Developer Warning: Repository branch set in package.xml file for addon freecad.gears workbench (develop) does not match the branch it was fetched from (master)
15:31:27  Git Python Befehl konnte nicht ausgeführt werden: Prüfe die Installation von GitPython und/oder git
15:31:49  Traceback (most recent call last):
15:31:49    File "C:\Program Files\FreeCAD 0.20\Mod\AddonManager\addonmanager_workers.py", line 916, in run
15:31:49      self.macro.fill_details_from_wiki(url)
15:31:49    File "C:\Program Files\FreeCAD 0.20\Mod\AddonManager\addonmanager_macro.py", line 315, in fill_details_from_wiki
15:31:49      self.clean_icon()
15:31:49    File "C:\Program Files\FreeCAD 0.20\Mod\AddonManager\addonmanager_macro.py", line 341, in clean_icon
15:31:49      with open(constructed_name, "wb") as f:
15:31:49  OSError: [Errno 22] Invalid argument: 'C:\\Users\\thoma\\AppData\\Local\\Temp\\FreeCAD\\Cache\\AddonManager\\MacroIcons\\120px-FCBmpImportScreenshot.png?20210923163201'
15:31:52  Syntax error while reading __files__ from macro AeroFoil
15:31:52  __Files__         = "AeroFoil_UI_Files/AeroFoil_Initial_Dialog.ui, AeroFoil_UI_Files/AeroFoil_NACA4Digit_Dialog.ui, \

15:31:54  Traceback (most recent call last):
15:31:54    File "C:\Program Files\FreeCAD 0.20\Mod\AddonManager\addonmanager_workers.py", line 916, in run
15:31:54      self.macro.fill_details_from_wiki(url)
15:31:54    File "C:\Program Files\FreeCAD 0.20\Mod\AddonManager\addonmanager_macro.py", line 315, in fill_details_from_wiki
15:31:54      self.clean_icon()
15:31:54    File "C:\Program Files\FreeCAD 0.20\Mod\AddonManager\addonmanager_macro.py", line 341, in clean_icon
15:31:54      with open(constructed_name, "wb") as f:
15:31:54  OSError: [Errno 22] Invalid argument: 'C:\\Users\\thoma\\AppData\\Local\\Temp\\FreeCAD\\Cache\\AddonManager\\MacroIcons\\Macro_makeCube.png?20110801163602'
15:31:54  Traceback (most recent call last):
15:31:54    File "C:\Program Files\FreeCAD 0.20\Mod\AddonManager\addonmanager_workers.py", line 916, in run
15:31:54      self.macro.fill_details_from_wiki(url)
15:31:54    File "C:\Program Files\FreeCAD 0.20\Mod\AddonManager\addonmanager_macro.py", line 315, in fill_details_from_wiki
15:31:54      self.clean_icon()
15:31:54    File "C:\Program Files\FreeCAD 0.20\Mod\AddonManager\addonmanager_macro.py", line 341, in clean_icon
15:31:54      with open(constructed_name, "wb") as f:
15:31:54  OSError: [Errno 22] Invalid argument: 'C:\\Users\\thoma\\AppData\\Local\\Temp\\FreeCAD\\Cache\\AddonManager\\MacroIcons\\Macro_Site_From_Contours.png?20190704172250'
15:31:56  Traceback (most recent call last):
15:31:56    File "C:\Program Files\FreeCAD 0.20\Mod\AddonManager\addonmanager_workers.py", line 916, in run
15:31:56      self.macro.fill_details_from_wiki(url)
15:31:56    File "C:\Program Files\FreeCAD 0.20\Mod\AddonManager\addonmanager_macro.py", line 315, in fill_details_from_wiki
15:31:56      self.clean_icon()
15:31:56    File "C:\Program Files\FreeCAD 0.20\Mod\AddonManager\addonmanager_macro.py", line 341, in clean_icon
15:31:56      with open(constructed_name, "wb") as f:
15:31:56  OSError: [Errno 22] Invalid argument: 'C:\\Users\\thoma\\AppData\\Local\\Temp\\FreeCAD\\Cache\\AddonManager\\MacroIcons\\Centericon.png?20210619192700'
After restarting FC, DesignSPHysics is not visible in the WB-dropdown-menu.
I have no idea what's going wrong

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.2.29177 +426 (Git)
Build type: Release
Branch: (HEAD detached from 0.20.2)
Hash: 930dd9a76203a3260b1e6256c70c1c3cad8c5cb8
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods: 
  * 3D_Printing_Tools
  * boltsfc 2022.11.5
  * CfdOF 1.21.3
  * Curves 0.6.5
  * Defeaturing 1.2.0
  * DesignSPHysics 0.6.3(24-09-2022)
  * EM
  * ExplodedAssembly 0.6.5
  * fasteners 0.4.54
  * FEMbyGEN 1.2.0
  * FEM_FrontISTR 0.1.0
  * freecad.gears 1.0.0
  * IconThemes
  * PieMenu 1.2.4
  * Render 2022.4.0
  * sheetmetal 0.2.60
  * SP_Startup

Re: Can't install DesignSPHysics via Addon-Manager

Posted: Thu Jan 19, 2023 4:37 pm
by thschrader
shIxx wrote: Thu Jan 19, 2023 2:50 pm ...
After restarting FC, DesignSPHysics is not visible in the WB-dropdown-menu.
I have no idea what's going wrong
...
DesignSPhysics is a macro, not a workbench.
See here:
https://github.com/DualSPHysics/DesignSPHysics
sphmacro.JPG
sphmacro.JPG (28.42 KiB) Viewed 4670 times

Re: Can't install DesignSPHysics via Addon-Manager

Posted: Thu Jan 19, 2023 5:38 pm
by chennes
Which is also why you are not prompted to restart: you don’t need to.

Re: Can't install DesignSPHysics via Addon-Manager

Posted: Sun Jan 22, 2023 9:56 am
by shIxx
thschrader wrote: Thu Jan 19, 2023 4:37 pm DesignSPhysics is a macro, not a workbench.
See here:
https://github.com/DualSPHysics/DesignSPHysics
sphmacro.JPG
Thanks for the quick reply.
DualSPHysics can be found under Workbenches in the Addon Manager. I also read that it is a macro.
But it is strange that it does not appear under the macros either.
There is a folder in ..../Mods but nothing appears in FreeCAD.

Re: Can't install DesignSPHysics via Addon-Manager

Posted: Mon Jan 23, 2023 7:31 am
by thschrader
shIxx wrote: Sun Jan 22, 2023 9:56 am Thanks for the quick reply.
DualSPHysics can be found under Workbenches in the Addon Manager. I also read that it is a macro.
But it is strange that it does not appear under the macros either.
There is a folder in ..../Mods but nothing appears in FreeCAD.
Can you try the manual installation as described here:
https://github.com/DualSPHysics/DesignSPHysics

Do steps 1+2, after that you should find the designsphysics-macro in the macro-dialog.
Start macro. Attention: macro-start kills your previous session, you must built your geometry inside the
macro (or importing it).
designsphysics_install.JPG
designsphysics_install.JPG (117.03 KiB) Viewed 4422 times

Re: Can't install DesignSPHysics via Addon-Manager

Posted: Mon Jan 23, 2023 7:37 am
by thschrader
zip contains 3 test-cases:
testCases.zip
(283.56 KiB) Downloaded 57 times

Re: Can't install DesignSPHysics via Addon-Manager

Posted: Mon Jan 23, 2023 11:50 am
by shIxx
thschrader wrote: Mon Jan 23, 2023 7:31 am Can you try the manual installation as described here:
https://github.com/DualSPHysics/DesignSPHysics
As I said in the beginning, the message "DesignSPHysics was successfully installed from the zip file" was shown after installed via addon-manager and DesignSPHysics is in the Mod folder. All I had to do was to copy DesignSPHysics.FcMacro from Mod to Macro folder. And it seems to be working now.

Only the DamBreak case ends in an error, but that's due to the case itself I think as the other two are working:

Code: Select all

*** Exception (JSphGpuSingle::LoadDemData) at ..\source\JSph.cpp:1181
Text: Object mk=10 (mkbound=0) - Value of Kfric is invalid.

Finished execution (code=1).
Thanks!

Re: Can't install DesignSPHysics via Addon-Manager

Posted: Mon Jan 23, 2023 12:29 pm
by thschrader
shIxx wrote: Mon Jan 23, 2023 11:50 am ...
Only the DamBreak case ends in an error, but that's due to the case itself I think as the other two are working:
...
Oh, sorry.

In "Execution Parameters" change Solid-solid interaction to "SPH".
In model-tree klick on obstacle, "Float state ==> configure" and adjust degrees of freedom.
Now it should work.

The watermill case is based on this tutorial:
https://www.youtube.com/watch?v=AqxzzF9REcw
change_parameters.JPG
change_parameters.JPG (49.89 KiB) Viewed 4323 times
trainingday.JPG
trainingday.JPG (121.8 KiB) Viewed 4323 times

Re: Can't install DesignSPHysics via Addon-Manager

Posted: Mon Jan 23, 2023 8:38 pm
by shIxx
thschrader wrote: Mon Jan 23, 2023 12:29 pm In "Execution Parameters" change Solid-solid interaction to "SPH".
In model-tree klick on obstacle, "Float state ==> configure" and adjust degrees of freedom.
Now it should work.
Thanks,.. everything is working now