[Ticket #4617] Virtual elements

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

[Ticket #4617] Virtual elements

Post by Pauvres_honteux »

Hi, the other day I got the idea of simulating a thing I did at work to see how it compared to FreeCAD FEM.
To simulate it in the same way I must use a few virtual elements, but I could not find out how to create them.
Are there not any virtual elements present in FEM as of now? (I'm interested in ALL types of virtual elements, not just fasteners)
.
Virtual_element_to_point_1.JPG
Virtual_element_to_point_1.JPG (107.88 KiB) Viewed 4846 times
.
Virtual_element_to_point_2.gif
Virtual_element_to_point_2.gif (3.31 KiB) Viewed 4846 times
.
Virtual_element_to_point_3.gif
Virtual_element_to_point_3.gif (2.1 KiB) Viewed 4846 times
.
Creating Virtual Bolt Tightening Connection Properties
.

Code: Select all

OS: openSUSE Leap 15.1 (KDE//usr/share/xsessions/default)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19. (build time: 2020-01-02 08:56:40 by obs://build.opensuse.org/science:unstable)
Build type: Release
Python version: 3.6.5
Qt version: 5.9.7
Coin version: 4.0.0a
OCC version: 7.4.1.dev
Last edited by Pauvres_honteux on Wed Sep 01, 2021 8:36 am, edited 3 times in total.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Virtual elements

Post by bernd »

ther is no such virtual element in FreeCAD FEM. But ccx supports a wide range of them. Means if you would accept to edit the input file you could just use another constraint in FreeCAD anx edit the input file.
User avatar
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Re: Virtual elements

Post by Pauvres_honteux »

bernd wrote: Sun Jan 05, 2020 3:03 pm There are no such virtual element in FreeCAD FEM.
.
Oh, bummer!
How about a feature request? Would it be okey?
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Virtual elements

Post by bernd »

Pauvres_honteux wrote: Mon Jan 06, 2020 6:31 am
bernd wrote: Sun Jan 05, 2020 3:03 pm There are no such virtual element in FreeCAD FEM.
.
Oh, bummer!
How about a feature request? Would it be okey?
Sure make a mandis entry and put a link on this topic.A simple specific ccx input file example would be good point to start with.
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: Virtual elements

Post by UR_ »

Some discussion on this a while ago in FEM forum


https://forum.freecadweb.org/viewtopic. ... rigid+body
User avatar
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Re: Virtual elements

Post by Pauvres_honteux »

@ UR: I knew I had seen it somewhere, but I couldn't find it. Thanks for the link!
.
@ bernd: I'll fix a feature request.
User avatar
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Re: Virtual elements

Post by Pauvres_honteux »

Well that didn't turn out so well...
The blue dot is supposed to be connected to the cylindrical hole/wall via a virtual element.
.
Virtual_element_1.png
Virtual_element_1.png (87.07 KiB) Viewed 4714 times
Virtual_element_2.png
Virtual_element_2.png (162.19 KiB) Viewed 4714 times
Virtual_element_3.png
Virtual_element_3.png (71.35 KiB) Viewed 4714 times
.

Code: Select all

Active analysis found: Analysis
  ElementDimension: 3
  Group meshing for analysis.
Problem: For the geometry of the following shape was no Shape found: <Vertex object at 0x55beefb01ba0>
    ConstraintForce
    [(<Part::PartFeature>, ('Vertex1',))]
    Vertex
The reference Shape is not a child nor it is the shape the mesh is made of. : <Vertex object at 0x55beefb01ba0>
Fusion--> Name of the Feature we where searching in.
Vertex --> Name of the parent Feature of reference Shape (Use the same as in the line before and you will have less trouble :-) !!!!!!).
  Empty reference: MechanicalSolidMaterial
  One material with no reference shapes. No need to make a group for materials.
Error: The shapes for the mesh group for the reference shapes of analysis member: ConstraintForce could not be found!
  {'ConstraintFixed': ['Face1', 'Face3', 'Face4'], 'ConstraintForce': []}
  /tmp/fcfem_ekyon8oy/Fusion_Geometry.brep
  /tmp/fcfem_ekyon8oy/Fusion_Mesh.unv
  /tmp/fcfem_ekyon8oy/shape2mesh.geo
  /usr/bin/gmsh
Unexpected error when creating mesh:  <class 'IndexError'>

Code: Select all

FEM mesh has neither volume nor shell or edge elements. Provide a FEM mesh with elements!
No YoungsModulus defined for at least one material.
No PoissonRatio defined for at least one material.
.
FEM_virtual_element.FCStd
(18.55 KiB) Downloaded 94 times
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Virtual elements

Post by bernd »

I like very simple examples :D thus I made it even simpler ... It can not work because the vertex is missing in the mesh, but FreeCAD hangs, what shold not happen ... I will have a look on this.

Code: Select all

CalxuliX ccx tools solver!
MechanicalSolidMaterial has empty References.
ConstraintFixed has Face reference shapes.
ConstraintForce has Vertex reference shapes.
Check prerequisites.
MechanicalSolidMaterial has empty References.
Start writing CalculiX input file
writerbaseCcx --> self.file_name  -->  /tmp/fcfem_4744m4tx/FEMMeshGmsh.inp
Constraint fixed: ConstraintFixed
  Finite element mesh nodes will be retrieved by searching the appropriate nodes in the finite element mesh.
  ReferenceShape ... Type: Face, Object name: Box, Object label: Cube, Element name: Face4
Constraint force: ConstraintForce
  Finite element mesh nodes will be retrieved by searching the appropriate nodes in the finite element mesh.
  The appropriate finite element mesh node load values will be calculated according to the finite element definition.
  ReferenceShape ... Type: Vertex, Object name: Vertex, Object label: Vertex, Element name: Vertex1
Unexpected error when writing CalculiX input file: <class 'IndexError'>
Running the Python command 'FEM_SolverRun' failed:
Traceback (most recent call last):
  File "/usr/local/Mod/Fem/femcommands/commands.py", line 1059, in Activated
    run_fem_solver(self.selobj)
  File "/usr/local/Mod/Fem/femsolver/run.py", line 101, in run_fem_solver
    fea.run()
  File "/usr/local/Mod/Fem/femtools/ccxtools.py", line 1004, in run
    self.write_inp_file()
  File "/usr/local/Mod/Fem/femtools/ccxtools.py", line 755, in write_inp_file
    self.inp_file_name = inp_writer.write_calculix_input_file()
  File "/usr/local/Mod/Fem/femsolver/calculix/writer.py", line 114, in write_calculix_input_file
    self.write_calculix_one_input_file()
  File "/usr/local/Mod/Fem/femsolver/calculix/writer.py", line 196, in write_calculix_one_input_file
    self.write_constraints_force(inpfile)
  File "/usr/local/Mod/Fem/femsolver/calculix/writer.py", line 1096, in write_constraints_force
    self.get_constraints_force_nodeloads()
  File "/usr/local/Mod/Fem/femsolver/writerbase.py", line 276, in get_constraints_force_nodeloads
    frc_obj
  File "/usr/local/Mod/Fem/femmesh/meshtools.py", line 775, in get_force_obj_vertex_nodeload_table
    (elem_info_string, {node[0]: node_load / node_count})

list index out of range
FEM_virtual_element_simple.FCStd
(32.74 KiB) Downloaded 90 times

OS: Debian GNU/Linux 10 (buster) (KDE//usr/share/xsessions/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19160 (Git)
Build type: Unknown
Branch: master
Hash: 4f56a64ace6e5a72394aa71e44fdbc3c85337989
Python version: 3.7.3
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Switzerland (de_CH)
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Virtual elements

Post by bernd »

bernd wrote: Mon Jan 06, 2020 9:48 pm ... but FreeCAD hangs, what shold not happen ... I will have a look on this.
git commit 1b2a9a9
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Virtual elements

Post by bernd »

What does a virtual element needs? An mesh face element, an mesh line element or an mesh point?
Post Reply