beam analysis with beams in z-direction
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: beam analysis with beams in z-direction
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.
So you have to define for each beam its own definition of cross section. That really bad
mkraska's version (yellow)
2nd version (green)
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.
File:
So you have to define for each beam its own definition of cross section. That really bad
mkraska's version (yellow)
2nd version (green)
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.
File:
Re: beam analysis with beams in z-direction
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)
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)
Re: beam analysis with beams in z-direction
Bernd, UR_ thanks for the help!
Re: beam analysis with beams in z-direction
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 .... I would have been run into big trouble ...
Good I did not start earlier with this .... I would have been run into big trouble ...
Re: beam analysis with beams in z-direction
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.
** 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.
Re: beam analysis with beams in z-direction
I think I got it. Maybe a bit of algebra can help here.
Re: beam analysis with beams in z-direction
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.
Afterwards I did a 3D experiment:
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...
Afterwards I did a 3D experiment:
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...
Re: beam analysis with beams in z-direction
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.
Re: beam analysis with beams in z-direction
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?
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 56 times
Re: beam analysis with beams in z-direction
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];
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];