The Base Unit Class

illustration of the unit concept

A unit can most abstractly be considered as a black box transforming the state of a profile, thus taking an incoming profile instance, simulating its evolution within the unit and yielding an outgoing profile instance. The figure illustrates the concept of a unit. At its core, a unit consists of the two profile instances, in_profile and out_profile, represented in the figure by their cross-section planes. These are in parallel to each other and located on a common, perpendicular center line. The length of this line is called the length of the unit (its extent in rolling direction). The length can be converted to timescale via the material flow velocity within the unit. The extent of the unit in time is called its duration. The volume of the unit is bounded by the profile planes and the lateral surface, whose area is represented by surface_area. The surface_perimeter is tightly bound to the surface area, but is a mean perimeter of the lateral surface used when the length scale is not fixed. This is for example the case for the transport units in reversing mills or lateral material transport, since the material flow direction is not equal to the rolling direction. If the length scale is defined, the surface_perimeter times the length should be approximately equal the surface_area. Models should avoid dependence on the length scale, if possible, since the timescale is the more general approach.

The unit class defines the method Unit.solve(), which triggers the solution procedure and accepts a profile object that has to be treated as the incoming profile. This object is copied and modified and made available in the Unit.in_profile attribute. The outgoing state is available through the Unit.out_profile attribute or through the return of the Unit.solve() method.

Each unit can be supplied a label for human identification at creation or by attribute setting. It is mostly used in user interfaces later on.

A unit instance also has a Unit.parent property, which returns a reference to the containing unit, if there is one. This offers the possibility to access attributes of the pass sequence, or, in case of disk elements, of the actual unit currently solved. The return of this property is None, if there is no parent unit (for example on the root pass sequence).

class Unit(label: str = '', parent=None, **kwargs)

Base class for units.

class InProfile(unit: Unit, template: Profile)

Represents an incoming profile of a unit.

Using the __init__ is not recommended, use one of the factory class methods instead.

chemical_composition

Chemical composition of the profile’s material as dict of element symbols to atom fractions (0 to 1).

classifiers

Classifiers of the profile’s shape’s type.

core_temperature

Temperature of the profile core.

cross_section

Shape of the profile’s cross-section.

density

Mean density (specific weight) of the profile material.

elastic_modulus

Mean elastic modulus of the profile material.

equivalent_height

Height of the equivalent rectangle.

equivalent_radius

Radius of a equivalent round.

equivalent_rectangle

Equivalent rectangle geometry for use with equivalent flat pass models.

equivalent_width

Width of the equivalent rectangle.

flow_stress

Mean flow stress of the profile material.

flow_stress_function

Flow stress depended on strain, strain-rate and temperature

grain_size

Average grain size of the profile’s material.

heat_penetration_number

Mean heat penetration number of the profile material.

height

Maximum height (y-direction).

length

Length of the workpiece (x-direction).

material

String or sequence of strings classifying the material of the profile. Can be used by material databases to retrieve respective data.

microstructure_composition

Phase resp. constituent composition of the profile’s material as dict of constituent names to volume fractions (0 to 1).

poissons_ratio

Mean Poisson’s ratio of the profile material.

scale_thickness

Thickness of the scale covering the profile.

specific_heat_capacity

Mean specific heat capacity of the profile material.

strain

Mean equivalent strain of the profile cross-section.

surface_temperature

Mean temperature of the profile surface.

t

Temporal coordinate.

temperature

Mean temperature of the profile cross-section.

thermal_conductivity

Mean thermal conductivity of the profile material.

thermal_diffusivity

Mean thermal diffusivity of the profile material.

velocity

Mean material flow velocity.

width

Maximum width (z-direction).

x

Spacial coordinate in rolling direction.

class OutProfile(unit: Unit, template: Profile)

Represents an outgoing profile of a unit.

Using the __init__ is not recommended, use one of the factory class methods instead.

root_hook_fallback(hook)

Copy the value from the in profile as fallback for root hooks.

chemical_composition

Chemical composition of the profile’s material as dict of element symbols to atom fractions (0 to 1).

classifiers

Classifiers of the profile’s shape’s type.

core_temperature

Temperature of the profile core.

cross_section

Shape of the profile’s cross-section.

density

Mean density (specific weight) of the profile material.

elastic_modulus

Mean elastic modulus of the profile material.

equivalent_height

Height of the equivalent rectangle.

equivalent_radius

Radius of a equivalent round.

equivalent_rectangle

Equivalent rectangle geometry for use with equivalent flat pass models.

equivalent_width

Width of the equivalent rectangle.

flow_stress

Mean flow stress of the profile material.

flow_stress_function

Flow stress depended on strain, strain-rate and temperature

grain_size

Average grain size of the profile’s material.

heat_penetration_number

Mean heat penetration number of the profile material.

height

Maximum height (y-direction).

