gearbox.fem.calculix#
Finite-element analysis of gears with CalculiX.
The meshes come from gearbox.fem.mesh. Units are mm, N and MPa. CalculiX is an external
program: install it with conda install -c conda-forge calculix and either put ccx on the
PATH, set the GEARBOX_CCX environment variable or pass its location explicitly.
- CONTACT_SETTINGS = ToothMeshSettings(root_size=0.2, fillet_size=0.05, flank_size=0.015, tooth_elements=16, rim_elements=None, surface_growth=1.2, variant='fillet_block', fillet_angle=30.0, cross_angle=30.0, width_elements=None, order=1, bore_diameter=None)#
flank elements fine enough for the Hertzian band.
- Type:
Default mesh of
solve_contact()
- class BendingResult[source]#
Bases:
objectResult of
solve_bending().- max_principal_stress#
Largest first principal stress at the fillet nodes of the loaded tooth [MPa]; this is the tensile root stress.
- Type:
- reaction_torque#
Moment of the reactions at the bore about the gear axis [N*mm] (per unit width in 2D).
- Type:
- applied_torque#
Ft * r_pitch, the torque the load stands for (per unit width in 2D); it must equalreaction_torque. The reaction force itself is not a good check for helical gears: the pressure vectors turn with the helix, so their sum is smaller than the applied force.- Type:
- stresses#
Nodal stress components of the solution,
{node: (sxx, syy, szz, sxy, syz, szx)}.
- __init__(max_principal_stress, max_von_mises_stress, max_displacement, applied_force, reaction_torque, applied_torque, load_radius, load_faces, mesh, files=<factory>, stresses=<factory>)#
- class ContactResult[source]#
Bases:
objectResult of
solve_contact().The stress and pressure summaries are scaled from the torque reached by the last CalculiX run to the requested torque: stresses in proportion to the torque, the contact pressure in proportion to its square root (Hertz). The two torques differ by at most
tolerance.- max_contact_pressure#
Largest contact pressure on the flanks [MPa]; the Hertzian pressure
sigma_Hof the meshing teeth.- Type:
- max_root_stress_pinion#
Largest first principal stress at the fillet nodes of the pinion [MPa].
- Type:
- mesh_position#
Rotation of the pinion from the symmetric mesh position, the
pinion_rotationofmesh_pair()[deg].- Type:
- stresses#
Nodal stress components of the last run (at
applied_torque, not scaled),{node: (sxx, syy, szz, sxy, syz, szx)}.
- contact_pressure#
Contact pressure of the last run at the pinion flank nodes (not scaled),
{node: pressure}.
- displacements#
Nodal displacements of the last run (not scaled),
{node: (ux, uy, uz)}. The contact happens in the displaced position: the pinion turns bybore_rotation, tens of micrometres at the flank.
- __init__(max_contact_pressure, contact_radius, contact_nodes, max_root_stress_pinion, max_root_stress_wheel, max_von_mises_stress, applied_torque, requested_torque, bore_rotation, mesh_position, runs, mesh, files=<factory>, stresses=<factory>, contact_pressure=<factory>, displacements=<factory>)#
- class ElasticMaterial[source]#
Bases:
objectLinear elastic isotropic material.
- __init__(youngs_modulus=206000.0, poisson_ratio=0.3)#
- find_ccx(path=None)[source]#
Locate the CalculiX executable.
An explicit
pathis used as given; otherwise theGEARBOX_CCXenvironment variable and then thePATHare searched.- Raises:
FileNotFoundError – If CalculiX cannot be found.
- Return type:
- solve_bending(subject, output_dir, tangential_force=None, model_name='bending', dimension=Dimension.THREE_D, settings=None, teeth=3, side='ccw', load_radius=None, load_height=None, material=None, member='pinion', ccx=None)[source]#
Bending of a tooth loaded on its flank, with the bore fixed.
Given a
Transmission, the tooth of its pinion (or of its wheel, seemember) carries the nominal tangential force of the transmission at the outer point of single pair contact, where ISO 6336-3 loads it: the pointDof the line of action for the pinion,Bfor the wheel (seegearbox.fem.post.LineOfAction). Given a bareGear, there is no mesh to take these from: the force is required and the band ends at the tooth tip unlessload_radiussays otherwise.A sector of
teethconsecutive teeth is meshed and the middle tooth is loaded by a uniform pressure normal to the flank, on the faces overlapping a band of heightload_heightthat ends atload_radius(so at least one ring of faces is loaded). The normal force isFt / (cos(alpha_t) * cos(beta_b))in 3D andFt / (b * cos(alpha_t))per unit width in 2D (plane strain), the force that gives the nominal tangential forceFtat the reference circle. The helical contact line is not modelled: the band is a circle of constant radius across the face width.- Parameters:
subject (Transmission | Gear) – A transmission, or a single gear (never modified).
output_dir (str | Path) – Folder for the mesh, the deck and the results, created if missing.
tangential_force (float | None) – Nominal tangential force
Ftover the face width [N]; thenominal_tangential_forceof a transmission by default, required for a gear.model_name (str) – Base name of the files; spaces are replaced by underscores.
dimension (Dimension | str | int) –
"3D"(hexahedra) or"2D"(plane strain, quadrilaterals).settings (ToothMeshSettings | None) – Mesh settings,
ToothMeshSettingsdefaults if omitted.teeth (int) – Teeth in the sector, 3 or more recommended.
side (str) –
"ccw"or"cw", the flank of the middle tooth that is loaded.load_radius (float | None) – Radius where the loaded band ends [mm]. By default the band is centred on the outer point of single pair contact for a transmission and ends at the tip for a gear.
load_height (float | None) – Radial height of the loaded band [mm]; 0.1 modules for a transmission, 0.15 for a gear by default.
material (ElasticMaterial | None) – Elastic properties, steel by default.
member (str) –
"pinion"or"wheel", the gear of a transmission that is analysed.ccx (str | Path | None) – Location of the CalculiX executable, see
find_ccx().
- Returns:
- Raises:
FileNotFoundError – If CalculiX is not found.
ValueError – For an invalid argument or if the band contains no mesh faces.
RuntimeError – If CalculiX fails.
- Return type:
- solve_contact(transmission, output_dir, tangential_force=None, model_name='contact', dimension=Dimension.TWO_D, settings=None, teeth=(3, 4), pinion_rotation=None, materials=None, contact_stiffness=100.0, tolerance=0.05, initial_rotation=None, ccx=None)[source]#
Contact between the teeth of a gear pair loaded by a torque.
The pair is meshed with
mesh_pair(), by default in the position where the flanks touch at the pitch point (pinion_rotation=None). The bore of the wheel is fixed and the bore of the pinion is turned rigidly counter-clockwise, so the pinion drives on the flank that leads in that direction. CalculiX solves the frictionless contact with a penalty (surface-to-surface, linear pressure-overclosure). The rotation is adjusted, one CalculiX run at a time, until the reaction torque of the pinion is withintoleranceofFt * d1 / 2; one or two runs are usually needed. The results are then scaled to that torque, seeContactResult.With the default mesh and penalty, the contact pressure of a spur pair at the pitch point agrees with Hertz’ theory within 1 % (
tests/test_fem_calculix.py); a coarser flank mesh or a softer penalty widen the contact band and change the peak by 10 % or more.- Parameters:
transmission (Transmission | Sequence[Gear]) – A transmission, or a
(pinion, wheel)sequence of gears.output_dir (str | Path) – Folder for the mesh, the deck and the results, created if missing.
tangential_force (float | None) – Nominal tangential force
Ftat the reference circle of the pinion [N];Transmission.nominal_tangential_forceby default.model_name (str) – Base name of the files; spaces are replaced by underscores.
dimension (Dimension | str | int) –
"2D"(plane strain, per unit of the smaller face width) or"3D".settings (ToothMeshSettings | Sequence[ToothMeshSettings] | None) – Mesh settings, one for both gears or a
(pinion, wheel)pair;CONTACT_SETTINGSby default. The flank elements must be several times smaller than the Hertzian contact width.teeth (tuple[int, int]) – Teeth meshed on the
(pinion, wheel). The default puts two teeth of each gear on either side of the contact; a loaded tooth at the end of a sector is too weak.pinion_rotation (float | None) – Mesh position, see
mesh_pair()[deg];Noneputs the contact at the pitch point.materials (ElasticMaterial | Sequence[ElasticMaterial] | None) – Elastic properties, one for both gears or a
(pinion, wheel)pair; theelastic_modulusandpoissons_ratioof the gear materials by default.contact_stiffness (float) – Penalty stiffness of the contact, in Young’s moduli per mm.
tolerance (float) – Largest relative difference between the reached and the requested torque.
initial_rotation (float | None) – First guess of the rotation of the pinion bore [rad], for instance the
bore_rotationof a result at a nearby mesh position; estimated from a typical mesh stiffness if omitted.ccx (str | Path | None) – Location of the CalculiX executable, see
find_ccx().
- Returns:
- Raises:
FileNotFoundError – If CalculiX is not found.
ValueError – For an invalid argument.
RuntimeError – If CalculiX fails or the torque is not reached in four runs.
- Return type: