Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance dof.shear(compression=(0, 0) #354

Merged
merged 2 commits into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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