Applying a torque using FORCE and TRANSFORM constraints
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: Applying a torque using FORCE and TRANSFORM constraints
What should i say? I also though (think) that is the case, but only can inform what i can see.
Greetings
user1234
Greetings
user1234
Re: Applying a torque using FORCE and TRANSFORM constraints
Minimum example.
For the simplest case (short shaft, no bending), to get the tension of a torque is:
Method A: 24 segments, every force in the rectangular lever direction. The problem on plane faces is, that you can not add force transformation tools. Seems OK. Tresca (shear) around 18.5 N/mm². I will add a method B with transformation.
Greetings
user1234
For the simplest case (short shaft, no bending), to get the tension of a torque is:
Code: Select all
D = 200.0 #mm
d = 180.0 #mm
T = 10000.0 #Nm
WP = math.pi / 16.0 * ( D ** 4.0 - d ** 4 ) / D
tau = T * 1000.0 / WP
print ( "D = " + str( D ) + " mm" )
print ( "d = " + str( d ) + " mm" )
print ( "T = " + str( T ) + " Nm" )
print ( "WP = " + str( WP ) + " mm³")
print ( "tau = " + str( tau ) + " N/mm²" ) #18.5N/mm²
Greetings
user1234
Re: Applying a torque using FORCE and TRANSFORM constraints
So, now with transformation tools. Never used that before, because i never get that working. but with the example from the OP it works. The transformation tools only works, when the force is set in the Y-direction. In X not. Also you can only transform forces on radial surfaces, not on plane surfaces, also when they have radial boundaries.
Greetings
user1234
The shear stress is also OK.Greetings
user1234
Re: Applying a torque using FORCE and TRANSFORM constraints
Just saying that the displacements on both examples are also on point.
while phi is
On example A
FEM = 45.8640µm --> 0.026278degree
classic calculated = 0.026263degree
On example B (length is shorter)
FEM = 45.3326µm --> 0.025973degree
classic calculated = 0.024950degree
Greetings
user1234
Code: Select all
import math
D = 200.0 # mm
d = 180.0 # mm
T = 10000.0 # Nm
l = 200.0 # mm
ny = 0.3 # 1
E = 210000.0 # N/mm²
G = 1.0 / ( 2.0 * ( 1.0 + ny ) ) * E
IP = math.pi / 32.0 * ( D ** 4.0 - d ** 4.0 )
phi = T * 1000.0 * l / ( G * IP )
print ( "G = " + str( G ) + " N/mm²" )
print ( "IP = " + str( IP ) + " N/mm⁴" )
print ( "phi = " + str( phi ) + " rad")
print ( "phi = " + str( phi * 180 / math.pi ) + " degree" )
Code: Select all
phi = asin( displacement / D)
FEM = 45.8640µm --> 0.026278degree
classic calculated = 0.026263degree
On example B (length is shorter)
FEM = 45.3326µm --> 0.025973degree
classic calculated = 0.024950degree
Greetings
user1234
Re: Applying a torque using FORCE and TRANSFORM constraints
The question if there are useful for you? You reactivate this thread, so what do you need?
In the usefulness i see some points:
- the transform only works if the force before is set in the Y direction (if the axis is in Z direction)
- you can not transform the face side of a diameter which leads me to an other question
I think that set a torque on a face side is not less important (clutches, flanges, heavy-walled shafts, .....). I am pretty sure, that the transforms only works on cylinder faces, because the force on every node is constant and on a face side of a cylinder not ( F(x,y) ). So here a some questions:
- do the TRANSFORM command feed the force direction up in Calulix after a iteration, because the vector of the force is every iteration a little bit an other because of the displacement (very small but there). In my example A this is clearly not the case. For very long shaft (10m) this can be important. The rule in the machine construction is a max. displacement of ~ 0.25° / 1m .
- if i a able to get a algorithm to get a array (list) of the nodes and their forces for a torque replacement, does it blow up the inp file?
Sorry for the noob questions.
Greetings
user1234
In the usefulness i see some points:
- the transform only works if the force before is set in the Y direction (if the axis is in Z direction)
- you can not transform the face side of a diameter which leads me to an other question
I think that set a torque on a face side is not less important (clutches, flanges, heavy-walled shafts, .....). I am pretty sure, that the transforms only works on cylinder faces, because the force on every node is constant and on a face side of a cylinder not ( F(x,y) ). So here a some questions:
- do the TRANSFORM command feed the force direction up in Calulix after a iteration, because the vector of the force is every iteration a little bit an other because of the displacement (very small but there). In my example A this is clearly not the case. For very long shaft (10m) this can be important. The rule in the machine construction is a max. displacement of ~ 0.25° / 1m .
- if i a able to get a algorithm to get a array (list) of the nodes and their forces for a torque replacement, does it blow up the inp file?
Sorry for the noob questions.
Greetings
user1234
Re: Applying a torque using FORCE and TRANSFORM constraints
ATM we do not have such example in the FEM GUI examples. Thus I reactivated the topic because there might be someone who can help to do the math for the first example of the topic. I was not able to do them. The firste example is coded already but just not merged into the main FreeCAD. https://github.com/berndhahnebach/FreeC ... _torque.py IMHO for this we should use a example for which we are able to calculate the result with mechanical formulas.
I may have a look at your example too. But for this I would have need to write the code to generate the example by Python.
I may have a look at your example too. But for this I would have need to write the code to generate the example by Python.
Re: Applying a torque using FORCE and TRANSFORM constraints
The load of the example is way to high to get serious results. 500Nm for a 1 mm thick pipe with 10mm outer diameter is way to high. I would set the load in Line 141 from:
to
. If i do that, i get good displacements results.
0.03340 calculated
0.0333980 FEM.
But i want also control the shear stress. What is the easiest function to get the tau(z)? I want to see if the curve fits.
Greetings
user1234
Code: Select all
force_constraint.Force = 100000.0
Code: Select all
force_constraint.Force = 2500.0
0.03340 calculated
0.0333980 FEM.
Code: Select all
D = 10.0 # mm
d = 8.0 # mm
z = 50.0 # mm
T = 12.5 # Nm
ny = 0.3 # 1
E = 210000.0 # N/mm²
Wp = math.pi / 16.0 * ( D ** 4.0 - d ** 4 ) / D
G = 1.0 / ( 2.0 * ( 1.0 + ny ) ) * E
Ip = math.pi / 32.0 * ( D ** 4.0 - d ** 4.0 )
phi = T * 1000.0 * z / ( G * Ip * 2 )
print ( "--------------------------------------------------\n" )
print ( "classical distributed load function" )
print ( "phi = " + str( phi ) + " rad" )
print ( "phi = " + str( phi * 180.0 / math.pi ) + " °" )
print ( "dis = " + str( math.sin( phi ) * D / 2.0 ) + " mm" )
print ( "\n--------------------------------------------------\n\n" )
# calculated through steps
steps = 1000 # 1
dz = z / steps # mm
dT = T * 1000.0 / z # Mm/mm
dphi = []
phi = 0.0
#z = []
for i in range( steps ):
#z.append( dz * i + 0.5 * dz )
dphi.append( dT * dz * ( steps - i ) * dz / ( G * Ip ) )
phi = sum( dphi )
print ( "--------------------------------------------------" )
print ( "finite step load" )
print ( "phi = " + str( phi ) + " rad" )
print ( "phi = " + str( phi * 180.0 / math.pi ) + " °" )
print ( "dis = " + str( math.sin( phi ) * D / 2.0 ) + " mm" )
print ( "\n--------------------------------------------------\n\n" )
Code: Select all
--------------------------------------------------
classical distributed load function
phi = 0.006675100852350753 rad
phi = 0.38245510666387666 °
dis = 0.03337525641040786 mm
--------------------------------------------------
--------------------------------------------------
finite step load
phi = 0.006681775953203104 rad
phi = 0.3828375617705405 °
dis = 0.033408631170372884 mm
--------------------------------------------------
Greetings
user1234
Re: Applying a torque using FORCE and TRANSFORM constraints
oh yeah and stress too. Before I got 7606 MPa. Even the best of Scottys material would break ...user1234 wrote: ↑Thu Jul 08, 2021 10:32 pm The load of the example is way to high to get serious results. 500Nm for a 1 mm thick pipe with 10mm outer diameter is way to high. I would set the load in Line 141 from:toCode: Select all
force_constraint.Force = 100000.0
. If i do that, i get good displacements results.Code: Select all
force_constraint.Force = 2500.0
would you edit your python code to calculate the deformation? It misses a "import math" at the beginning. Just if some beginner would test the code he might not know what to do.
cheers bernd