Fem constraint contact

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
PrzemoF
Posts: 2627
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Fem constraint contact

Postby PrzemoF » Wed Jun 22, 2016 1:06 pm

Welcome to the forum!!

Please push to the master anything that is ready, no matter how small is the change. It makes it way easier for the other devs to work in the same area.
If you need a detailed instruction how to get your code into the master I'll be happy to help you.
User avatar
bernd
Posts: 8247
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Fem constraint contact

Postby bernd » Wed Jun 22, 2016 3:54 pm

PrzemoF wrote:Welcome to the forum!!
Please push to the master anything that is ready, no matter how small is the change. It makes it way easier for the other devs to work in the same area.
If you need a detailed instruction how to get your code into the master I'll be happy to help you.
It has not been ready, that's the problem. He is one of the guys from eskom. I have been in kontact with them for a few days now. We hopefully will get the stuff into master soon. They did not make small changes, they did make HUGE changes. That is why the code was splitted.

@vdwalts
I will have a look.
User avatar
bernd
Posts: 8247
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Fem constraint contact

Postby bernd » Wed Jun 22, 2016 4:00 pm

vdwalts wrote:Hello, this is now split into three sections which are all working.
1: Thermo-mechanical analysis
2: Contact constraint
3: Plane-rotation constraint

https://github.com/makkemal/FreeCAD/tree/rtd_vdwalts

Work in progress: 4: Split of input file writer

Tested up till point 3.

Thermo-mechanical added a number of quantities. Please explain the problem with unit tests so that it can be addressed.
Still there are too much changes at once. It will break lot's of stuff in FEM. I have said it so many times. Let's get the stuff into master step by step. First the contact and the Plane-rotation constraint. I have provided a branch. See https://github.com/berndhahnebach/FreeC ... femcontact This one is ready to merge into master but has some small problems which needs to be solved. If you would help to work on this branch we could get the contact constraint and the plane rotation constraint into master soon.

@Prezemo: just have a look at https://github.com/makkemal/FreeCAD/com ... 251cb201fc and you know what I'm talking about.
User avatar
PrzemoF
Posts: 2627
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Fem constraint contact

Postby PrzemoF » Wed Jun 22, 2016 4:22 pm

bernd wrote:[..]@Przemo: just have a look at https://github.com/makkemal/FreeCAD/com ... 251cb201fc and you know what I'm talking about.
OK, 71 files in one commit is a deal breaker for me. Bisecting it later is impossible. After a quick scan I see that all types of changes are just mashed together.. typo fixes, renames.

Is it safe to use that path in include?

Code: Select all

+#include "Mod/Fem/App/FemConstraintFixed.h"
User avatar
bernd
Posts: 8247
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Fem constraint contact

Postby bernd » Wed Jun 22, 2016 4:27 pm

Exactly that is why I extracted the constraint contact and constraint plane rotation into a separate branch:
https://github.com/berndhahnebach/FreeC ... femcontact

That is the one we should work with!
User avatar
bernd
Posts: 8247
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Fem constraint contact

Postby bernd » Thu Jun 23, 2016 5:51 am

updated the branch:
https://github.com/berndhahnebach/FreeC ... femcontact

constraint contact and constraint plane rotation run and give results. But I get not the results I would expect. Some examples are needed.
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Fem constraint contact

Postby makkemal » Thu Jun 23, 2016 8:17 am

Hi Bernd

Here is a quick example in which the contact seems to be working.(on your branch)
It clearly picks up the contact in the movement.

Contact stresses are always inaccurate if you use a elastic material model. You can only get reasonable results with non-linear plastic material models.
So with elastic model the higher you set the contact stiffness the higher the stresses will be (it has no meaning)
With contact you are usually only interested in the influence on movement.
That part seem fine in your branch.

The plane rotation has some issues. The plane rotation uses a Multi point constraint (MPC) to keep the selected nodes in a plane.
With MPC's the used nodes cannot have any other constraint applied to them. The temporary conflict.txt file is use to determine node (for instance on edge ) which belong to both MPC and other constraint and remove them from the MPC. This does not seem to be working in your branch.

Stephan had the same issue, I think the fixes are in his post from yesterday. Unfortunately the two people that did this is on some HR training for the rest of the week so I will only be able to ask them on Monday. Point 4 of Stefan's commit is also working now

Regards
Michael
Attachments
beam_bend_contact.fcstd
(58.05 KiB) Downloaded 33 times
User avatar
bernd
Posts: 8247
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Fem constraint contact

Postby bernd » Thu Jun 23, 2016 10:02 am

Thanks michael for all the informations and the example. I'll have a look. I can compare the input files generated by my branch and generated by the branch of wdvalts.
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Fem constraint contact

Postby makkemal » Thu Jun 23, 2016 2:06 pm

I can compare the input files generated by my branch and generated by the branch of wdvalts.
Just add a plane rotation constraint to the end of the beam
User avatar
bernd
Posts: 8247
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Fem constraint contact

Postby bernd » Fri Jun 24, 2016 6:03 am

https://github.com/berndhahnebach/FreeC ... femcontact
Find an updated version of constraint contact and constraint plane rotation. I got rid of the temporary files you guy where writing. FreeCADs FEM python API has all what is needed. Should be pretty much faster and save. We are getting somewhere ! :D From my point of view we only need to test. Would you guys check if my branch creates the same CalculiX input file like yours without the input file splitting?

Find attached a link to the file I have been testing with. https://cloud.woelkli.com/index.php/s/gKiLJvUy0hAUkx5

BTW:
If I write an input file with the following branch with the test file (seams your latest branch) I get an error:

Code: Select all

https://github.com/makkemal/FreeCAD/tree/rtd_vdwalts
git log -1
commit 5c3881d7412932ddad7bc4d63b7c9fc5cbde5556
Author: vdwalts <vdwalts>
Date:   Wed Jun 22 15:04:23 2016 +0200

    FEM: Fix for Thermo-Mechanical Version 4: Part 4: Splitting of input file writing in FemInputWriterCcx.py

Code: Select all

raceback (most recent call last):
  File "/home/hugo/Documents/dev/freecad/freecadbhb_makkemal/build/Mod/Fem/_TaskPanelFemSolverCalculix.py", line 193, in write_input_file_handler
    fea.write_inp_file()
  File "/home/hugo/Documents/dev/freecad/freecadbhb_makkemal/build/Mod/Fem/FemToolsCcx.py", line 86, in write_inp_file
    import FemInputWriterCcx as iw
  File "/home/hugo/Documents/dev/freecad/freecadbhb_makkemal/build/Mod/Fem/FemInputWriterCcx.py", line 51, in <module>
    members=FreeCAD.ActiveDocument.Analysis.Member
AttributeError: 'App.Document' object has no attribute 'Analysis'