[solved] Uniaxial Stress in cylinder using TRANSFORM

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
reox
Posts: 929
Joined: Sat Aug 13, 2016 10:06 am
Contact:

[solved] Uniaxial Stress in cylinder using TRANSFORM

Post by reox »

I would like to create a simple example showing pure uniaxial stress in a cylinder.
The cylinder is fixed at one face and a force is acting on the other face in tension.
However, if you naively fixate all three space directions at the one face, you do not get uniaxial stress. So the idea is to let all nodes move freely in the radial direction and fixate them in the tangential and axial direction of the cylinder.
I recall, that calculix offers the TRANSFORM card in order to create a new local coordinate system. While I have confirmed that this works in principle, by editing the input deck file, I can not get it to work via the GUI.

When I select the mesh and click on the transform tool, I select cylindrical.
When then choosing the face to transform, via Add, I get this error message:
screenshot-20200429_15351588167331.png
screenshot-20200429_15351588167331.png (29.53 KiB) Viewed 1687 times
However, if I select the existing Face in the dialog, I get another error message:
screenshot-20200429_15361588167360.png
screenshot-20200429_15361588167360.png (29.47 KiB) Viewed 1687 times
I guess now, that the first entry ("select a face") shall be the new coordinate system. So naively I assumed to be the cylindrical bottom. But Calculix requires here an axis vector - so presumably it calculates this via the face normal? Or is that the wrong approach?
Btw, selecting the cylindrical face does not work either. Neither do the cylindrical seam line or the face edge.

Attached is my naive solution.
To get to the correct solution, change the BOUNDARY card to the following:

Code: Select all

*TRANSFORM,NSET=ConstraintFixed,TYPE=C
** Cylindrical coordinate system in the Z axis
0.,0.,0.,0.,0.,1.
** 1 --> radial
** 2 --> tangential
** 3 --> axial

*BOUNDARY
** Not constrained in radial direction
**ConstraintFixed,1
ConstraintFixed,2
ConstraintFixed,3
But how is it possible to achieve the same on the GUI?
I thought it might have to do something with the constraining, and also tried a displacement constraint where I predefine the y and z fixed and x free. However, that does also not work.

Code: Select all

OS: Debian GNU/Linux bullseye/sid (i3/i3)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20310 (Git) AppImage
Build type: Release
Branch: master
Hash: 2cac4898d7d62276fbbaaef5b4cecb9bfdd29a33
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: German/Austria (de_AT)
Attachments
naive.FCStd
(6.88 KiB) Downloaded 47 times
Last edited by reox on Sun Jan 29, 2023 12:53 pm, edited 2 times in total.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Uniaxial Stress in cylinder using TRANSFOM

Post by bernd »

this is a great example. I would like to takle this down and add it to the standard examples if you do not mind.

I have found two examples of transform constraints in the forum. Both use the cylinder shell.

screen.png
screen.png (223.88 KiB) Viewed 1670 times

screen1.png
screen1.png (307.33 KiB) Viewed 1670 times
reox
Posts: 929
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: Uniaxial Stress in cylinder using TRANSFOM

Post by reox »

bernd wrote: Wed Apr 29, 2020 3:23 pm this is a great example. I would like to takle this down and add it to the standard examples if you do not mind.
sure, please go ahead ;)

