beam analysis with beams in z-direction

About the development of the FEM module/workbench.

Moderator: bernd

UR_
Posts: 1188
Joined: Tue Jan 03, 2017 8:42 pm

Re: beam analysis with beams in z-direction

Postby UR_ » Thu Oct 12, 2017 5:42 pm

Above described method (definition by BEAM SECTION) fails on this example, because beam no 3 (from X0,Y0,Z10 to X10,Y0,Z10) elongates along x-axis.

Screenshot beamcube.png
Screenshot beamcube.png (10.68 KiB) Viewed 583 times

So you have to define for each beam its own definition of cross section. That really bad :o

mkraska's version (yellow)
2nd version (green)
ccx 2.12 page 100.png
ccx 2.12 page 100.png (223.87 KiB) Viewed 583 times

With 2nd version one can define one cross section on different nodes in different ways
But of course orientation of cross section has to be obtained by model's data and a line has no orientation by this meaning
Therefore every line needs a tripod. :roll:

File:
cubeBeamTest.FCStd
(16.6 KiB) Downloaded 17 times
User avatar
FemUser
Posts: 133
Joined: Wed Aug 23, 2017 6:45 pm

Re: beam analysis with beams in z-direction

Postby FemUser » Thu Oct 12, 2017 5:45 pm

The element is aligned to the t direction from fig. 66. In the problem the element can be aligned to an axis or a combination of axis. The error happens when we have beams which have an angle that is in the z direction in some way (XYZ, XZ, YZ and ZZ)

Certain cases will come up for the 1 beam example:

Test with 1 beam

From the origin to 10
Beam is aligned with ZZ -> 1.,0.,0. worked
Beam is diagonal ZX -> worked without adding nothing
Beam is diagonal ZY -> worked without adding nothing
Beam is on all planes XYZ -> worked without adding nothing

I also tried it off the origin starting from (10,0,0); (0,10,0) and did not see the error.

I tested the 3 beam example

The 3 beam example gives an error, however if I delete the horizontal and vertical bars and keep the diagonal the error goes away and I don't need to change the .inp file.

It looks like the 1 beam example is not enough since I could not replicate the same error.

I will double check later (maybe I did something wrong)
User avatar
FemUser
Posts: 133
Joined: Wed Aug 23, 2017 6:45 pm

Re: beam analysis with beams in z-direction

Postby FemUser » Thu Oct 12, 2017 5:46 pm

Bernd, UR_ thanks for the help!
User avatar
bernd
Posts: 10509
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: beam analysis with beams in z-direction

Postby bernd » Thu Oct 12, 2017 6:07 pm

damn it is much more difficault than I thought. The cube from lines is a good example. Using a rectangle profile instead a square and use 3D results should show the problem ...

Good I did not start earlier with this .... :mrgreen: I would have been run into big trouble ...
User avatar
FemUser
Posts: 133
Joined: Wed Aug 23, 2017 6:45 pm

Re: beam analysis with beams in z-direction

Postby FemUser » Thu Oct 12, 2017 7:10 pm

A beam section for each would give something like this:

** Element sets for materials and FEM element type (solid, shell, beam, fluid)
** written by write_element_sets_material_and_femelement_type function
*ELSET,ELSET=Mat0Beam0
7,
X.,Y.,Z.
*ELSET,ELSET=Mat0Beam1
1,
X.,Y.,Z.
*ELSET,ELSET=Mat0Beam2
2,
X.,Y.,Z.

(...)

and would go on until all beams are here...

Things I think would be necessary:
Instead of bundling them into one entry when no line is selected in the beam cross-section icon, we need to generate them individually.
On all individual beam we should define the correct (x.,y.,z.)

Missing now is the algorithm to pick a element direction node P1 (X1,Y1,Z1)->P2(X2,Y2,Z2) that forms a element E1 and will require the correct normal point. I am considering a fixed n1 so we get to play with n2 adapting to the element in hand.
User avatar
FemUser
Posts: 133
Joined: Wed Aug 23, 2017 6:45 pm

