Skip to content

Commit

Permalink
Merge pull request #354 from adtzlr/change-dof-shear
Browse files Browse the repository at this point in the history
Enhance `dof.shear(compression=(0, 0)`
  • Loading branch information
adtzlr authored Dec 1, 2022
2 parents aad66b1 + 4708ddb commit cdcb539
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file. The format
### Changed
- Enhance plotting with custom `x`- and `y`-data in `CharacteristicCurve.plot(x, y)` and allow a list of items for force evaluation in `CharacteristicCurve(items=[...])` to be passed.
- Enhance `math.linsteps(points=[0, 5, 0], num=[5, 10])` by supporting a list of substeps.
- Enhance compression of shear loadcase: Apply the compression on the bottom and the top `dof.shear(compression=(0, 0))`.

## [6.0.0] - 2022-11-20

Expand Down
11 changes: 8 additions & 3 deletions felupe/dof/_loadcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def planar(field, right=1, move=0.2, clamped=False):
return bounds, dict(dof0=dof0, dof1=dof1, ext0=ext0)


def shear(field, bottom=0, top=1, move=0.2, compression=0.0, sym=True):
def shear(field, bottom=0, top=1, move=0.2, compression=(0, 0), sym=True):
"""Define boundaries for shear loading between two clamped plates. The
bottom plate remains fixed while the shear is applied at the top plate."""

Expand All @@ -142,8 +142,13 @@ def shear(field, bottom=0, top=1, move=0.2, compression=0.0, sym=True):
bounds = {}

bounds["bottom"] = Boundary(f, fy=bottom, skip=(0, 1, 0))
bounds["compression"] = Boundary(f, fy=bottom, skip=(1, 0, 1), value=compression)
bounds["top"] = Boundary(f, fy=top, skip=(1, 0, 0))
bounds["top"] = Boundary(f, fy=top, skip=(1, 1, 0))
bounds["compression_bottom"] = Boundary(
f, fy=bottom, skip=(1, 0, 1), value=compression[0]
)
bounds["compression_top"] = Boundary(
f, fy=top, skip=(1, 0, 1), value=-compression[1]
)
bounds["move"] = Boundary(f, fy=top, skip=(0, 1, 1), value=move)

dof0, dof1 = partition(field, bounds)
Expand Down

0 comments on commit cdcb539

Please sign in to comment.