Releases: adtzlr/felupe
Releases · adtzlr/felupe
v8.2.1
[8.2.1] - 2024-03-30
Fixed
- Fix
FieldContainer.evaluate.strain(fun=lambda stretch: stretch)
for custom strain-stretch callables. Thefun
-argument was previously ignored.
What's Changed
- Add
field.EvaluateFieldContainer(field)
by @adtzlr in #728 - Outsource
EvaluateFieldContainer
tofield/_evaluate.py
by @adtzlr in #729 - Fix
FieldContainer.evaluate.strain(fun=lambda stretch: stretch)
for customfun
-callables by @adtzlr in #731
Full Changelog: v8.2.0...v8.2.1
v8.2.0
[8.2.0] - 2024-03-25
Added
- Add methods to evaluate different strain measures of a field container, i.e.
FieldContainer.evaluate.strain(tensor=True, asvoigt=False, k=0)
,FieldContainer.evaluate.log_strain(tensor=True, asvoigt=False)
orFieldContainer.evaluate.green_lagrange_strain(tensor=True, asvoigt=False)
. These methods refer tomath.strain(k=0)
which usesmath.strain_stretch_1d(k=0)
by default with the strain exponentk
of the Seth-Hill strain formulation.
Changed
- Change the return type of
math.eig()
which returns a namedtuple with attributeseigenvalues
andeigenvectors
. Now consistent with NumPy. This also affectsmath.eigh()
. - Change the shape of the array of eigenvectors returned by
math.eig()
from(a, i, ...)
to(i, a, ...)
. Now consistent with NumPy. This also affectsmath.eigh()
. - Switch from a hard-coded logarithmic strain evaluation to a more generalized Seth-Hill strain-stretch relation in
math.strain(fun=math.strain_stretch_1d, k=0)
with a default strain-exponent ofk=0
which returns the logarithmic strain.
What's Changed
- Enhance plots of quadrature schemes by @adtzlr in #723
- Enhance the plots of
GaussLegendreBoundary
by @adtzlr in #724 - Add
FieldContainer.evaluate.strain()
by @adtzlr in #726
Full Changelog: v8.1.0...v8.2.0
v8.1.0
[8.1.0] - 2024-03-23
Added
- Add an argument to disable the (default) expansion of the points-array of a mesh in
mesh.expand(expand_dim=True)
andmesh.revolve(expand_dim=True)
. E.g., this allows the expansion and / or revolution of a quad-mesh with points in 3d-space. - Add
MultiPointContact.plot(offset=0, **kwargs)
to plot the rigid contact plane(s) or line(s) at a given offset. - Add
MultiPointConstraint.plot(**kwargs)
to plot the lines of a multi-point constraint.
Changed
- Don't raise an error if the total angle of revolution is greater than 360 degree in
mesh.revolve(phi=361)
.
What's Changed
- Don't raise an error for mesh-revolutions with >360 degree, e.g.
mesh.revolve(phi=361)
by @adtzlr in #715 - Enhance
mesh.expand(expand_dim=True)
andmesh.revolve(expand_dim=True)
by @adtzlr in #716 - Add
MultiPointContact.plot(**kwargs)
method by @adtzlr in #718 - Add
MultiPointConstraint.plot(**kwargs)
by @adtzlr in #719 - Enhance the
plot()
-methods of region, element and quadrature by @adtzlr in #721 - Enhance element plots by @adtzlr in #722
Full Changelog: v8.0.0...v8.1.0
v8.0.0
[8.0.0] - 2024-03-18
Added
- Add axis of expansion in
mesh.expand(axis=-1)
(ignored forn=1
). - Add an optional mask-argument to select points for rotation in
mesh.rotate(mask=None)
. - Add Lagrange quad/hex cell-types in
ViewMesh
. - Add optional projection of stresses from quadrature-points to mesh.points in
SolidBody.plot(project=None)
, whereproject
has to be a callable likeproject(values, region)
. - Add optional projection of internel cell-data (Displacement, Logarithmic Strain and Deformation Gradient) from quadrature-points to mesh-points in
FieldContainer.plot(project=None)
, whereproject
has to be a callable likeproject(values, region)
.
Changed
- The internal
BasisField.basis
is now a subclassed arrayBasisArray
with agrad
-attribute. math.grad(x, **kwargs)
is enhanced to return gradients of fields (like before) and the gradient-attribute of basis-arrays (added).- The
grad_v
andgrad_u
arguments are removed from the form-expression decoratorForm
. This changes the required function signature of the weakform-callable toweakform(v, u, **kwargs)
. The tuple of optional arguments is also removed. Gradients ofv
andu
are now obtained bymath.grad(v)
orv.grad
. - Enforce quadrature schemes with minimal order for projections in
project()
forTriangle
,Tetra
as well as their MINI- and Quadratic-variants. - Fall-back to
extrapolate(mean=True)
inproject(mean=True)
. - Don't ravel the results of
res = extrapolate(values, region)
, i.e.values.shape = (3, 3, 4, 100)
will be returned asres.shape = (121, 3, 3)
instead ofres.shape = (121, 9)
. - Stack only a selection of meshes in
MeshContainer.stack([idx])
. - Enable list-based indexing in
MeshContainer[idx]
. - Add the
opacity=0.99
argument toMeshContainer.plot()
andMeshContainer.screenshot()
. - Pass the dpi-argument to the matplotlib figure in
imshow(dpi=None)
for solids, field- and mesh-containers. - Permute
GaussLegendre(order=2, dim=2)
according to the points of theBiQuadraticQuad
element by default. - Permute the 2- and 3-dimensional
GaussLegendre
quadrature schemes for order > 2 according to the VTK-Lagrange element formulations. That means for linear and quadratic quads and hexahedrons, the points ofGaussLegendre
are sorted according to the default VTK elements and for all higher-order elements according to the Lagrange-elements. - Enable default point-permutations in
RegionLagrange(permute=True)
by default. - Hide internal edges of higher-order cell-types in
ViewScene.plot()
by default. - Simplify
tools.topoints(values, region, average=True, mean=False)
. Remove all other arguments. If values of single quadrature-point per cells is given, then the values are broadcasted to the number of points-per-cell. If values are provided on more quadrature points than the number of points-per-cell, then the values are trimmed. E.g., this is required forQuadraticHexahedron
with 20 points and 27 quadrature-points.
Fixed
- Fix mesh-expansion with one layer
mesh.expand(n=1)
. This expands the dimension of the points-array. - Fix VTK-compatible cells in
CubeArbitraryOrderHexahedron
. - Fix Cauchy-stress evaluation of
SolidBody
andSolidBodyNearlyIncompressible
on a 2d-Field (plane stress): Automatic fall-back to Kirchhoff-stress and print a warning.
Removed
- Remove the deprecated old-style argument
move
indof.biaxial()
. - Remove the deprecated old-style arguments
move
,axis_compression
,axis_shear
andcompression
indof.shear()
.
What's Changed
- Simplify
Form
: Remove requiredgrad_v
andgrad_u
args and obtain the gradient byv.grad
orgrad(v)
by @adtzlr in #688 - Remove deprecated arguments in
dof.biaxial()
anddof.shear()
by @adtzlr in #689 - Fall-back to
tools.extrapolate(mean=True)
forproject(mean=True)
by @adtzlr in #691 - Fix single-layer
mesh.expand(n=1)
and add axis of expansionmesh.expand(axis=-1)
by @adtzlr in #697 - Enhance
imshow()
-methods of solid, field and mesh by @adtzlr in #699 - Add optional mask in
mesh.rotate(mask=None)
by @adtzlr in #700 - Make
ArbitraryOrderLagrangeElement
VTK-compatible by @adtzlr in #702 - Enhance
Scene.plot()
: Hide internal edges of quadratic celltypes by @adtzlr in #705 - Add optional projection of stresses in
SolidBody.plot(project=None)
by @adtzlr in #707 - Add
FieldContainer.plot(project=None)
by @adtzlr in #710 - Simplify
tools.topoints(values, region)
by @adtzlr in #712 - Enhance
topoints( values, region, average=True, mean=False)
by @adtzlr in #713 - Fix Cauchy-stress for 2d-Fields (plane stress) by @adtzlr in #714
Full Changelog: v7.19.1...v8.0.0
v7.19.1
v7.19.0
[7.19.0] - 2024-03-08
Added
- Add
FieldDual(disconnect=True)
for a dual (secondary) field with an optionally disconnected mesh. This also enablesFieldsMixed(disconnect=True)
in mixed fields. - Add a quadrature scheme for integrating the surface of a unit hemisphere
BazantOh(n=21)
. - Add
NearlyIncompressible
as a simplified version ofThreeFieldVariation
. A constitutive material formulation on the distortional part of a strain energy function in terms of the deformation gradient has to be provided, e.g. byumat = NearlyIncompressible(NeoHooke(mu=1), bulk=5000)
. - Add optional kwargs to a job-callback
Job(callback=lambda stepnumber, substepnumber, substep, **kwargs: None, **kwargs)
andCharacteristicCurve(callback=lambda stepnumber, substepnumber, substep, **kwargs: None, **kwargs)
. - Add
DiscreteGeometry
propertiesx
,y
andz
to access the columns of the points-array. - Add a new math-function
math.equivalent_von_mises(A)
for three-dimensional second-order tensors. - Add the evaluation of the equivalent von Mises Cauchy stress as cell-data in
ViewSolid
, available asSolid.plot("Equivalent of Cauchy Stress")
. - Add
mesh.stack(meshes)
as method toMeshContainer.stack()
. Note that this only supports mesh containers with meshes of same cell-types. - Add
NeoHooke.gradient(out=None)
andNeoHooke.hessian(out=None)
for a location to store the results. Also forNeoHookeCompressible
. - Add
out
-keyword togradient()
andhessian
ofNearlyIncompressible
andThreeFieldVariation
. - Add optional initial state variables in
ViewMaterial(statevars=None)
andViewMaterialIncompressible(statevars=None)
. - Add the L2-projection as
tools.project(values, region, average=True, mean=False, dV=None, solver=scipy.sparse.linalg.spsolve)
to project given values at quadrature points to mesh-points. This replaces the oldtools.project(values, region, average=True, mean=False)
in a backward-compatible way. The new method is computationally more expensive but is also much more flexible. - Add fifth-order quadrature schemes
quadrature.Triangle(order=5)
andquadrature.Tetrahedron(order=5)
. - Add
Region.copy(mesh=None, element=None, quadrature=None)
to copy a region and re-evaluate this copy if necessary.
Changed
- Rename
Mesh.save()
toMesh.write()
and addMesh.save()
as an alias toMesh.write()
. - Enhance the performance of
NeoHooke
,NeoHookeCompressible
,SolidBody
andSolidBodyNearlyIncompressible
. - Enhance the performance of
math.inv(out=None)
andmath.det(out=None)
. - Use only the offical API of
tensortrax
. A workaround is used to ensure compatibility withtensortrax
<= v0.17.1. - Pass optional keyword-arguments in the plot-methods
ViewMaterial.plot(**kwargs)
andViewMaterialIncompressible.plot(**kwargs)
to the matplotlib axes objectax.plot(**kwargs)
. - Only add
off_screen
andnotebook
keyword-arguments topyvista.Plotter(**kwargs)
if they areTrue
. This is needed for not ignoring a global variable likepyvista.OFF_SCREEN = True
. - Enforce
verbose=0
if the environmental variable"FELUPE_VERBOSE"
is"false"
. This is useful for running the examples when building the documentation. - Don't require a
bilinearform
inFormItem(bilinearform=None)
. An emptyFormItem
is now a valid item in aStep
. For empty vectors/matrices, the shape is inferred fromsum(FieldContainer.fieldsizes)
instead ofFieldContainer.fields[0].values.size
. - Rename the old-project method to
tools.extrapolate(values, region, average=True, mean=False)
which extrapolates values at quadrature points to mesh-points. - Change the sorting of quadrature points for triangles and tetrahedrons (due to internal code simplifications).
- The reload-method of a region does only re-evaluate it if at least one of the arguments are not None
Region.reload(mesh, element, quadrature)
.
Fixed
- Fix missing support for third-order- and second-order tensor combinations to
math.dot(A, B, mode=(2,3))
andmath.ddot(A, B, mode=(2,3))
. - Fix error if
FieldDual
is in the fields of aFieldContainer
forIntegralForm
. - Fix
math.inv(A)
for arrays with shapeA.shape = (1, 1, ...)
. Also raise an error ifshape[:2]
not in[(3, 3), (2, 2), (1, 1)]
. - Raise an error in
math.det(A)
ifA.shape[:2]
not in[(3, 3), (2, 2), (1, 1)]
. - Fix mutable keyword-arguments in
SolidBody._vector(kwargs={})
bySolidBody._vector(kwargs=None)
. Also for._matrix()
and forSolidBodyNearlyIncompressible
. - Fix wrong shape and the resulting error during assembly in
fem.assembly.expression.Form
for the integration of a linear form with different mesh- and field-dimensions.
What's Changed
- Rename
Mesh.save()
toMesh.write()
and addMesh.save()
as an alias of it by @adtzlr in #626 - Refactor constitution by @adtzlr in #628
- Add
FieldDual
for the dual (secondary) fields in mixed fields by @adtzlr in #629 - Add quadrature scheme
BazantOh()
by @adtzlr in #632 - Add
NearlyIncompressible(material, bulk)
by @adtzlr in #633 - Add
math.dot(A, B, mode=(2,3))
andmath.ddot(A, B, mode=(2,3))
by @adtzlr in #641 - Add optional kwargs to
Job(callback=lambda i, j, res, **kwargs: None, **kwargs)
by @adtzlr in #642 - Add support for
FieldDual
inIntegralForm
by @adtzlr in #643 - Fix
math.inv(A)
forA.shape[:2] == (1, 1)
by @adtzlr in #644 - Add
FieldDual(disconnect=None)
. by @adtzlr in #646 - Add
DiscreteGeometry
propertiesx
,y
andz
by @adtzlr in #648 - Add
math.equivalent_von_mises(A)
by @adtzlr in #650 - Add
MeshContainer.stack()
by @adtzlr in #652 - Enhance the performance by @adtzlr in #654
- Enhance the performance of ``math.inv(out=None)` by @adtzlr in #655
- Improve the performance of
math.det(A, out=None)
by @adtzlr in #659 - Use only the official API of
tensortrax.math
by @adtzlr in #667 - Only add
off_screen
andnotebook
keyword-arguments topyvista.Plotter(**kwargs)
if they areTrue
by @adtzlr in #670 - Docs: Examples are generated by Sphinx-Gallery by @adtzlr in #671
- Fix error during assembly in
Form
for different mesh- and field-dimensions by @adtzlr in #675 - Add the L2-projection and replace it with the old
tools.project()
by @adtzlr in #683
Full Changelog: v7.18.0...v7.19.0
v7.18.0
[7.18.0] - 2024-02-16
Added
- Create a
FieldContainer
by the&
-operator between fields and field containers, i.e.field = displacement & pressure
, wheredisplacement = Field(region, dim=2)
andpressure = Field(region)
. This also works forfield & pressure
as well aspressure & field
. - Add a method to create a field container from a field, i.e.
Field(region, dim=3).as_container()
is equal toFieldContainer([Field(region, dim=3)])
. - Add
ViewMaterial(umat)
to view force-stretch curves for uniaxial tension/compression, planar shear and equi-biaxial tension. - Add
ViewMaterialIncompressible(umat)
to view force-stretch curves for incompressible uniaxial tension/compression, planar shear and equi-biaxial tension. - Add a base class for constitutive materials with methods
ConstitutiveMaterial.view(incompressible=False)
,ConstitutiveMaterial.plot(incompressible=False)
andConstitutiveMaterial.screenshot(incompressible=False)
. - Add a dict-attribute with material parameters to all built-in materials, e.g.
NeoHooke.kwargs = {"mu": self.mu, "bulk": self.bulk}
. - Add
umat = CompositeMaterial(material, other_material)
. - Add
&
-operator to combine constitutive materialsumat = material & other_material
. Note that only the first material must contain state variables.
Changed
- Don't disconnect the dual mesh by default for regions
RegionQuadraticTriangle
andRegionQuadraticTetra
inFieldsMixed
.
Fixed
- Fix
Mesh.flip(mask=None)
: Take care of the mask (it wasn't applied to the cells-array of the mesh).
What's Changed
- Create
FieldContainer
by all logical-and combinations ofField
andFieldContainer
by @adtzlr in #618 - Add
Field.as_container()
by @adtzlr in #619 - Add
ViewMaterialIncompressible
by @adtzlr in #620 - Add base class
ConstitutiveMaterial
by @adtzlr in #621 - Add
Volumetric
,CompositeMaterial
and&
-operator forConstitutiveMaterial
by @adtzlr in #623 - Fix
Mesh.flip(mask=None)
: Take care of the mask by @adtzlr in #625
Full Changelog: v7.17...v7.18.0
v7.17
[7.17.0] - 2024-02-15
Added
- Add a mesh for a single vertex point
vertex = Point(a=0)
. - Add expansion of a vertex point to a line mesh
vertex.expand(n=11, z=1)
. - Add revolution of a vertex point to a line mesh
vertex.revolve(n=11, phi=180)
.
Changed
- Assume that no state variables are used in an
umat
if it has no attributeumat.x
. Set the shape of the state variables by default to(0, q, c)
inSolidBody
andSolidBodyNearlyIncompressible
.
What's Changed
- Add
mesh.Point(a=0)
by @adtzlr in #616 - Assume no state variables in
umat
if it has no attributex
by @adtzlr in #617
Full Changelog: v7.16...v7.17
v7.16
[7.16.0] - 2024-02-13
Added
- Add
MeshContainer.plot()
,img = MeshContainer.screenshot()
andax = MeshContainer.imshow()
. The default list of colors contains PyVista's default color as first item and then the list of matplotlib's named colors C1, C2, etc (excluding C0). - Add
Mesh.merge_duplicate_points(decimals=None)
and makeMesh.sweep(decimals=None)
an alias of it. - Add
Mesh.merge_duplicate_cells()
.
Fixed
- Fix
Mesh.imshow(ax=None)
,FieldContainer.imshow(ax=None)
andSolidBody.imshow(ax=None)
from v7.15.
What's Changed
- Add
MeshContainer.plot()
,img = MeshContainer.screenshot()
andax = MeshContainer.imshow()
by @adtzlr in #611 - Add
mesh.merge_duplicate_points()
andmesh.merge_duplicate_cells()
by @adtzlr in #612 - Fix
Mesh.imshow(ax=None)
,FieldContainer.imshow(ax=None)
andSolidBody.imshow(ax=None)
by @adtzlr in #613
Full Changelog: v7.15.0...v7.16
v7.15.0
[7.15.0] - 2024-02-11
Added
- Add optional ax-arguments to
Mesh.imshow(ax=None)
,FieldContainer.imshow(ax=None)
andSolidBody.imshow(ax=None)
.
Full Changelog: v7.14.0...v7.15.0