Data Export
The pyroll-export
package provides several routines for exporting the data in PyRolL’s object structure to well known data formats and objects.
- to_dict(obj: Unit | Profile) dict[str, Any]
Exports a PyRolL Unit or Profile object to a dict tree. This is the root export function of this library, all other functions make use of it. Conversion of objects can be customized using the
convert
plugin hook.- Parameters:
obj – the unit or profile to export
- Returns:
the dict representation of the unit
- to_json(obj: Unit | Profile) str
Exports a PyRolL Unit object to a JSON document based on the result of
to_dict()
.- Parameters:
obj – the unit or profile to export
- Returns:
the created JSON document text
- to_yaml(obj: Unit | Profile) str
Exports a PyRolL Unit object to a YAML document based on the result of
to_dict()
.- Parameters:
obj – the unit or profile to export
- Returns:
the created YAML document text
- to_pandas(sequence: Sequence[Unit]) DataFrame
Exports a PyRolL PassSequence object to a pandas
DataFrame
. Uses a flattened version of the result ofto_dict()
.
Command Line Usage
If the pyroll-cli
package is also installed, the pyroll-export
package provides additional CLI commands.
export-json
Exports the data to a JSON file via the pyroll.export.to_json()
function.
The file can be specified by the -f
/--file
option, which defaults to ./export.json
.
So, execute f.e.
pyroll input-py solve export-json -f my-results.json
Which leads to a file similar to this
{
"type": "PassSequence",
"label": "",
"in_profile": {
"type": "PassSequence.InProfile",
"cross_section": {
"type": "Polygon",
"width": 0.03,
"height": 0.03,
"perimeter": 0.09420993470864258,
"area": 0.000705723410372836
},
"classifiers": [
"round"
],
"temperature": 1473.15,
"strain": 0,
"material": [
"C45",
"steel"
],
"flow_stress": 100000000.0,
"chemical_composition": {
"Fe": 0.95,
"Cr": 0.05
},
"t": 0
},
"out_profile": {
"type": "PassSequence.OutProfile",
"cross_section": {
"type": "Polygon",
"width": 0.024979346307209157,
"height": 0.025,
"perimeter": 0.07857846976830599,
"area": 0.0004902621995364455
},
"classifiers": [
"generic_elongation",
"round"
],
"temperature": 1473.15,
"strain": 0.23465593890486666,
"material": [
"C45",
"steel"
],
"flow_stress": 100000000.0,
"chemical_composition": {
"Fe": 0.95,
"Cr": 0.05
},
"t": 1.6428682404668775,
"length": 0.0
},
"total_elongation": 1.4394815897291575,
"duration": 1.6428682404668775,
"iteration_precision": 0.01,
"units": [
{
"type": "RollPass",
"label": "Oval I",
"in_profile": {
"type": "RollPass.InProfile",
"cross_section": {
"type": "Polygon",
"width": 0.03,
"height": 0.03,
"perimeter": 0.09420993470864258,
"area": 0.0007057234103728363
},
"classifiers": [
"round",
"rotated",
"vertical"
],
"temperature": 1473.15,
"strain": 0,
"material": [
"C45",
"steel"
],
"flow_stress": 100000000.0,
"chemical_composition": {
"Fe": 0.95,
"Cr": 0.05
},
"t": 0,
"length": 0,
"height": 0.03,
"width": 0.03
},
"out_profile": {
"type": "RollPass.OutProfile",
"cross_section": {
"type": "Polygon",
"width": 0.04814264518817268,
"height": 0.018000000000000002,
"perimeter": 0.10779335271028952,
"area": 0.0006199236268730841
},
"classifiers": [
"circular_oval",
"oval",
"generic_elongation"
],
"temperature": 1473.15,
"strain": 0.12962710273238837,
"material": [
"C45",
"steel"
],
"flow_stress": 100000000.0,
"chemical_composition": {
"Fe": 0.95,
"Cr": 0.05
},
"t": 0.2704916661950485,
"length": 0.0,
"width": 0.04814264518817268
},
"gap": 0.002,
"roll": {
"type": "RollPass.Roll",
"nominal_radius": 0.16,
"rotational_frequency": 1,
"groove": {
"type": "CircularOvalGroove",
"r1": 0.006,
"r2": 0.04,
"alpha1": 0.598668052835542,
"alpha2": 0.598668052835542,
"depth": 0.008,
"usable_width": 0.04814264518817268,
"classifiers": [
"circular_oval",
"oval",
"generic_elongation"
],
"flank_angle": 0.598668052835542,
"ground_width": 0.02468853599393468,
"contour_line": {
"type": "LineString",
"width": 0.07110298366253195,
"depth": 0.008,
"length": 0.07433244283174234
}
},
"roll_torque": 3492.976239911318,
"max_radius": 0.16,
"contour_points": [
[
-0.03555149183126598,
0.0
],
[
-0.02592296279363144,
0.0
],
[
-0.02575389999280341,
2.38232550822063e-06
],
[
-0.025584837191975376,
9.53498653863058e-06
],
[
-0.025415774391147346,
2.1475104644488353e-05
],
[
-0.025246711590319316,
3.8231444443779204e-05
],
[
-0.025077648789491286,
5.984476344224332e-05
],
[
-0.024908585988663252,
8.63683157012107e-05
],
[
-0.024739523187835222,
0.00011786852412895392
],
[
-0.024570460387007192,
0.00015442584170933474
],
[
-0.02440139758617916,
0.00019613582865082076
],
[
-0.02423233478535113,
0.00024311048068332772
],
[
-0.0240632719845231,
0.0002954798541404055
],
[
-0.023894209183695066,
0.00035339404684813034
],
[
-0.023725146382867036,
0.0004170256113273565
],
[
-0.023556083582039006,
0.00048657250000223775
],
[
-0.023387020781210972,
0.0005622616733019573
],
[
-0.023217957980382942,
0.0006443535441272392
],
[
-0.023048895179554912,
0.0007331474911749748
],
[
-0.022879832378726882,
0.0008289887567437234
],
[
-0.02271076957789885,
0.000932277163774491
],
[
-0.022541706777070805,
0.0010434782608695764
],
[
-0.021414621438217266,
0.0017848189081700674
],
[
-0.020287536099363724,
0.0024734082883751674
],
[
-0.019160450760510185,
0.0031123500588334935
],
[
-0.018033365421656643,
0.0037043097058184066
],
[
-0.016906280082803104,
0.004251588844653625
],
[
-0.015779194743949565,
0.004756183333318412
],
[
-0.014652109405096024,
0.005219829257817624
],
[
-0.013525024066242484,
0.005644039687679132
],
[
-0.012397938727388943,
0.006030134305730628
],
[
-0.011270853388535403,
0.006379263462111151
],
[
-0.010143768049681864,
0.006692427808994532
],
[
-0.009016682710828323,
0.006970494388604434
],
[
-0.007889597371974783,
0.007214209839140312
],
[
-0.006762512033121244,
0.007424211228658599
],
[
-0.005635426694267701,
0.007601034910385045
],
[
-0.004508341355414162,
0.007745123703708133
],
[
-0.0033812560165606236,
0.007856832635703415
],
[
-0.002254170677707081,
0.007936433423075796
],
[
-0.0011270853388535423,
0.007984117829945195
],
[
0.0,
0.008
],
[
0.0011270853388535423,
0.007984117829945195
],
[
0.002254170677707081,
0.007936433423075796
],
[
0.0033812560165606236,
0.007856832635703415
],
[
0.004508341355414162,
0.007745123703708133
],
[
0.005635426694267701,
0.007601034910385045
],
[
0.006762512033121244,
0.007424211228658599
],
[
0.007889597371974783,
0.007214209839140312
],
[
0.009016682710828323,
0.006970494388604434
],
[
0.010143768049681864,
0.006692427808994532
],
[
0.011270853388535403,
0.006379263462111151
],
[
0.012397938727388943,
0.006030134305730628
],
[
0.013525024066242484,
0.005644039687679132
],
[
0.014652109405096024,
0.005219829257817624
],
[
0.015779194743949565,
0.004756183333318412
],
[
0.016906280082803104,
0.004251588844653625
],
[
0.018033365421656643,
0.0037043097058184066
],
[
0.019160450760510185,
0.0031123500588334935
],
[
0.020287536099363724,
0.0024734082883751674
],
[
0.021414621438217266,
0.0017848189081700674
],
[
0.022541706777070805,
0.0010434782608695764
],
[
0.02271076957789885,
0.000932277163774491
],
[
0.022879832378726882,
0.0008289887567437234
],
[
0.023048895179554912,
0.0007331474911749748
],
[
0.023217957980382942,
0.0006443535441272392
],
[
0.023387020781210972,
0.0005622616733019573
],
[
0.023556083582039006,
0.00048657250000223775
],
[
0.023725146382867036,
0.0004170256113273565
],
[
0.023894209183695066,
0.00035339404684813034
],
[
0.0240632719845231,
0.0002954798541404055
],
[
0.02423233478535113,
0.00024311048068332772
],
[
0.02440139758617916,
0.00019613582865082076
],
[
0.024570460387007192,
0.00015442584170933474
],
[
0.024739523187835222,
0.00011786852412895392
],
[
0.024908585988663252,
8.63683157012107e-05
],
[
0.025077648789491286,
5.984476344224332e-05
],
[
0.025246711590319316,
3.8231444443779204e-05
],
[
0.025415774391147346,
2.1475104644488353e-05
],
[
0.025584837191975376,
9.53498653863058e-06
],
[
0.02575389999280341,
2.38232550822063e-06
],
[
0.02592296279363144,
0.0
],
[
0.03555149183126598,
0.0
]
],
"min_radius": 0.152,
"contact_length": 0.04228474902373194,
"working_radius": 0.1563255150095489,
"contact_area": 0.0016521210699162083
},
"roll_force": 165212.10699162082,
"height": 0.018000000000000002,
"length": 0.04228474902373194,
"velocity": 0.1563255150095489,
"duration": 0.2704916661950485,
"elongation": 1.1384037965007547,
"log_elongation": 0.12962710273238837,
"strain": 0.12962710273238837,
"iteration_precision": 0.01,
"disk_elements": []
},
{
"type": "Transport",
"label": "I => II",
"in_profile": {
"type": "Transport.InProfile",
"cross_section": {
"type": "Polygon",
"width": 0.04814264518817268,
"height": 0.018000000000000002,
"perimeter": 0.10779335271028952,
"area": 0.0006199236268730841
},
"classifiers": [
"circular_oval",
"oval",
"generic_elongation"
],
"temperature": 1473.15,
"strain": 0.12962710273238837,
"material": [
"C45",
"steel"
],
"flow_stress": 100000000.0,
"chemical_composition": {
"Fe": 0.95,
"Cr": 0.05
},
"t": 0.2704916661950485,
"length": 0.0
},
"out_profile": {
"type": "Transport.OutProfile",
"cross_section": {
"type": "Polygon",
"width": 0.04814264518817268,
"height": 0.018000000000000002,
"perimeter": 0.10779335271028952,
"area": 0.0006199236268730841
},
"classifiers": [
"circular_oval",
"oval",
"generic_elongation"
],
"temperature": 1473.15,
"strain": 0,
"material": [
"C45",
"steel"
],
"flow_stress": 100000000.0,
"chemical_composition": {
"Fe": 0.95,
"Cr": 0.05
},
"t": 1.2704916661950485,
"length": 0
},
"duration": 1,
"array_values": [
1,
2,
3,
4
],
"iteration_precision": 0.01,
"disk_elements": []
}
]
}
export-toml
Exports the data to a TOML file via the pyroll.export.to_toml()
function.
The file can be specified by the -f
/--file
option, which defaults to ./export.toml
.
So, execute f.e.
pyroll input-py solve export-toml -f my-results.toml
Which leads to a file similar to this
type = "PassSequence"
label = ""
total_elongation = 1.4394815897291575
duration = 1.6428682404668775
iteration_precision = 0.01
[[units]]
type = "RollPass"
label = "Oval I"
gap = 0.002
roll_force = 165212.10699162082
height = 0.018000000000000002
length = 0.04228474902373194
velocity = 0.1563255150095489
duration = 0.2704916661950485
elongation = 1.1384037965007547
log_elongation = 0.12962710273238837
strain = 0.12962710273238837
iteration_precision = 0.01
disk_elements = []
[units.in_profile]
type = "RollPass.InProfile"
temperature = 1473.15
strain = 0
flow_stress = 100000000.0
t = 0
length = 0
height = 0.03
width = 0.03
classifiers = ["round", "rotated", "vertical"]
material = ["C45", "steel"]
[units.in_profile.cross_section]
type = "Polygon"
width = 0.03
height = 0.03
perimeter = 0.09420993470864258
area = 0.0007057234103728363
[units.in_profile.chemical_composition]
Fe = 0.95
Cr = 0.05
[units.out_profile]
type = "RollPass.OutProfile"
temperature = 1473.15
strain = 0.12962710273238837
flow_stress = 100000000.0
t = 0.2704916661950485
length = 0.0
width = 0.04814264518817268
classifiers = ["circular_oval", "oval", "generic_elongation"]
material = ["C45", "steel"]
[units.out_profile.cross_section]
type = "Polygon"
width = 0.04814264518817268
height = 0.018000000000000002
perimeter = 0.10779335271028952
area = 0.0006199236268730841
[units.out_profile.chemical_composition]
Fe = 0.95
Cr = 0.05
[units.roll]
type = "RollPass.Roll"
nominal_radius = 0.16
rotational_frequency = 1
roll_torque = 3492.976239911318
max_radius = 0.16
min_radius = 0.152
contact_length = 0.04228474902373194
working_radius = 0.1563255150095489
contact_area = 0.0016521210699162083
contour_points = [[-0.03555149183126598, 0.0], [-0.02592296279363144, 0.0], [-0.02575389999280341, 0.00000238232550822063], [-0.025584837191975376, 0.00000953498653863058], [-0.025415774391147346, 0.000021475104644488353], [-0.025246711590319316, 0.000038231444443779204], [-0.025077648789491286, 0.00005984476344224332], [-0.024908585988663252, 0.0000863683157012107], [-0.024739523187835222, 0.00011786852412895392], [-0.024570460387007192, 0.00015442584170933474], [-0.02440139758617916, 0.00019613582865082076], [-0.02423233478535113, 0.00024311048068332772], [-0.0240632719845231, 0.0002954798541404055], [-0.023894209183695066, 0.00035339404684813034], [-0.023725146382867036, 0.0004170256113273565], [-0.023556083582039006, 0.00048657250000223775], [-0.023387020781210972, 0.0005622616733019573], [-0.023217957980382942, 0.0006443535441272392], [-0.023048895179554912, 0.0007331474911749748], [-0.022879832378726882, 0.0008289887567437234], [-0.02271076957789885, 0.000932277163774491], [-0.022541706777070805, 0.0010434782608695764], [-0.021414621438217266, 0.0017848189081700674], [-0.020287536099363724, 0.0024734082883751674], [-0.019160450760510185, 0.0031123500588334935], [-0.018033365421656643, 0.0037043097058184066], [-0.016906280082803104, 0.004251588844653625], [-0.015779194743949565, 0.004756183333318412], [-0.014652109405096024, 0.005219829257817624], [-0.013525024066242484, 0.005644039687679132], [-0.012397938727388943, 0.006030134305730628], [-0.011270853388535403, 0.006379263462111151], [-0.010143768049681864, 0.006692427808994532], [-0.009016682710828323, 0.006970494388604434], [-0.007889597371974783, 0.007214209839140312], [-0.006762512033121244, 0.007424211228658599], [-0.005635426694267701, 0.007601034910385045], [-0.004508341355414162, 0.007745123703708133], [-0.0033812560165606236, 0.007856832635703415], [-0.002254170677707081, 0.007936433423075796], [-0.0011270853388535423, 0.007984117829945195], [0.0, 0.008], [0.0011270853388535423, 0.007984117829945195], [0.002254170677707081, 0.007936433423075796], [0.0033812560165606236, 0.007856832635703415], [0.004508341355414162, 0.007745123703708133], [0.005635426694267701, 0.007601034910385045], [0.006762512033121244, 0.007424211228658599], [0.007889597371974783, 0.007214209839140312], [0.009016682710828323, 0.006970494388604434], [0.010143768049681864, 0.006692427808994532], [0.011270853388535403, 0.006379263462111151], [0.012397938727388943, 0.006030134305730628], [0.013525024066242484, 0.005644039687679132], [0.014652109405096024, 0.005219829257817624], [0.015779194743949565, 0.004756183333318412], [0.016906280082803104, 0.004251588844653625], [0.018033365421656643, 0.0037043097058184066], [0.019160450760510185, 0.0031123500588334935], [0.020287536099363724, 0.0024734082883751674], [0.021414621438217266, 0.0017848189081700674], [0.022541706777070805, 0.0010434782608695764], [0.02271076957789885, 0.000932277163774491], [0.022879832378726882, 0.0008289887567437234], [0.023048895179554912, 0.0007331474911749748], [0.023217957980382942, 0.0006443535441272392], [0.023387020781210972, 0.0005622616733019573], [0.023556083582039006, 0.00048657250000223775], [0.023725146382867036, 0.0004170256113273565], [0.023894209183695066, 0.00035339404684813034], [0.0240632719845231, 0.0002954798541404055], [0.02423233478535113, 0.00024311048068332772], [0.02440139758617916, 0.00019613582865082076], [0.024570460387007192, 0.00015442584170933474], [0.024739523187835222, 0.00011786852412895392], [0.024908585988663252, 0.0000863683157012107], [0.025077648789491286, 0.00005984476344224332], [0.025246711590319316, 0.000038231444443779204], [0.025415774391147346, 0.000021475104644488353], [0.025584837191975376, 0.00000953498653863058], [0.02575389999280341, 0.00000238232550822063], [0.02592296279363144, 0.0], [0.03555149183126598, 0.0]]
[units.roll.groove]
type = "CircularOvalGroove"
r1 = 0.006
r2 = 0.04
alpha1 = 0.598668052835542
alpha2 = 0.598668052835542
depth = 0.008
usable_width = 0.04814264518817268
flank_angle = 0.598668052835542
ground_width = 0.02468853599393468
classifiers = ["circular_oval", "oval", "generic_elongation"]
[units.roll.groove.contour_line]
type = "LineString"
width = 0.07110298366253195
depth = 0.008
length = 0.07433244283174234
[[units]]
type = "Transport"
label = "I => II"
duration = 1
iteration_precision = 0.01
array_values = [1, 2, 3, 4]
disk_elements = []
[units.in_profile]
type = "Transport.InProfile"
temperature = 1473.15
strain = 0.12962710273238837
flow_stress = 100000000.0
t = 0.2704916661950485
length = 0.0
classifiers = ["circular_oval", "oval", "generic_elongation"]
material = ["C45", "steel"]
[units.in_profile.cross_section]
type = "Polygon"
width = 0.04814264518817268
height = 0.018000000000000002
perimeter = 0.10779335271028952
area = 0.0006199236268730841
[units.in_profile.chemical_composition]
Fe = 0.95
Cr = 0.05
[units.out_profile]
type = "Transport.OutProfile"
temperature = 1473.15
strain = 0
flow_stress = 100000000.0
t = 1.2704916661950485
length = 0
classifiers = ["circular_oval", "oval", "generic_elongation"]
material = ["C45", "steel"]
[units.out_profile.cross_section]
type = "Polygon"
width = 0.04814264518817268
height = 0.018000000000000002
perimeter = 0.10779335271028952
area = 0.0006199236268730841
[units.out_profile.chemical_composition]
Fe = 0.95
Cr = 0.05
[[units]]
type = "RollPass"
label = "Round II"
gap = 0.002
roll_force = 123500.89741440056
height = 0.025
length = 0.0574698817109208
velocity = 0.15433269889036763
duration = 0.37237657427182896
elongation = 1.2644736376968007
log_elongation = 0.23465593890486666
strain = 0.23465593890486666
iteration_precision = 0.01
disk_elements = []
[units.in_profile]
type = "RollPass.InProfile"
temperature = 1473.15
strain = 0
flow_stress = 100000000.0
t = 1.2704916661950485
length = 0
height = 0.04814264518817268
width = 0.018000000000000002
classifiers = ["generic_elongation", "vertical", "circular_oval", "oval", "rotated"]
material = ["C45", "steel"]
[units.in_profile.cross_section]
type = "Polygon"
width = 0.018000000000000002
height = 0.04814264518817268
perimeter = 0.10779335271028952
area = 0.000619923626873084
[units.in_profile.chemical_composition]
Fe = 0.95
Cr = 0.05
[units.out_profile]
type = "RollPass.OutProfile"
temperature = 1473.15
strain = 0.23465593890486666
flow_stress = 100000000.0
t = 1.6428682404668775
length = 0.0
width = 0.024979346307209157
classifiers = ["generic_elongation", "round"]
material = ["C45", "steel"]
[units.out_profile.cross_section]
type = "Polygon"
width = 0.024979346307209157
height = 0.025
perimeter = 0.07857846976830599
area = 0.0004902621995364455
[units.out_profile.chemical_composition]
Fe = 0.95
Cr = 0.05
[units.roll]
type = "RollPass.Roll"
nominal_radius = 0.16
rotational_frequency = 1
roll_torque = 3548.7909827990825
max_radius = 0.16
min_radius = 0.1485
contact_length = 0.0574698817109208
working_radius = 0.15433269889036763
contact_area = 0.0012350089741440056
contour_points = [[-0.01834689918426052, 0.0], [-0.013351029922818688, 0.0], [-0.013301581663845286, 0.0000012233134055945113], [-0.013252133404871884, 0.0000049022767898635865], [-0.013202685145898481, 0.000011064295739862586], [-0.013153236886925077, 0.0000197561961675103], [-0.013103788627951675, 0.000031046057796098054], [-0.013054340368978273, 0.00004502601677219755], [-0.01300489211000487, 0.00006181632153374876], [-0.012955443851031468, 0.00008157109158740206], [-0.012905995592058066, 0.00010448649119935386], [-0.012856547333084663, 0.0001308124664665673], [-0.01280709907411126, 0.00016086995535589585], [-0.012757650815137857, 0.00019507687661000775], [-0.012708202556164455, 0.00023398891869609107], [-0.012658754297191053, 0.00027836681190381387], [-0.01260930603821765, 0.00032929464068613104], [-0.012559857779244248, 0.0003884064754824285], [-0.012510409520270844, 0.0004583752786104569], [-0.012460961261297442, 0.0005441735222940899], [-0.01241151300232404, 0.000657497509345915], [-0.012362064743350639, 0.0008518518518518549], [-0.011743961506183107, 0.003281281133176079], [-0.011125858269015574, 0.004697830971323894], [-0.010507755031848042, 0.005770309017369308], [-0.009889651794680512, 0.006644919056469634], [-0.009271548557512978, 0.00738381699142336], [-0.008653445320345447, 0.008020414851202327], [-0.008035342083177915, 0.008575138516298864], [-0.007417238846010383, 0.009061539042374908], [-0.006799135608842851, 0.009489125558051308], [-0.0061810323716753185, 0.009864844169167903], [-0.005562929134507787, 0.010193918860008075], [-0.004944825897340255, 0.010480361355157473], [-0.004326722660172724, 0.010727295980828142], [-0.0037086194230051914, 0.010937174790347531], [-0.0030905161858376592, 0.011111924277548776], [-0.002472412948670127, 0.011253047547906125], [-0.0018543097115025949, 0.011361696303251716], [-0.0012362064743350627, 0.011438721540126706], [-0.0006181032371675305, 0.01148470858243007], [0.0, 0.0115], [0.0006181032371675305, 0.01148470858243007], [0.0012362064743350627, 0.011438721540126706], [0.0018543097115025949, 0.011361696303251716], [0.002472412948670127, 0.011253047547906125], [0.0030905161858376592, 0.011111924277548776], [0.0037086194230051914, 0.010937174790347531], [0.004326722660172724, 0.010727295980828142], [0.004944825897340255, 0.010480361355157473], [0.005562929134507787, 0.010193918860008075], [0.0061810323716753185, 0.009864844169167903], [0.006799135608842851, 0.009489125558051308], [0.007417238846010383, 0.009061539042374908], [0.008035342083177915, 0.008575138516298864], [0.008653445320345447, 0.008020414851202327], [0.009271548557512978, 0.00738381699142336], [0.009889651794680512, 0.006644919056469634], [0.010507755031848042, 0.005770309017369308], [0.011125858269015574, 0.004697830971323894], [0.011743961506183107, 0.003281281133176079], [0.012362064743350639, 0.0008518518518518549], [0.01241151300232404, 0.000657497509345915], [0.012460961261297442, 0.0005441735222940899], [0.012510409520270844, 0.0004583752786104569], [0.012559857779244248, 0.0003884064754824285], [0.01260930603821765, 0.00032929464068613104], [0.012658754297191053, 0.00027836681190381387], [0.012708202556164455, 0.00023398891869609107], [0.012757650815137857, 0.00019507687661000775], [0.01280709907411126, 0.00016086995535589585], [0.012856547333084663, 0.0001308124664665673], [0.012905995592058066, 0.00010448649119935386], [0.012955443851031468, 0.00008157109158740206], [0.01300489211000487, 0.00006181632153374876], [0.013054340368978273, 0.00004502601677219755], [0.013103788627951675, 0.000031046057796098054], [0.013153236886925077, 0.0000197561961675103], [0.013202685145898481, 0.000011064295739862586], [0.013252133404871884, 0.0000049022767898635865], [0.013301581663845286, 0.0000012233134055945113], [0.013351029922818688, 0.0], [0.01834689918426052, 0.0]]
[units.roll.groove]
type = "RoundGroove"
r1 = 0.001
r2 = 0.0125
alpha1 = 1.4221008325273343
alpha2 = 1.4221008325273343
depth = 0.0115
usable_width = 0.024979346307209157
flank_angle = 1.4221008325273343
ground_width = 0.02153391923035272
classifiers = ["generic_elongation", "round"]
[units.roll.groove.contour_line]
type = "LineString"
width = 0.03669379836852104
depth = 0.0115
length = 0.04837185790523714
[in_profile]
type = "PassSequence.InProfile"
temperature = 1473.15
strain = 0
flow_stress = 100000000.0
t = 0
classifiers = ["round"]
material = ["C45", "steel"]
[in_profile.cross_section]
type = "Polygon"
width = 0.03
height = 0.03
perimeter = 0.09420993470864258
area = 0.000705723410372836
[in_profile.chemical_composition]
Fe = 0.95
Cr = 0.05
[out_profile]
type = "PassSequence.OutProfile"
temperature = 1473.15
strain = 0.23465593890486666
flow_stress = 100000000.0
t = 1.6428682404668775
length = 0.0
classifiers = ["generic_elongation", "round"]
material = ["C45", "steel"]
[out_profile.cross_section]
type = "Polygon"
width = 0.024979346307209157
height = 0.025
perimeter = 0.07857846976830599
area = 0.0004902621995364455
[out_profile.chemical_composition]
Fe = 0.95
Cr = 0.05
export-yaml
Exports the data to a YAML file via the pyroll.export.to_yaml()
function.
The file can be specified by the -f
/--file
option, which defaults to ./export.yaml
.
So, execute f.e.
pyroll input-py solve export-yaml -f my-results.yaml
Which leads to a file similar to this
duration: 1.6428682404668775
in_profile:
chemical_composition:
Cr: 0.05
Fe: 0.95
classifiers:
- round
cross_section:
area: 0.000705723410372836
height: 0.03
perimeter: 0.09420993470864258
type: Polygon
width: 0.03
flow_stress: 100000000.0
material:
- C45
- steel
strain: 0
t: 0
temperature: 1473.15
type: PassSequence.InProfile
iteration_precision: 0.01
label: ''
out_profile:
chemical_composition:
Cr: 0.05
Fe: 0.95
classifiers:
- generic_elongation
- round
cross_section:
area: 0.0004902621995364455
height: 0.025
perimeter: 0.07857846976830599
type: Polygon
width: 0.024979346307209157
flow_stress: 100000000.0
length: 0.0
material:
- C45
- steel
strain: 0.23465593890486666
t: 1.6428682404668775
temperature: 1473.15
type: PassSequence.OutProfile
total_elongation: 1.4394815897291575
type: PassSequence
units:
- disk_elements: []
duration: 0.2704916661950485
elongation: 1.1384037965007547
gap: 0.002
height: 0.018000000000000002
in_profile:
chemical_composition:
Cr: 0.05
Fe: 0.95
classifiers:
- round
- rotated
- vertical
cross_section:
area: 0.0007057234103728363
height: 0.03
perimeter: 0.09420993470864258
type: Polygon
width: 0.03
flow_stress: 100000000.0
height: 0.03
length: 0
material:
- C45
- steel
strain: 0
t: 0
temperature: 1473.15
type: RollPass.InProfile
width: 0.03
iteration_precision: 0.01
label: Oval I
length: 0.04228474902373194
log_elongation: 0.12962710273238837
out_profile:
chemical_composition:
Cr: 0.05
Fe: 0.95
classifiers:
- circular_oval
- oval
- generic_elongation
cross_section:
area: 0.0006199236268730841
height: 0.018000000000000002
perimeter: 0.10779335271028952
type: Polygon
width: 0.04814264518817268
flow_stress: 100000000.0
length: 0.0
material:
- C45
- steel
strain: 0.12962710273238837
t: 0.2704916661950485
temperature: 1473.15
type: RollPass.OutProfile
width: 0.04814264518817268
roll:
contact_area: 0.0016521210699162083
contact_length: 0.04228474902373194
contour_points:
- - -0.03555149183126598
- 0.0
- - -0.02592296279363144
- 0.0
- - -0.02575389999280341
- 2.38232550822063e-06
- - -0.025584837191975376
- 9.53498653863058e-06
- - -0.025415774391147346
- 2.1475104644488353e-05
- - -0.025246711590319316
- 3.8231444443779204e-05
- - -0.025077648789491286
- 5.984476344224332e-05
- - -0.024908585988663252
- 8.63683157012107e-05
- - -0.024739523187835222
- 0.00011786852412895392
- - -0.024570460387007192
- 0.00015442584170933474
- - -0.02440139758617916
- 0.00019613582865082076
- - -0.02423233478535113
- 0.00024311048068332772
- - -0.0240632719845231
- 0.0002954798541404055
- - -0.023894209183695066
- 0.00035339404684813034
- - -0.023725146382867036
- 0.0004170256113273565
- - -0.023556083582039006
- 0.00048657250000223775
- - -0.023387020781210972
- 0.0005622616733019573
- - -0.023217957980382942
- 0.0006443535441272392
- - -0.023048895179554912
- 0.0007331474911749748
- - -0.022879832378726882
- 0.0008289887567437234
- - -0.02271076957789885
- 0.000932277163774491
- - -0.022541706777070805
- 0.0010434782608695764
- - -0.021414621438217266
- 0.0017848189081700674
- - -0.020287536099363724
- 0.0024734082883751674
- - -0.019160450760510185
- 0.0031123500588334935
- - -0.018033365421656643
- 0.0037043097058184066
- - -0.016906280082803104
- 0.004251588844653625
- - -0.015779194743949565
- 0.004756183333318412
- - -0.014652109405096024
- 0.005219829257817624
- - -0.013525024066242484
- 0.005644039687679132
- - -0.012397938727388943
- 0.006030134305730628
- - -0.011270853388535403
- 0.006379263462111151
- - -0.010143768049681864
- 0.006692427808994532
- - -0.009016682710828323
- 0.006970494388604434
- - -0.007889597371974783
- 0.007214209839140312
- - -0.006762512033121244
- 0.007424211228658599
- - -0.005635426694267701
- 0.007601034910385045
- - -0.004508341355414162
- 0.007745123703708133
- - -0.0033812560165606236
- 0.007856832635703415
- - -0.002254170677707081
- 0.007936433423075796
- - -0.0011270853388535423
- 0.007984117829945195
- - 0.0
- 0.008
- - 0.0011270853388535423
- 0.007984117829945195
- - 0.002254170677707081
- 0.007936433423075796
- - 0.0033812560165606236
- 0.007856832635703415
- - 0.004508341355414162
- 0.007745123703708133
- - 0.005635426694267701
- 0.007601034910385045
- - 0.006762512033121244
- 0.007424211228658599
- - 0.007889597371974783
- 0.007214209839140312
- - 0.009016682710828323
- 0.006970494388604434
- - 0.010143768049681864
- 0.006692427808994532
- - 0.011270853388535403
- 0.006379263462111151
- - 0.012397938727388943
- 0.006030134305730628
- - 0.013525024066242484
- 0.005644039687679132
- - 0.014652109405096024
- 0.005219829257817624
- - 0.015779194743949565
- 0.004756183333318412
- - 0.016906280082803104
- 0.004251588844653625
- - 0.018033365421656643
- 0.0037043097058184066
- - 0.019160450760510185
- 0.0031123500588334935
- - 0.020287536099363724
- 0.0024734082883751674
- - 0.021414621438217266
- 0.0017848189081700674
- - 0.022541706777070805
- 0.0010434782608695764
- - 0.02271076957789885
- 0.000932277163774491
- - 0.022879832378726882
- 0.0008289887567437234
- - 0.023048895179554912
- 0.0007331474911749748
- - 0.023217957980382942
- 0.0006443535441272392
- - 0.023387020781210972
- 0.0005622616733019573
- - 0.023556083582039006
- 0.00048657250000223775
- - 0.023725146382867036
- 0.0004170256113273565
- - 0.023894209183695066
- 0.00035339404684813034
- - 0.0240632719845231
- 0.0002954798541404055
- - 0.02423233478535113
- 0.00024311048068332772
- - 0.02440139758617916
- 0.00019613582865082076
- - 0.024570460387007192
- 0.00015442584170933474
- - 0.024739523187835222
- 0.00011786852412895392
- - 0.024908585988663252
- 8.63683157012107e-05
- - 0.025077648789491286
- 5.984476344224332e-05
- - 0.025246711590319316
- 3.8231444443779204e-05
- - 0.025415774391147346
- 2.1475104644488353e-05
- - 0.025584837191975376
- 9.53498653863058e-06
- - 0.02575389999280341
- 2.38232550822063e-06
- - 0.02592296279363144
- 0.0
- - 0.03555149183126598
- 0.0
groove:
alpha1: 0.598668052835542
alpha2: 0.598668052835542
classifiers:
- circular_oval
- oval
- generic_elongation
contour_line:
depth: 0.008
length: 0.07433244283174234
type: LineString
width: 0.07110298366253195
depth: 0.008
flank_angle: 0.598668052835542
ground_width: 0.02468853599393468
r1: 0.006
r2: 0.04
type: CircularOvalGroove
usable_width: 0.04814264518817268
max_radius: 0.16
min_radius: 0.152
nominal_radius: 0.16
roll_torque: 3492.976239911318
rotational_frequency: 1
type: RollPass.Roll
working_radius: 0.1563255150095489
roll_force: 165212.10699162082
strain: 0.12962710273238837
type: RollPass
velocity: 0.1563255150095489
- array_values:
- 1
- 2
- 3
- 4
disk_elements: []
duration: 1
in_profile:
chemical_composition:
Cr: 0.05
Fe: 0.95
classifiers:
- circular_oval
- oval
- generic_elongation
cross_section:
area: 0.0006199236268730841
height: 0.018000000000000002
perimeter: 0.10779335271028952
type: Polygon
width: 0.04814264518817268
flow_stress: 100000000.0
length: 0.0
material:
- C45
- steel
strain: 0.12962710273238837
t: 0.2704916661950485
temperature: 1473.15
type: Transport.InProfile
iteration_precision: 0.01
label: I => II
out_profile:
chemical_composition:
Cr: 0.05
Fe: 0.95
classifiers:
- circular_oval
- oval
- generic_elongation
cross_section:
area: 0.0006199236268730841
height: 0.018000000000000002
perimeter: 0.10779335271028952
type: Polygon
width: 0.04814264518817268
flow_stress: 100000000.0
length: 0
material:
- C45
- steel
strain: 0
t: 1.2704916661950485
temperature: 1473.15
type: Transport.OutProfile
type: Transport
- disk_elements: []
duration: 0.37237657427182896
elongation: 1.2644736376968007
gap: 0.002
height: 0.025
in_profile:
chemical_composition:
Cr: 0.05
Fe: 0.95
classifiers:
- generic_elongation
- vertical
- circular_oval
- oval
- rotated
cross_section:
area: 0.000619923626873084
height: 0.04814264518817268
perimeter: 0.10779335271028952
type: Polygon
width: 0.018000000000000002
flow_stress: 100000000.0
height: 0.04814264518817268
length: 0
material:
- C45
- steel
strain: 0
t: 1.2704916661950485
temperature: 1473.15
type: RollPass.InProfile
width: 0.018000000000000002
iteration_precision: 0.01
label: Round II
length: 0.0574698817109208
log_elongation: 0.23465593890486666
out_profile:
chemical_composition:
Cr: 0.05
Fe: 0.95
classifiers:
- generic_elongation
- round
cross_section:
area: 0.0004902621995364455
height: 0.025
perimeter: 0.07857846976830599
type: Polygon
width: 0.024979346307209157
flow_stress: 100000000.0
length: 0.0
material:
- C45
- steel
strain: 0.23465593890486666
t: 1.6428682404668775
temperature: 1473.15
type: RollPass.OutProfile
width: 0.024979346307209157
roll:
contact_area: 0.0012350089741440056
contact_length: 0.0574698817109208
contour_points:
- - -0.01834689918426052
- 0.0
- - -0.013351029922818688
- 0.0
- - -0.013301581663845286
- 1.2233134055945113e-06
- - -0.013252133404871884
- 4.9022767898635865e-06
- - -0.013202685145898481
- 1.1064295739862586e-05
- - -0.013153236886925077
- 1.97561961675103e-05
- - -0.013103788627951675
- 3.1046057796098054e-05
- - -0.013054340368978273
- 4.502601677219755e-05
- - -0.01300489211000487
- 6.181632153374876e-05
- - -0.012955443851031468
- 8.157109158740206e-05
- - -0.012905995592058066
- 0.00010448649119935386
- - -0.012856547333084663
- 0.0001308124664665673
- - -0.01280709907411126
- 0.00016086995535589585
- - -0.012757650815137857
- 0.00019507687661000775
- - -0.012708202556164455
- 0.00023398891869609107
- - -0.012658754297191053
- 0.00027836681190381387
- - -0.01260930603821765
- 0.00032929464068613104
- - -0.012559857779244248
- 0.0003884064754824285
- - -0.012510409520270844
- 0.0004583752786104569
- - -0.012460961261297442
- 0.0005441735222940899
- - -0.01241151300232404
- 0.000657497509345915
- - -0.012362064743350639
- 0.0008518518518518549
- - -0.011743961506183107
- 0.003281281133176079
- - -0.011125858269015574
- 0.004697830971323894
- - -0.010507755031848042
- 0.005770309017369308
- - -0.009889651794680512
- 0.006644919056469634
- - -0.009271548557512978
- 0.00738381699142336
- - -0.008653445320345447
- 0.008020414851202327
- - -0.008035342083177915
- 0.008575138516298864
- - -0.007417238846010383
- 0.009061539042374908
- - -0.006799135608842851
- 0.009489125558051308
- - -0.0061810323716753185
- 0.009864844169167903
- - -0.005562929134507787
- 0.010193918860008075
- - -0.004944825897340255
- 0.010480361355157473
- - -0.004326722660172724
- 0.010727295980828142
- - -0.0037086194230051914
- 0.010937174790347531
- - -0.0030905161858376592
- 0.011111924277548776
- - -0.002472412948670127
- 0.011253047547906125
- - -0.0018543097115025949
- 0.011361696303251716
- - -0.0012362064743350627
- 0.011438721540126706
- - -0.0006181032371675305
- 0.01148470858243007
- - 0.0
- 0.0115
- - 0.0006181032371675305
- 0.01148470858243007
- - 0.0012362064743350627
- 0.011438721540126706
- - 0.0018543097115025949
- 0.011361696303251716
- - 0.002472412948670127
- 0.011253047547906125
- - 0.0030905161858376592
- 0.011111924277548776
- - 0.0037086194230051914
- 0.010937174790347531
- - 0.004326722660172724
- 0.010727295980828142
- - 0.004944825897340255
- 0.010480361355157473
- - 0.005562929134507787
- 0.010193918860008075
- - 0.0061810323716753185
- 0.009864844169167903
- - 0.006799135608842851
- 0.009489125558051308
- - 0.007417238846010383
- 0.009061539042374908
- - 0.008035342083177915
- 0.008575138516298864
- - 0.008653445320345447
- 0.008020414851202327
- - 0.009271548557512978
- 0.00738381699142336
- - 0.009889651794680512
- 0.006644919056469634
- - 0.010507755031848042
- 0.005770309017369308
- - 0.011125858269015574
- 0.004697830971323894
- - 0.011743961506183107
- 0.003281281133176079
- - 0.012362064743350639
- 0.0008518518518518549
- - 0.01241151300232404
- 0.000657497509345915
- - 0.012460961261297442
- 0.0005441735222940899
- - 0.012510409520270844
- 0.0004583752786104569
- - 0.012559857779244248
- 0.0003884064754824285
- - 0.01260930603821765
- 0.00032929464068613104
- - 0.012658754297191053
- 0.00027836681190381387
- - 0.012708202556164455
- 0.00023398891869609107
- - 0.012757650815137857
- 0.00019507687661000775
- - 0.01280709907411126
- 0.00016086995535589585
- - 0.012856547333084663
- 0.0001308124664665673
- - 0.012905995592058066
- 0.00010448649119935386
- - 0.012955443851031468
- 8.157109158740206e-05
- - 0.01300489211000487
- 6.181632153374876e-05
- - 0.013054340368978273
- 4.502601677219755e-05
- - 0.013103788627951675
- 3.1046057796098054e-05
- - 0.013153236886925077
- 1.97561961675103e-05
- - 0.013202685145898481
- 1.1064295739862586e-05
- - 0.013252133404871884
- 4.9022767898635865e-06
- - 0.013301581663845286
- 1.2233134055945113e-06
- - 0.013351029922818688
- 0.0
- - 0.01834689918426052
- 0.0
groove:
alpha1: 1.4221008325273343
alpha2: 1.4221008325273343
classifiers:
- generic_elongation
- round
contour_line:
depth: 0.0115
length: 0.04837185790523714
type: LineString
width: 0.03669379836852104
depth: 0.0115
flank_angle: 1.4221008325273343
ground_width: 0.02153391923035272
r1: 0.001
r2: 0.0125
type: RoundGroove
usable_width: 0.024979346307209157
max_radius: 0.16
min_radius: 0.1485
nominal_radius: 0.16
roll_torque: 3548.7909827990825
rotational_frequency: 1
type: RollPass.Roll
working_radius: 0.15433269889036763
roll_force: 123500.89741440056
strain: 0.23465593890486666
type: RollPass
velocity: 0.15433269889036763
export-csv
Exports the data to a CSV file via the pandas.DataFrame.to_csv()
method, using pyroll.export.to_pandas()
.
The file can be specified by the -f
/--file
option, which defaults to ./export.csv
.
So, execute f.e.
pyroll input-py solve export-csv -f my-results.csv
Which leads to a file similar to this
,duration,elongation,gap,height,in_profile.cross_section.height,in_profile.cross_section.perimeter,in_profile.cross_section.width,in_profile.flow_stress,in_profile.height,in_profile.length,in_profile.material,in_profile.strain,in_profile.temperature,in_profile.classifiers,in_profile.width,label,log_elongation,mean_flow_stress,out_profile.cross_section.height,out_profile.cross_section.perimeter,out_profile.cross_section.width,out_profile.flow_stress,out_profile.length,out_profile.material,out_profile.strain,out_profile.temperature,out_profile.classifiers,out_profile.width,roll.contact_area,roll.contact_length,roll.contour_line.depth,roll.contour_line.length,roll.contour_line.width,roll.groove.alpha1,roll.groove.alpha2,roll.groove.depth,roll.groove.r1,roll.groove.r2,roll.groove.classifiers,roll.groove.usable_width,roll.max_radius,roll.min_radius,roll.nominal_radius,roll.roll_torque,roll.rotational_frequency,roll_force
0,,1.1384603677535539,0.002,0.018000000000000002,0.03,0.09420993470864258,0.03,100000000,0.03,0,"C45, steel",0.0,1473.15,round,0.03,Oval I,0.12967679498342286,100000000,0.018000000000000002,0.10779462546810438,0.04814264518817268,100000000,0,"C45, steel",0.12967679498342286,1473.15,"oval, circular_oval",0.04814264518817268,0.0016521210699162083,0.04228474902373194,0.008,0.06025975303951582,0.05703051814598918,0.5986680528355425,0.5986680528355425,0.008,0.006,0.04,"oval, circular_oval",0.04814264518817268,0.16,0.152,0.16,3492.976239911318,1,165212.10699162082
1,1,,,,0.018000000000000002,0.10779462546810438,0.04814264518817268,100000000,,0,"C45, steel",0.12967679498342286,1473.15,"oval, circular_oval",,I => II,,,0.018000000000000002,0.10779462546810438,0.04814264518817268,100000000,0,"C45, steel",0.0,1473.15,"oval, circular_oval",,,,,,,,,,,,,,,,,,,
2,,1.2646102252632567,0.002,0.025,0.04814264518817268,0.10779462546810438,0.018000000000000002,100000000,0.04814264518817268,0,"C45, steel",0.0,1473.15,"oval, circular_oval",0.018000000000000002,Round II,0.23476395237851164,100000000,0.025,0.07857532958642108,0.02497934630720916,100000000,0,"C45, steel",0.23476395237851164,1473.15,round,0.02497934630720916,0.0012350089741440056,0.0574698817109208,0.0115,0.04104864528285382,0.029372265830201118,1.422100832527334,1.422100832527334,0.0115,0.001,0.0125,round,0.02497934630720916,0.16,0.1485,0.16,3548.7909827990825,1,123500.89741440056