FEM solver in detail (nodal force distribution)

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
hex41434
Posts: 12
Joined: Mon Mar 01, 2021 11:03 am

FEM solver in detail (nodal force distribution)

Post by hex41434 »

Hi everyone! I am a little familiar with FEM in freecad, and for my research, I need to export a matrix from the FEM module, which might sound a bit strange to you! :roll:

in FEM we have: F=KD (Force Matrix, Stiffness and Displacement)
F is a matrix that represents Force for all nodes of the fem mesh. ( I think it is called nodal force distribution) this matrix should be calculated in the algorithm, and later, the K matrix will be made, to produce output D (displacement of nodes).

for some reason, I need the force vector which is applied on all nodes. (not the reaction force/ nor stress/ nor strain--> these are the outputs of FEM which I do not need!)

I believe F is made somewhere inside freecad (and all other fem simulators) unfortunately I could not find it inside the code.

anyone can help me to find it? :)
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM solver in detail (nodal force distribution)

Post by bernd »

Hi and welcome to FreeCAD FEM. You can not find it in FreeCAD.

FreeCAD is just a FEM pre- and post processor. The solver which generates the matrixes is a separate binary which is called by FreeCAD. If you would like to have these matrices you would need to get into the solvers. The solver supported and included in FreeCAD ATM are ElmerFem, Z88 and CalculiX. You would need to get in touch with the devs of one of these solvers. Or my be the calculix mailing list?

If you double click on the solver object in tree view, click on write and on edit you will see the solver file. What you could do is use this solver input file and run the solver binary with this file.

Which operating system are you on?

cheers bernd
hex41434
Posts: 12
Joined: Mon Mar 01, 2021 11:03 am

Re: FEM solver in detail (nodal force distribution)

Post by hex41434 »

Thanks a lot for your fast and accurate reply. I created a FEM simulation in FreeCAD python API (on Linux) and used calculix as the solver.

so, do you think I can find it in pycalculix? ( I need to return F matrix as output inside my python code)
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM solver in detail (nodal force distribution)

Post by bernd »

hex41434 wrote: Tue Jul 20, 2021 9:18 pm Thanks a lot for your fast and accurate reply. I created a FEM simulation in FreeCAD python API (on Linux) and used calculix as the solver.

so, do you think I can find it in pycalculix? ( I need to return F matrix as output inside my python code)
no I do not think so. AFAIK pycalculix is a library to create Calculix solver input files. Are you able to run ccx stand alone with your solver inputfile? If yes you should ask on Calculix forum here https://calculix.discourse.group/
hex41434
Posts: 12
Joined: Mon Mar 01, 2021 11:03 am

Re: FEM solver in detail (nodal force distribution)

Post by hex41434 »

Thanks a lot Bernd! I really appreciate!
Post Reply