pyroll-tension-spreading-interaction 2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,435 @@
1
+ ## Python
2
+
3
+ .working
4
+ working
5
+ *.lock
6
+ .pytask.sqlite3
7
+
8
+ # Byte-compiled / optimized / DLL files
9
+ __pycache__/
10
+ *.py[cod]
11
+ *$py.class
12
+
13
+ # C extensions
14
+ *.so
15
+
16
+ # Distribution / packaging
17
+ .Python
18
+ build/
19
+ develop-eggs/
20
+ dist/
21
+ downloads/
22
+ eggs/
23
+ .eggs/
24
+ lib/
25
+ lib64/
26
+ parts/
27
+ sdist/
28
+ var/
29
+ wheels/
30
+ share/python-wheels/
31
+ *.egg-info/
32
+ .installed.cfg
33
+ *.egg
34
+ MANIFEST
35
+
36
+ # PyInstaller
37
+ # Usually these files are written by a python script from a template
38
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
39
+ *.manifest
40
+ *.spec
41
+
42
+ # Installer logs
43
+ pip-log.txt
44
+ pip-delete-this-directory.txt
45
+
46
+ # Unit test / coverage reports
47
+ htmlcov/
48
+ .tox/
49
+ .nox/
50
+ .coverage
51
+ .coverage.*
52
+ .cache
53
+ nosetests.xml
54
+ coverage.xml
55
+ *.cover
56
+ *.py,cover
57
+ .hypothesis/
58
+ .pytest_cache/
59
+ cover/
60
+
61
+ # Translations
62
+ *.mo
63
+ *.pot
64
+
65
+ # Django stuff:
66
+ *.log
67
+ local_settings.py
68
+ db.sqlite3
69
+ db.sqlite3-journal
70
+
71
+ # Flask stuff:
72
+ instance/
73
+ .webassets-cache
74
+
75
+ # Scrapy stuff:
76
+ .scrapy
77
+
78
+ # Sphinx documentation
79
+ docs/_build/
80
+
81
+ # PyBuilder
82
+ .pybuilder/
83
+ target/
84
+
85
+ # Jupyter Notebook
86
+ .ipynb_checkpoints
87
+
88
+ # IPython
89
+ profile_default/
90
+ ipython_config.py
91
+
92
+ # pyenv
93
+ # For a library or package, you might want to ignore these files since the code is
94
+ # intended to run in multiple environments; otherwise, check them in:
95
+ # .python-version
96
+
97
+ # pipenv
98
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
99
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
100
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
101
+ # install all needed dependencies.
102
+ #Pipfile.lock
103
+
104
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
105
+ __pypackages__/
106
+
107
+ # Celery stuff
108
+ celerybeat-schedule
109
+ celerybeat.pid
110
+
111
+ # SageMath parsed files
112
+ *.sage.py
113
+
114
+ # Environments
115
+ .env
116
+ .venv
117
+ env/
118
+ venv/
119
+ ENV/
120
+ env.bak/
121
+ venv.bak/
122
+
123
+ # Spyder project settings
124
+ .spyderproject
125
+ .spyproject
126
+
127
+ # Rope project settings
128
+ .ropeproject
129
+
130
+ # mkdocs documentation
131
+ /site
132
+
133
+ # mypy
134
+ .mypy_cache/
135
+ .dmypy.json
136
+ dmypy.json
137
+
138
+ # Pyre type checker
139
+ .pyre/
140
+
141
+ # pytype static type analyzer
142
+ .pytype/
143
+
144
+ # Cython debug symbols
145
+ cython_debug/
146
+
147
+ ## TeX
148
+
149
+ ## Core latex/pdflatex auxiliary files:
150
+ *.aux
151
+ *.lof
152
+ *.lot
153
+ *.fls
154
+ *.out
155
+ *.toc
156
+ *.fmt
157
+ *.fot
158
+ *.cb
159
+ *.cb2
160
+ .*.lb
161
+
162
+ ## Intermediate documents:
163
+ *.dvi
164
+ *.xdv
165
+ *-converted-to.*
166
+ # these rules might exclude image files for figures etc.
167
+ # *.ps
168
+ # *.eps
169
+ # *.pdf
170
+
171
+ ## Generated if empty string is given at "Please type another file name for output:"
172
+ .pdf
173
+
174
+ ## Bibliography auxiliary files (bibtex/biblatex/biber):
175
+ *.bbl
176
+ *.bcf
177
+ *.blg
178
+ *-blx.aux
179
+ *-blx.bib
180
+ *.run.xml
181
+
182
+ ## Build tool auxiliary files:
183
+ *.fdb_latexmk
184
+ *.synctex
185
+ *.synctex(busy)
186
+ *.synctex.gz
187
+ *.synctex.gz(busy)
188
+ *.pdfsync
189
+
190
+ ## Build tool directories for auxiliary files
191
+ # latexrun
192
+ latex.out/
193
+
194
+ ## Auxiliary and intermediate files from other packages:
195
+ # algorithms
196
+ *.alg
197
+ *.loa
198
+
199
+ # achemso
200
+ acs-*.bib
201
+
202
+ # amsthm
203
+ *.thm
204
+
205
+ # beamer
206
+ *.nav
207
+ *.pre
208
+ *.snm
209
+ *.vrb
210
+
211
+ # changes
212
+ *.soc
213
+
214
+ # comment
215
+ *.cut
216
+
217
+ # cprotect
218
+ *.cpt
219
+
220
+ # elsarticle (documentclass of Elsevier journals)
221
+ *.spl
222
+
223
+ # endnotes
224
+ *.ent
225
+
226
+ *.lox
227
+
228
+ # feynmf/feynmp
229
+ *.mf
230
+ *.mp
231
+ *.t[1-9]
232
+ *.t[1-9][0-9]
233
+ *.tfm
234
+
235
+ #(r)(e)ledmac/(r)(e)ledpar
236
+ *.end
237
+ *.?end
238
+ *.[1-9]
239
+ *.[1-9][0-9]
240
+ *.[1-9][0-9][0-9]
241
+ *.[1-9]R
242
+ *.[1-9][0-9]R
243
+ *.[1-9][0-9][0-9]R
244
+ *.eledsec[1-9]
245
+ *.eledsec[1-9]R
246
+ *.eledsec[1-9][0-9]
247
+ *.eledsec[1-9][0-9]R
248
+ *.eledsec[1-9][0-9][0-9]
249
+ *.eledsec[1-9][0-9][0-9]R
250
+
251
+ # glossaries
252
+ *.acn
253
+ *.acr
254
+ *.glg
255
+ *.glo
256
+ *.gls
257
+ *.glsdefs
258
+ *.lzo
259
+ *.lzs
260
+
261
+ # uncomment this for glossaries-extra (will ignore makeindex's style files!)
262
+ # *.ist
263
+
264
+ # gnuplottex
265
+ *-gnuplottex-*
266
+
267
+ # gregoriotex
268
+ *.gaux
269
+ *.glog
270
+ *.gtex
271
+
272
+ # htlatex
273
+ *.4ct
274
+ *.4tc
275
+ *.idv
276
+ *.lg
277
+ *.trc
278
+ *.xref
279
+
280
+ # hyperref
281
+ *.brf
282
+
283
+ # knitr
284
+ *-concordance.tex
285
+ # *.tikz
286
+ *-tikzDictionary
287
+
288
+ # listings
289
+ *.lol
290
+
291
+ # luatexja-ruby
292
+ *.ltjruby
293
+
294
+ # makeidx
295
+ *.idx
296
+ *.ilg
297
+ *.ind
298
+
299
+ # minitoc
300
+ *.maf
301
+ *.mlf
302
+ *.mlt
303
+ *.mtc[0-9]*
304
+ *.slf[0-9]*
305
+ *.slt[0-9]*
306
+ *.stc[0-9]*
307
+
308
+ # minted
309
+ _minted*
310
+ *.pyg
311
+
312
+ # morewrites
313
+ *.mw
314
+
315
+ # newpax
316
+ *.newpax
317
+
318
+ # nomencl
319
+ *.nlg
320
+ *.nlo
321
+ *.nls
322
+
323
+ # pax
324
+ *.pax
325
+
326
+ # pdfpcnotes
327
+ *.pdfpc
328
+
329
+ # sagetex
330
+ *.sagetex.sage
331
+ *.sagetex.py
332
+ *.sagetex.scmd
333
+
334
+ # scrwfile
335
+ *.wrt
336
+
337
+ # sympy
338
+ *.sout
339
+ *.sympy
340
+ sympy-plots-for-*.tex/
341
+
342
+ # pdfcomment
343
+ *.upa
344
+ *.upb
345
+
346
+ # pythontex
347
+ *.pytxcode
348
+ pythontex-files-*/
349
+
350
+ # tcolorbox
351
+ *.listing
352
+
353
+ # thmtools
354
+ *.loe
355
+
356
+ # TikZ & PGF
357
+ *.dpth
358
+ *.md5
359
+ *.auxlock
360
+
361
+ # todonotes
362
+ *.tdo
363
+
364
+ # vhistory
365
+ *.hst
366
+ *.ver
367
+
368
+ # easy
369
+ *.lod
370
+
371
+ # xcolor
372
+ *.xcp
373
+
374
+ # xmpincl
375
+ *.xmpi
376
+
377
+ # xindy
378
+ *.xdy
379
+
380
+ # xypic precompiled matrices and outlines
381
+ *.xyc
382
+ *.xyd
383
+
384
+ # endfloat
385
+ *.ttt
386
+ *.fff
387
+
388
+ # Latexian
389
+ TSWLatexianTemp*
390
+
391
+ ## Editors:
392
+ # WinEdt
393
+ *.bak
394
+ *.sav
395
+
396
+ # Texpad
397
+ .texpadtmp
398
+
399
+ # LyX
400
+ *.lyx~
401
+
402
+ # Kile
403
+ *.backup
404
+
405
+ # gummi
406
+ .*.swp
407
+
408
+ # KBibTeX
409
+ *~[0-9]*
410
+
411
+ # TeXnicCenter
412
+ *.tps
413
+
414
+ # auto folder when using emacs and auctex
415
+ ./auto/*
416
+ *.el
417
+
418
+ # expex forward references with \gathertags
419
+ *-tags.tex
420
+
421
+ # standalone packages
422
+ *.sta
423
+
424
+ # Makeindex log files
425
+ *.lpz
426
+
427
+ # xwatermark package
428
+ *.xwm
429
+
430
+ ## JetBrains
431
+
432
+ .idea
433
+
434
+ ## HTML report
435
+ /out/report.html
@@ -0,0 +1,11 @@
1
+ Copyright 2023 Christoph Renzing
2
+
3
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4
+
5
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6
+
7
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8
+
9
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
10
+
11
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,26 @@
1
+ Metadata-Version: 2.1
2
+ Name: pyroll-tension-spreading-interaction
3
+ Version: 2.1
4
+ Summary: Plugin for PyRollL providing a model calculating the influence of tension on spreading.
5
+ Author-email: Christoph Renzing <christoph.renzing@imf.tu-freiberg.de>
6
+ License-Expression: BSD-3-Clause
7
+ License-File: LICENSE
8
+ Classifier: Intended Audience :: Manufacturing
9
+ Classifier: Intended Audience :: Science/Research
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Topic :: Scientific/Engineering
12
+ Requires-Python: <4.0,>=3.9
13
+ Requires-Dist: pyroll-core~=2.0
14
+ Description-Content-Type: text/markdown
15
+
16
+ # PyRolL tension spreading interaction
17
+
18
+ PyRolL plugin calculating the spreading influenced by longitudinal tensions according to the model by Mauk and Dobler.
19
+
20
+ For the docs, see [here](docs/docs.pdf).
21
+
22
+ This project is licensed under the [BSD-3-Clause license](LICENSE).
23
+
24
+ The package is available via [PyPi](https://pypi.org/project/pyroll-tension-spreading-interaction/) and can be installed with
25
+
26
+ pip install pyroll-tension-spreading-interaction
@@ -0,0 +1,11 @@
1
+ # PyRolL tension spreading interaction
2
+
3
+ PyRolL plugin calculating the spreading influenced by longitudinal tensions according to the model by Mauk and Dobler.
4
+
5
+ For the docs, see [here](docs/docs.pdf).
6
+
7
+ This project is licensed under the [BSD-3-Clause license](LICENSE).
8
+
9
+ The package is available via [PyPi](https://pypi.org/project/pyroll-tension-spreading-interaction/) and can be installed with
10
+
11
+ pip install pyroll-tension-spreading-interaction
@@ -0,0 +1,39 @@
1
+ [build]
2
+ packages = [
3
+ "pyroll" # place your package in the pyroll namespace
4
+ ]
5
+
6
+ [version]
7
+ path = "pyroll/dobler_mauk_tension_model.py"
8
+
9
+ [envs.default]
10
+ path = ".venv"
11
+ dependencies = [
12
+ "pytest ~= 7.0",
13
+ "pyroll-report ~= 2.0",
14
+ "pyroll-wusatowski-spreading ~= 2.0"
15
+ ]
16
+
17
+
18
+ [envs.docs]
19
+ path = ""
20
+ dependencies = [
21
+ "matplotlib",
22
+ "pygments ~= 2.0",
23
+ "pytask ~= 0.2.0",
24
+ "pytask_latex ~= 0.2.0",
25
+ "jinja2",
26
+ "toml"
27
+ ]
28
+
29
+ [envs.docs.scripts]
30
+ build = "latexmk --cd --pdf --shell-escape docs/docs" # compile LaTeX docs with latexmk
31
+
32
+ [envs.test]
33
+ path = ""
34
+
35
+ [envs.test.scripts]
36
+ all = "pytest"
37
+
38
+ [[envs.test.matrix]]
39
+ python = ["3.9", "3.10", "3.11"]
@@ -0,0 +1,29 @@
1
+ [project]
2
+ name = "pyroll-tension-spreading-interaction"
3
+ description = "Plugin for PyRollL providing a model calculating the influence of tension on spreading."
4
+ authors = [
5
+ { name = "Christoph Renzing", email = "christoph.renzing@imf.tu-freiberg.de" }
6
+ ]
7
+ license = "BSD-3-Clause"
8
+ packages = [
9
+ { include = "pyroll/tension_spreading_interaction" }
10
+ ]
11
+ readme = "README.md"
12
+ classifiers = [
13
+ "Intended Audience :: Science/Research",
14
+ "Intended Audience :: Manufacturing",
15
+ "Operating System :: OS Independent",
16
+ "Topic :: Scientific/Engineering"
17
+ ]
18
+
19
+ requires-python = ">=3.9, <4.0"
20
+ dependencies = [
21
+ "pyroll-core ~= 2.0"
22
+ ]
23
+
24
+
25
+ dynamic = ["version"]
26
+
27
+ [build-system]
28
+ requires = ["hatchling"]
29
+ build-backend = "hatchling.build"
@@ -0,0 +1,67 @@
1
+ import numpy as np
2
+ from pyroll.core import RollPass, Hook
3
+ from dataclasses import dataclass
4
+
5
+ VERSION = "2.1"
6
+
7
+
8
+ @dataclass
9
+ class TensionElongationModel:
10
+ """
11
+ Class representing an elongation model through tension published by Mauk and Dobler.
12
+ """
13
+ rp: RollPass
14
+ m11: float = 1.05502
15
+ m12: float = 0.100816
16
+ m13: float = -0.591029
17
+ m21: float = -0.886507
18
+ m22: float = -0.00258613
19
+ m23: float = 0.159971
20
+ m31: float = -0.347681
21
+ m32: float = -0.0457338
22
+ m33: float = 0.0525161
23
+
24
+ def __post_init__(self):
25
+ self.mean_flow_stress = (self.rp.in_profile.flow_stress + 2 * self.rp.out_profile.flow_stress) / 3
26
+ self.mean_cross_section = (
27
+ self.rp.in_profile.cross_section.area + 2 * self.rp.out_profile.cross_section.area) / 3
28
+
29
+ self.rel_back_tension = self.rp.back_tension / self.mean_flow_stress
30
+ self.rel_front_tension = self.rp.front_tension / self.mean_flow_stress
31
+
32
+ self.first_coefficient = self.m11 * self.rp.rel_draught + self.m12 * (
33
+ self.rp.in_profile.width / self.rp.in_profile.height) + self.m13 * (
34
+ self.rp.roll.contact_area / self.mean_cross_section)
35
+ self.second_coefficient = self.m21 * self.rp.rel_draught + self.m22 * (
36
+ self.rp.in_profile.width / self.rp.in_profile.height) + self.m23 * (
37
+ self.rp.roll.contact_area / self.mean_cross_section)
38
+ self.third_coefficient = self.m31 * self.rp.rel_draught + self.m32 * (
39
+ self.rp.in_profile.width / self.rp.in_profile.height) + self.m33 * (
40
+ self.rp.roll.contact_area / self.mean_cross_section)
41
+ self.log_elongation_through_tension = self.tension_elongation()
42
+
43
+ def tension_elongation(self):
44
+ return self.first_coefficient * self.rel_back_tension ** 2 + self.second_coefficient * self.rel_back_tension + self.third_coefficient * self.rel_front_tension
45
+
46
+
47
+ RollPass.tension_model = Hook[TensionElongationModel]()
48
+ """Tension model according to Dobler and Mauk."""
49
+
50
+
51
+ @RollPass.tension_model
52
+ def tension_model(self: RollPass):
53
+ return TensionElongationModel(self)
54
+
55
+
56
+ @RollPass.spread(wrapper=True)
57
+ def spread(self: RollPass, cycle):
58
+ if cycle:
59
+ return None
60
+
61
+ spread_without_tension = (yield)
62
+
63
+ elongation_with_tension = np.exp(self.log_elongation + self.tension_model.log_elongation_through_tension)
64
+ spread_with_tension = (spread_without_tension * self.draught * self.elongation) / (
65
+ self.draught * elongation_with_tension)
66
+
67
+ return spread_with_tension