shell to shell contact
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
-
- Veteran
- Posts: 3155
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
shell to shell contact
Hi,
want to calculate the contact between 2 cylinders using 2D shell-elements as described here
https://www.youtube.com/watch?v=cH_leTeGBuA
After writing the case the …contact.inp is empty (see picture). Maybe I do something wrong.
3D-case works
In the end I want to calculate flange to flange contact with 2D-elements and a plastic material like these guys are doing:
https://www.ideastatica.com/steel/
system:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15860 (Git)
Build type: Release
Branch: master
Hash: 3b708c7f84b0425076b520e1d95627b20fd75fe0
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE) bild
want to calculate the contact between 2 cylinders using 2D shell-elements as described here
https://www.youtube.com/watch?v=cH_leTeGBuA
After writing the case the …contact.inp is empty (see picture). Maybe I do something wrong.
3D-case works
In the end I want to calculate flange to flange contact with 2D-elements and a plastic material like these guys are doing:
https://www.ideastatica.com/steel/
system:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15860 (Git)
Build type: Release
Branch: master
Hash: 3b708c7f84b0425076b520e1d95627b20fd75fe0
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE) bild
Re: shell to shell contact
You are right, shell to shell contact is a must have
Unfortunately input writer doesn't support non solid elements ATM
src\Mod\Fem\femsolver\calculix\writer.py line 610
user manual ccx 2.16 page 543, 544 says:
NEG sides aren't selectable by task panel of contact constraint.
Unfortunately input writer doesn't support non solid elements ATM
src\Mod\Fem\femsolver\calculix\writer.py line 610
Code: Select all
f.write("*SURFACE, NAME =" + name + "\n")
v = self.mesh_object.FemMesh.getccxVolumesByFace(ref_shape)
for i in v:
f.write("{},S{}\n".format(i[0], i[1]))
Perhaps restriction to POS should be sufficient.for quadrilateral shell element
• Face NEG or 1: in negative
• Face POS or 2: in positive
• Face 3: 1-2
• Face 4: 2-3
• Face 5: 3-4
• Face 6: 4-1
for triangular shell elements:
• Face NEG or 1: in negative normal direction
• Face POS or 2: in positive normal direction
• Face 3: 1-2
• Face 4: 2-3
• Face 5: 3-1
NEG sides aren't selectable by task panel of contact constraint.
Re: shell to shell contact
expected results?
dirty proof:
src\Mod\Fem\femsolver\calculix\writer.py line 610
Code: Select all
f.write("*SURFACE, NAME =" + name + "\n")
#v = self.mesh_object.FemMesh.getccxVolumesByFace(ref_shape)
#for i in v:
# f.write("{},S{}\n".format(i[0], i[1]))
v = self.mesh_object.FemMesh.getFacesByFace(ref_shape)
for i in v:
f.write("{},S2\n".format(i))
Re: shell to shell contact
A little patch for src/Mod/Fem/femsolver/calculix/writer.pybernd wrote:
to get shell meshes covered.
line 611:
Code: Select all
v = self.mesh_object.FemMesh.getccxVolumesByFace(ref_shape)
if len(v) > 0:
# volume elements found
FreeCAD.Console.PrintLog(
"{}, surface {}, {} touching volume elements found\n"
.format(contact_obj.Label, name, len(v))
)
for i in v:
f.write("{},S{}\n".format(i[0], i[1]))
else:
# try shell elements
v = self.mesh_object.FemMesh.getFacesByFace(ref_shape)
if len(v) > 0:
FreeCAD.Console.PrintLog(
"{}, surface {}, {} touching shell elements found\n"
.format(contact_obj.Label, name, len(v))
)
for i in v:
f.write("{},S2\n".format(i))
else:
FreeCAD.Console.PrintError(
"{}, surface {}, Error: Neither volume nor shell elements found!\n"
.format(contact_obj.Label, name)
)
modified file (if diff doesn't work)
A little test file made from shell elements:
What's your opinion about this
Re: shell to shell contact
If you continue to make such cool contributions I do not care if you use git or not. But it would make things easier even for you!
I will have a look on the weekend ...
cheers bernd
I will have a look on the weekend ...
cheers bernd
Re: shell to shell contact
FreeCAD helps with everything ... Source_code_management
Re: shell to shell contact
The short version ...
create a github account, fork FreeCAD, clone this repo to your local pc, make a new branch shellcontact on your local repo, copy the code (writer.py file), make a commit, push the new branch from your local repo to github and post the address here. If you encounter any problems ask.
create a github account, fork FreeCAD, clone this repo to your local pc, make a new branch shellcontact on your local repo, copy the code (writer.py file), make a commit, push the new branch from your local repo to github and post the address here. If you encounter any problems ask.
Re: shell to shell contact
Re: shell to shell contact
It would be possible to have a face with shell elements and one with tetras. FreeCAD would ust write it to file. Does this makes sense for FEM analyse point of view and does ccx can handle this case?