length

Length of the workpiece (x-direction).

material

String or sequence of strings classifying the material of the profile. Can be used by material databases to retrieve respective data.

microstructure_composition

Phase resp. constituent composition of the profile’s material as dict of constituent names to volume fractions (0 to 1).

poissons_ratio

Mean Poisson’s ratio of the profile material.

scale_thickness

Thickness of the scale covering the profile.

specific_heat_capacity

Mean specific heat capacity of the profile material.

strain

Mean equivalent strain of the profile cross-section.

surface_temperature

Mean temperature of the profile surface.

t

Temporal coordinate.

temperature

Mean temperature of the profile cross-section.

thermal_conductivity

Mean thermal conductivity of the profile material.

thermal_diffusivity

Mean thermal diffusivity of the profile material.

velocity

Mean material flow velocity.

width

Maximum width (z-direction).

x

Spacial coordinate in rolling direction.

class Profile(unit: Unit, template: Profile)

Represents a profile in context of a unit.

Using the __init__ is not recommended, use one of the factory class methods instead.

chemical_composition

Chemical composition of the profile’s material as dict of element symbols to atom fractions (0 to 1).

classifiers

Classifiers of the profile’s shape’s type.

core_temperature

Temperature of the profile core.

cross_section

Shape of the profile’s cross-section.

density

Mean density (specific weight) of the profile material.

elastic_modulus

Mean elastic modulus of the profile material.

equivalent_height

Height of the equivalent rectangle.

equivalent_radius

Radius of a equivalent round.

equivalent_rectangle

Equivalent rectangle geometry for use with equivalent flat pass models.

equivalent_width

Width of the equivalent rectangle.

flow_stress

Mean flow stress of the profile material.

flow_stress_function

Flow stress depended on strain, strain-rate and temperature

grain_size

Average grain size of the profile’s material.

heat_penetration_number

Mean heat penetration number of the profile material.

height

Maximum height (y-direction).

length

Length of the workpiece (x-direction).

material

String or sequence of strings classifying the material of the profile. Can be used by material databases to retrieve respective data.

microstructure_composition

Phase resp. constituent composition of the profile’s material as dict of constituent names to volume fractions (0 to 1).

poissons_ratio

Mean Poisson’s ratio of the profile material.

scale_thickness

Thickness of the scale covering the profile.

specific_heat_capacity

Mean specific heat capacity of the profile material.

strain

Mean equivalent strain of the profile cross-section.

surface_temperature

Mean temperature of the profile surface.

t

Temporal coordinate.

temperature

Mean temperature of the profile cross-section.

thermal_conductivity

Mean thermal conductivity of the profile material.

thermal_diffusivity

Mean thermal diffusivity of the profile material.

property unit: Unit

Reference to the parent unit, if applicable, else None.

velocity

Mean material flow velocity.

width

Maximum width (z-direction).

x

Spacial coordinate in rolling direction.

init_solve(in_profile: Profile)

Method called by the standard solve() implementation to init the specialized profile instances for in and out.

Parameters:

in_profile – the incoming state passed to solve()

next_of(unit_type: type)

Returns the instance of the first predecessor of the given type in the sequence. Like the Unit.prev property, but returns the first unit with given type.

Raises:

ValueError – if this unit has no parent unit

prev_of(unit_type: type)

Returns the instance of the first predecessor of the given type in the sequence. Like the Unit.prev property, but returns the first unit with given type.

Raises:

ValueError – if this unit has no parent unit

solve(in_profile: Profile) Profile

Solve the workpiece evolution within this unit based on the incoming state specified by in_profile. Iterates several times calling evaluate() until the return of evaluate() does not change anymore.

Parameters:

in_profile – The incoming state profile

Returns:

The outgoing state profile.

duration

Time needed to pass the unit (temporal extent).

energy_consumption

Energy consumption of this unit per produced mass.

in_profile: InProfile | None

The state of the incoming profile.

iteration_precision

Precision of iteration break in solution loop.

label

Label for human identification.

length

The length of the unit (spacial extent in rolling direction).

mass_flux

Flux/throughput of mass through this unit.

max_iteration_count

Count of maximum solution loop iterations before aborting.

property next

Returns a reference to the successor of this unit in the sequence.

Raises:

ValueError – if this unit has no parent unit

out_profile: OutProfile | None

The state of the outgoing profile.

property parent: Unit | None

Reference to the parent unit, if applicable, else None.

power

Total energy demand per time of this unit.

property prev

Returns a reference to the predecessor of this unit in the sequence.

Raises:

ValueError – if this unit has no parent unit

property subunits: List[Unit]

List of the subunits.

surface_area

Surface area of workpiece within the unit.

velocity

Mean velocity of material flow.

volume

Volume of workpiece material within the unit.

volume_flux

Flux/throughput of volume through this unit.