## Beam configuration examples from Beam module from sympy


```python
import numpy as np
import sympy as sp

from sympy.physics.continuum_mechanics.beam import Beam
# https://docs.sympy.org/latest/modules/physics/continuum_mechanics/beam_problems.html

sp.init_printing()
```


```python
# 3 point bending example

x, E, I, F = sp.symbols('x E I F')
l = sp.symbols('l', positive=True) # the l sign
b3p = Beam(l, E, I)
R1,R2 = sp.symbols('R1 R2')
b3p.apply_load(R1, 0, -1)
b3p.apply_load(R2, l, -1)
b3p.apply_load(-F, l/2, -1)
b3p.bc_deflection = [(0, 0),(l, 0)]
b3p.solve_for_reaction_loads(R1, R2)
```




```python
# 4 point bending example

x, E, I, F = sp.symbols('x E I F')
l = sp.symbols('l', positive=True)
b4p = Beam(l, E, I)
R1,R2 = sp.symbols('R1  R2')
b4p.apply_load(R1, 0, -1)
b4p.apply_load(R2, l, -1)
b4p.apply_load(-F, l/3, -1)
b4p.apply_load(-F, 2*l/3, -1)
b4p.bc_deflection = [(0, 0),(l, 0)]
b4p.solve_for_reaction_loads(R1, R2)
```




```python
# single moment example

x, E, I, F = sp.symbols('x E I F')
l = sp.symbols('l', positive=True) # the l sign
bmo = Beam(l, E, I)
R1,R2 = sp.symbols('R1 R2')
bmo.apply_load(R1, 0, -1)
bmo.apply_load(R2, l, -1)
bmo.apply_load(F, l/2, -2)
bmo.bc_deflection = [(0, 0),(l, 0)]
bmo.solve_for_reaction_loads(R1, R2)
```




```python
# distrubuted load simple beam example

E,I,M,V = sp.symbols('E I M V')
bdi = Beam(l, E, I)
E,I,R1,R2 = sp.symbols('E I R1 R2')
bdi.apply_load(R1, 0, -1)
bdi.apply_load(R2, l, -1)
bdi.apply_load(-F, 0, 0)
bdi.bc_deflection = [(0, 0),(l, 0)]
bdi.solve_for_reaction_loads(R1, R2)

```




```python
# 3 span distributed load example

x, E, I, F = sp.symbols('x E I F')
l = sp.symbols('l', positive=True)
b3s = Beam(l, E, I)
R1,R2,R3,R4 = sp.symbols('R1 R2 R3 R4')
b3s.apply_load(R1, 0, -1)
b3s.apply_load(R2, l/3, -1)
b3s.apply_load(R3, 2*l/3, -1)
b3s.apply_load(R4, l, -1)
b3s.apply_load(-F, 0, 0)
b3s.bc_deflection = [(0, 0),(l/3, 0),(2*l/3, 0),(l, 0)]
b3s.solve_for_reaction_loads(R1, R2, R3,R4)
```




```python
# fixed support example

E, I, F = sp.symbols('E I F')
# l = sp.symbols('l', positive=True)
bf = Beam(l, E, I)
R1,R2 = sp.symbols('R1  R2')
M1, M2 = sp.symbols('M1, M2')
bf.apply_load(R1, 0, -1)
bf.apply_load(M1, 0, -2)
bf.apply_load(R2, l, -1)
bf.apply_load(M2, l, -2)
bf.apply_load(-F, l/2, -1)
bf.bc_deflection = [(0, 0),(l, 0)]
bf.bc_slope = [(0, 0),(l, 0)]
bf.solve_for_reaction_loads(R1, R2, M1, M2)
```



d1f4e40e60dffeeccdba0d925c95539c4c79ea3d
ipynb
Jupyter Notebook
notebooks/deflection/external_libraries/sympy_beam/beam_configs_examples.ipynb
bmcs-group/bmcs_beam
b53967d0d0461657ec914a3256ec40f9dcff80d5
MIT
2021-05-07T11:10:27.000Z
2021-05-07T11:10:27.000Z
notebooks/deflection/external_libraries/sympy_beam/beam_configs_examples.ipynb
bmcs-group/bmcs_beam
b53967d0d0461657ec914a3256ec40f9dcff80d5
MIT
notebooks/deflection/external_libraries/sympy_beam/beam_configs_examples.ipynb
bmcs-group/bmcs_beam
b53967d0d0461657ec914a3256ec40f9dcff80d5
MIT
Qwen/Qwen-72B
1. YES
2. YES