Re: beam analysis with beams in z-direction

Postby FemUser » Thu Oct 12, 2017 7:12 pm

I think I got it. Maybe a bit of algebra can help here.
User avatar
FemUser
Posts: 133
Joined: Wed Aug 23, 2017 6:45 pm

Re: beam analysis with beams in z-direction

Postby FemUser » Fri Oct 13, 2017 6:58 am

A bit of algebra helps here. I started with a 2D experiment with the dot product of two vectors one aligned with the element and a normal vector. P1 and P2.
IMG_2031.JPG
IMG_2031.JPG (319.27 KiB) Viewed 546 times
Afterwards I did a 3D experiment:
IMG_2032.JPG
IMG_2032.JPG (302.87 KiB) Viewed 546 times
A possible algorithm:

1. Have a list with all beam elements
2. Have a connection between the 2 points that make up the beam element
3. The normal vector is calculated for each element ni(-(a2+a3)/a1),1,1); i:1 to last element
4. place n bellow current single beam information

Points
P1(x1,y1,z1)
P2(x2,y2,z2)

vector
a->P1P2-> (a1,a2,a3)
b->normal->n

Example P1 (1,1,1) and P2 (2,2,2)
a->(2-1,2-1,2-1)->(1,1,1)

n should be (-2,1,1)

if the dot product is zero then two vectors are normal so let's be sure

1*(-2) + 1*1 + 1*1 = 0
-2 +2 = 0
0 = 0

Next will try to make a python script...
User avatar
FemUser
Posts: 133
Joined: Wed Aug 23, 2017 6:45 pm

Re: beam analysis with beams in z-direction

Postby FemUser » Fri Oct 13, 2017 8:15 am

When I say have a connection in 2. it is basically to know what points are related to a specific element since we need these to generate the starting vector.
User avatar
FemUser
Posts: 133
Joined: Wed Aug 23, 2017 6:45 pm

Re: beam analysis with beams in z-direction

Postby FemUser » Fri Oct 13, 2017 9:27 am

And here is the normal calculator:

P1x = 1;
P1y = 1;
P1z = 1;

P2x = 2;
P2y = 2;
P2z = 2;

P1 = [];
P2 = [];

P1 = [P1x,P1y,P1z];
P2 = [P2x,P2y,P2z];

vector_a = [P2x-P1x,P2y-P1y,P2z-P1z];
normal_n = [-(vector_a[1]+vector_a[2])/vector_a[0],1,1];

Dot_product_check = vector_a[0]*normal_n[0]+vector_a[1]*normal_n[1]+vector_a[2]*normal_n[2];

So. What are the next steps now? :)
Attachments
beam_normal_generator.py
(416 Bytes) Downloaded 17 times
User avatar
FemUser
Posts: 133
Joined: Wed Aug 23, 2017 6:45 pm

Re: beam analysis with beams in z-direction

Postby FemUser » Fri Oct 13, 2017 1:34 pm

Made some adjustments to the algorithm.

P1x = 0;
P1y = 0;
P1z = 0;

P2x = 10;
P2y = 0;
P2z = 0;

P1 = [];
P2 = [];

P1 = [P1x,P1y,P1z];
P2 = [P2x,P2y,P2z];

vector_a = [P2x-P1x,P2y-P1y,P2z-P1z];


if vector_a[0] != 0:
normal_n = [-(vector_a[1]+vector_a[2])/vector_a[0],1,1];
elif vector_a[1] != 0 and vector_a[0]==0:
normal_n = [1,-(vector_a[0]+vector_a[2])/vector_a[1],1];
elif vector_a[2] != 0 and vector_a[0]==0 and vector_a[1]==0:
normal_n = [1,1,-(vector_a[0]+vector_a[1])/vector_a[2]];
else:
normal_n = [-(vector_a[1]+vector_a[2])/vector_a[0],1,1];

Dot_product_check = vector_a[0]*normal_n[0]+vector_a[1]*normal_n[1]+vector_a[2]*normal_n[2];