visualSHysics foamsimulator

Hi to everybody.

I' tryng to use Freecad Pre19 to make some first analysis, and I should like to render results with visualSHysics in Blender.

Anything seams to work well, except FoamSimulator: it fails saying that .xml file isn't of the right release.

Because Freecad add-on release is v4 (or v4.4, I don't know exactly) , is this the problem?

Many thanks

Piero

Comments

  • Hi Piero,

    could you please share a screenshot of the error message?

    Regards!

  • Thank you for your fast replay.


    Here is the copy of command shell (it was made in Ubuntu 18.04, using Blender 2.91):

    I tried two times to start the Run Foam Simulation command, but I don't know why the error message was duplicated for each execution attempt.

    Again, I'm attaching the starting Float2_def.xml file, made using Freecad 0.19 pre.


    ---------------------------------------------------------------------------------------------------------------------------------------------------------

    -pici->blender

    Read prefs: /home/pici/.config/blender/2.91/config/userpref.blend

    found bundled python: /snap/blender/65/2.91/python

    Register

    Read blend: /home/pici/FreeCAD_test/Float2/Float2.blend


    Python: Traceback (most recent call last):

     File "/home/pici/.config/blender/2.91/scripts/addons/VisualSPHysics.py", line 500, in execute

      showPopup("Error: the XML cannot be loaded. Make sure to choose the XML file generated by the gencase tool.", "Error", "ERROR")

     File "/home/pici/.config/blender/2.91/scripts/addons/VisualSPHysics.py", line 194, in showPopup  bpy.context.window_manager.popup_menu(draw, title = title, icon = icon)

     File "/snap/blender/65/2.91/scripts/modules/bpy_types.py", line 159, in popup_menu  draw_func(popup, bpy.context)

     File "/home/pici/.config/blender/2.91/scripts/addons/VisualSPHysics.py", line 193, in draw  self.layout.label(text)

    TypeError: UILayout.label(): required parameter "text" to be a keyword argument!


    location: <unknown location>:-1

    Errore: Python: Traceback (most recent call last):

     File "/home/pici/.config/blender/2.91/scripts/addons/VisualSPHysics.py", line 500, in execute

      showPopup("Error: the XML cannot be loaded. Make sure to choose the XML file generated by the gencase tool.", "Error", "ERROR")

     File "/home/pici/.config/blender/2.91/scripts/addons/VisualSPHysics.py", line 194, in showPopup

      bpy.context.window_manager.popup_menu(draw, title = title, icon = icon)

     File "/snap/blender/65/2.91/scripts/modules/bpy_types.py", line 159, in popup_menu

      draw_func(popup, bpy.context)

     File "/home/pici/.config/blender/2.91/scripts/addons/VisualSPHysics.py", line 193, in draw

      self.layout.label(text)

    TypeError: UILayout.label(): required parameter "text" to be a keyword argument!


    location: <unknown location>:-1



    Python: Traceback (most recent call last):

     File "/home/pici/.config/blender/2.91/scripts/addons/VisualSPHysics.py", line 500, in execute

      showPopup("Error: the XML cannot be loaded. Make sure to choose the XML file generated by the gencase tool.", "Error", "ERROR")

     File "/home/pici/.config/blender/2.91/scripts/addons/VisualSPHysics.py", line 194, in showPopup

      bpy.context.window_manager.popup_menu(draw, title = title, icon = icon)

     File "/snap/blender/65/2.91/scripts/modules/bpy_types.py", line 159, in popup_menu

      draw_func(popup, bpy.context)

     File "/home/pici/.config/blender/2.91/scripts/addons/VisualSPHysics.py", line 193, in draw

      self.layout.label(text)

    TypeError: UILayout.label(): required parameter "text" to be a keyword argument!


    location: <unknown location>:-1

    Errore: Python: Traceback (most recent call last):

     File "/home/pici/.config/blender/2.91/scripts/addons/VisualSPHysics.py", line 500, in execute

      showPopup("Error: the XML cannot be loaded. Make sure to choose the XML file generated by the gencase tool.", "Error", "ERROR")

     File "/home/pici/.config/blender/2.91/scripts/addons/VisualSPHysics.py", line 194, in showPopup

      bpy.context.window_manager.popup_menu(draw, title = title, icon = icon)

     File "/snap/blender/65/2.91/scripts/modules/bpy_types.py", line 159, in popup_menu

      draw_func(popup, bpy.context)

     File "/home/pici/.config/blender/2.91/scripts/addons/VisualSPHysics.py", line 193, in draw

      self.layout.label(text)

    TypeError: UILayout.label(): required parameter "text" to be a keyword argument!


    location: <unknown location>:-1

  • Hi Piero, I think that the problem is that you are using the Float2_Def.xml file instead of the Float2.xml file generated by the gencase tool. The second one has some calculated constants needed for the foam simulation.

  • Hi to everybody,

    I tried again in these days, but th answer is always the same (loot at the attache picture).

    This time I'm sure that I used the right .xml file, calculated by Gencase rev. 5.03.

    Perhaps the difficulty is created because I built the case in Freecad:

    1) I built the case in Freecad and I used Gencase and run the case by Freecad Interface

    2) I used an external script to calcolate all post-processing files

    3) finally I went to Blender to load al needed files

    But it still doesn't work !!! 😭

    Thank you again


  • @Orlando may help here

  • Hi Alex,

    sorry, but I don't understand: what could I do? can I write directly to Orlando?

    Many thanks

    Piero

  • I mention orlando here so he should receive notification about this message...

    Other option is to contact him directly if you want: orlando@uvigo.es


    Regards

  • edited May 2021

    Hi to all.

    Perhaps I found the problem: the file Float2_Def.xml  generated by Freecad interface begins with a comment line, like this:

    <!-- Case name: Float2 -->

    and this first row is copied to the file Float2.xml created Float2_out directory: to perform a correct foam calculation is enough to delete this first row saving the file again.

    And this is all.

    Just a suggestion: is it possible to avoid to write this first row during GenCase phase in Freecad?

    Many thanks to everybody. Regards

    p.s. How is possible to write "SOLVED" near to the title?

  • Nice work @pier_1251! I had given up on the foam simulator tool, since I couldn't get it to work

    I just wonder what my issue might have been then, since I am not using FreeCAD for generating the models. Perhaps I will look into my case again some time.

    Also I do not think it is possible to write "SOLVED" near the title as of now, but perhaps could be a nice addition to the forum @Alex ?

    Kind regards

Sign In or Register to comment.