Material
fpc.material
material.py - material science and strength of materials.
This class covers how materials deform and fail under load: Hooke's law, the stress-strain relationship, beam bending, thermal expansion, and column buckling. These are the calculations that decide whether a part is stiff enough, strong enough, and stable enough.
Material
Strength-of-materials and material-property calculations.
Source code in fpc/material.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |
stress(*, force, area)
Engineering stress: sigma = F / A.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
force
|
applied axial force [N] |
required | |
area
|
original cross-sectional area [m^2] |
required |
Returns:
| Type | Description |
|---|---|
|
stress [Pa] |
Source code in fpc/material.py
18 19 20 21 22 23 24 25 | |
strain(*, change_in_length, original_length)
Engineering strain: epsilon = dL / L0 (dimensionless).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
change_in_length
|
change in length dL [m] |
required | |
original_length
|
original length L0 [m] |
required |
Returns:
| Type | Description |
|---|---|
|
strain [-] |
Source code in fpc/material.py
27 28 29 30 31 32 33 34 | |
youngs_modulus(*, stress, strain)
Young's modulus (stiffness) from Hooke's law: E = sigma / strain.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stress
|
applied stress [Pa] |
required | |
strain
|
resulting strain [-] |
required |
Returns:
| Type | Description |
|---|---|
|
Young's modulus [Pa] |
Source code in fpc/material.py
36 37 38 39 40 41 42 43 | |
axial_deformation(*, force, length, area, modulus)
Axial stretch/compression of a bar: dL = FL / (AE).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
force
|
axial force [N] |
required | |
length
|
original length L [m] |
required | |
area
|
cross-sectional area A [m^2] |
required | |
modulus
|
Young's modulus E [Pa] |
required |
Returns:
| Type | Description |
|---|---|
|
change in length [m] |
Source code in fpc/material.py
45 46 47 48 49 50 51 52 53 54 | |
bending_stress(*, moment, distance, moment_of_inertia)
Bending (flexural) stress in a beam: sigma = M*c / I.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
moment
|
bending moment M [N*m] |
required | |
distance
|
distance from neutral axis to the fibre c [m] |
required | |
moment_of_inertia
|
second moment of area I [m^4] |
required |
Returns:
| Type | Description |
|---|---|
|
bending stress [Pa] |
Source code in fpc/material.py
56 57 58 59 60 61 62 63 64 | |
thermal_expansion(*, coefficient, original_length, delta_temperature)
Length change from temperature: dL = alpha * L0 * dT.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
coefficient
|
linear expansion coefficient alpha [1/K] |
required | |
original_length
|
original length L0 [m] |
required | |
delta_temperature
|
temperature change dT [K] |
required |
Returns:
| Type | Description |
|---|---|
|
change in length [m] |
Source code in fpc/material.py
66 67 68 69 70 71 72 73 74 | |
euler_buckling_load(*, modulus, moment_of_inertia, length, end_factor=1.0)
Critical buckling load of a slender column (Euler's formula).
P_cr = pi^2 * E * I / (K*L)^2.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
modulus
|
Young's modulus E [Pa] |
required | |
moment_of_inertia
|
smallest second moment of area I [m^4] |
required | |
length
|
unsupported column length L [m] |
required | |
end_factor
|
effective-length factor K (1.0 pinned-pinned, 0.5 fixed-fixed, 2.0 fixed-free), defaults to pinned-pinned |
1.0
|
Returns:
| Type | Description |
|---|---|
|
critical axial load [N] |
Source code in fpc/material.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |