Download 112.py from TestCaseGeneration/NumFEM_Eval: direct link, hf CLI and curl.
- Browser
- Download file 633 Bytes
-
https://huggingface.co/datasets/TestCaseGeneration/NumFEM_Eval/resolve/main/112.py
- Command line
-
hf download hf://datasets/TestCaseGeneration/NumFEM_Eval/112.py
-
curl -L -o 112.py https://huggingface.co/datasets/TestCaseGeneration/NumFEM_Eval/resolve/main/112.py
633 Bytes
| import ross as rs | |
| import plotly.io as pio | |
| pio.renderers.default = "notebook" | |
| steel = rs.materials.steel | |
| number_of_elements = [2, 3, 4, 5, 6, 7, 8] | |
| def create_rotor(n_el, R, shear_effects=False, rotary_inertia=False): | |
| L_total = 1 | |
| D = R * L_total | |
| shaft = [ rs.ShaftElement( 1.0 / (n_el), idl=0, odl=D, material=steel, shear_effects=shear_effects, rotary_inertia=rotary_inertia, ) for i in range(n_el) ] | |
| bearings = [ rs.BearingElement(0, kxx=1e15, cxx=0), rs.BearingElement(n_el, kxx=1e15, cxx=0), ] | |
| return rs.Rotor(shaft_elements=shaft, bearing_elements=bearings) | |
| n_eigen = 8 | |
| R = 0.04 | |
| rotor_80 = create_rotor(80, R) |