(btw if you wonder why the force constraint has such weird number: it's 20MPa over the whole surface.)
Very interesting is also to modify the element size and see how the histogram changes.
Another thing you can do with the example is to switch out the force constraint with a pressure.
So indeed, a very neat example.
reox
Posts: 929
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: Uniaxial Stress in cylinder using TRANSFORM

Post by reox »

Three years later, just wanted to model something really quick, and I think I have still not understood how the transform GUI tool works :?

I followed the Wiki page (https://wiki.freecadweb.org/FEM_ConstraintTransform) for the constraint transform and wanted to apply a radial constraint.
Therefore, I created a displacement constraint using fixing in X direction to 0.0 (X being the radial direction in the transformed coordinate system) and then applying the constraint transform for a cylindrical coordinate system onto the same face.
However, in the input deck I read the following:

Code: Select all

** Transform Constraints
** ConstraintTransform
*TRANSFORM, NSET=CylinConstraintTransform, TYPE=C
0,0,-12.5,0,0,7.5

** ConstraintDisplacement003
*BOUNDARY
ConstraintDisplacement003,1
But should the BOUNDARY not be set then on the CylinConstraintTransform nodeset?
Or does calculix checks that both CylinConstraintTransform and ConstraintDisplacement003 nodeset are the same nodes and correctly applies the BC?

Edit: But I tested it now on a cylindrical part and it seems to work properly. Here is the example:
Constraint.FCStd
(346.18 KiB) Downloaded 48 times
It can clearly be seen that the cylinder does not move radially, but only axially. Interesting would be to add a rotation to see if the tangential direction works too...

So is the input deck actually correct?!

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
Locale: German/Austria (de_AT)
Installed mods: 
  * Lattice2
  * sheetmetal
User avatar
NewJoker
Veteran
Posts: 3018
Joined: Sun Oct 11, 2020 7:49 pm

Re: Uniaxial Stress in cylinder using TRANSFORM

Post by NewJoker »

reox wrote: Sat Jan 28, 2023 2:35 pm But should the BOUNDARY not be set then on the CylinConstraintTransform nodeset?
Or does calculix checks that both CylinConstraintTransform and ConstraintDisplacement003 nodeset are the same nodes and correctly applies the BC?
As long as the same nodes are included in both node sets, it’s not a problem that they have separate definitions/names. Internally, node numbers are what matters for the solver - they could be even specified directly, without the use of sets.
reox
Posts: 929
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: Uniaxial Stress in cylinder using TRANSFORM

Post by reox »

NewJoker wrote: Sat Jan 28, 2023 6:20 pm
reox wrote: Sat Jan 28, 2023 2:35 pm But should the BOUNDARY not be set then on the CylinConstraintTransform nodeset?
Or does calculix checks that both CylinConstraintTransform and ConstraintDisplacement003 nodeset are the same nodes and correctly applies the BC?
As long as the same nodes are included in both node sets, it’s not a problem that they have separate definitions/names. Internally, node numbers are what matters for the solver - they could be even specified directly, without the use of sets.
Thanks, I see, interesting! Is this a calculix thing? Because I do not remember that this works the same way in Abaqus... Probably have to read more documentation on that though.
I guess the crucial thing is this:
calculix documentation wrote: If several transformations are defined for one and the same node, the last transformation takes effect.
User avatar
NewJoker
Veteran
Posts: 3018
Joined: Sun Oct 11, 2020 7:49 pm

Re: Uniaxial Stress in cylinder using TRANSFORM

Post by NewJoker »

reox wrote: Sun Jan 29, 2023 12:52 pm Thanks, I see, interesting! Is this a calculix thing? Because I do not remember that this works the same way in Abaqus... Probably have to read more documentation on that though.
It’s the same in Abaqus. Sets are used only to simplify the input file syntax. But it all turns down to their contents. In this case, the solver first applies the coordinate system transformation to nodes in set CylinConstraintTransform and then applies a boundary condition to nodes in set ConstraintDisplacement003. Since those are the same nodes as in the previous set, their coordinate system is already transformed and BC is applied properly. Of course, it would be best to use a single node set for both definitions but the preprocessor (FreeCAD in this case) creates those definitions separately thus resulting in duplicated node sets. Nothing to worry about though.
reox
Posts: 929
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: [solved] Uniaxial Stress in cylinder using TRANSFORM

Post by reox »

It was just that I got an unexpected result first and then blamed the input deck :D But with the MWE, it is obvious that it works as expected.
Thanks again for the explanation!
Post Reply