Skip to content

Commit 42b525f

Browse files
authored
Add Hooks for Angle Coordinates to Roll (#119)
* Added new hooks to roll and roll_pass as well as corresponding hookimpls. * updated implementation of surface_velocity * updated implementation of surface_velocity. Again! * upd version number * deleted unnecessary lines * updated surface velocity hook * updated velocity hook
1 parent e4fddaf commit 42b525f

File tree

5 files changed

+30
-9
lines changed

5 files changed

+30
-9
lines changed

pyroll/core/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from .disk_elements import DiskElementUnit
1313
from .config import Config, config
1414

15-
VERSION = "2.1.1"
15+
VERSION = "2.1.2"
1616

1717
root_hooks.update(
1818
{

pyroll/core/roll/roll.py

+3
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ class Roll(HookHost):
9999
thermal_diffusivity = Hook[float]()
100100
"""Mean thermal diffusivity of the roll material."""
101101

102+
neutral_angle = Hook[float]()
103+
"""Angle at the roll surface where the shear stress is zero."""
104+
102105
neutral_point = Hook[float]()
103106
"""Point at the roll surface where the shear stress is zero."""
104107

pyroll/core/roll_pass/hookimpls/roll.py

+15-4
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,22 @@ def center(self: RollPass.Roll):
3333
return np.array([0, self.roll_pass.gap / 2 + self.nominal_radius])
3434

3535

36+
@RollPass.Roll.neutral_angle
37+
def neutral_angle(self: RollPass.Roll):
38+
if self.has_value("neutral_point"):
39+
return -np.arcsin(self.neutral_point / self.working_radius)
40+
41+
42+
@RollPass.Roll.neutral_point
43+
def neutral_point(self: RollPass.Roll):
44+
if self.has_set_or_cached("neutral_angle"):
45+
return -np.sin(self.neutral_angle) * self.working_radius
46+
47+
3648
@RollPass.Roll.surface_velocity
3749
def surface_velocity(self: RollPass.Roll):
3850
if self.roll_pass.has_set("velocity"):
39-
if self.has_value("neutral_point"):
40-
alpha = np.arcsin(-self.neutral_point / self.working_radius)
51+
if self.has_value("neutral_angle"):
52+
return self.roll_pass.velocity / np.cos(self.neutral_angle)
4153
else:
42-
alpha = 0
43-
return self.roll_pass.velocity / np.cos(alpha)
54+
return self.roll_pass.velocity / np.cos(0)

pyroll/core/roll_pass/hookimpls/roll_pass.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,10 @@ def contact_area3(self: ThreeRollPass):
139139

140140
@RollPass.velocity
141141
def velocity(self: RollPass):
142-
if self.roll.has_value("neutral_point"):
143-
alpha = np.arcsin(-self.roll.neutral_point / self.roll.working_radius)
142+
if self.roll.has_value("neutral_angle"):
143+
return self.roll.surface_velocity * np.cos(self.roll.neutral_angle)
144144
else:
145-
alpha = 0
146-
return self.roll.surface_velocity * np.cos(alpha)
145+
return self.roll.surface_velocity * np.cos(0)
147146

148147

149148
@RollPass.duration
@@ -222,3 +221,8 @@ def roll_power(self: RollPass):
222221
@ThreeRollPass.power
223222
def roll_power_3(self: ThreeRollPass):
224223
return 3 * self.roll.roll_power
224+
225+
226+
@RollPass.entry_angle
227+
def entry_angle(self: RollPass):
228+
return -np.arcsin(self.roll.contact_length / self.roll.working_radius)

pyroll/core/roll_pass/roll_pass.py

+3
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ class RollPass(DiskElementUnit, DeformationUnit):
6060
roll_force = Hook[float]()
6161
"""Vertical roll force."""
6262

63+
entry_angle = Hook[float]()
64+
"""Angle at which the material enters the roll gap."""
65+
6366
front_tension = Hook[float]()
6467
"""Front tension acting on the current roll pass."""
6568

0 commit comments

Comments
 (0)