[9.1.0] - 2024-11-23
Tip
This release adds JAX as alternative backend to the default tensortrax
-backend for automatic differentiation. Hyperelastic
and Material
classes are available at felupe.constutition.jax
, but only some models are included for JAX. JAX is great for computationally expensive models. However, it runs on single-precision by default. Hence, either the the tolerance of the Newton-Rhapson method must be relaxed or JAX must be enforced to use 64bit floats.
Added
- Add the hessian of the element shape functions for a quadratic quad element
QuadraticQuad.hessian()
. - Add the
order
-argument toFieldContainer.extract(order="C")
as well as forField
,FieldAxisymmetric
,FieldPlaneStrain
to return C-contiguous arrays by default. - Add an optional multiplier to
Laplace(multiplier=1.0)
. - Add optional keyword-arguments to
math.transpose(**kwargs)
to support optionalout
andorder
-keywords. - Add the attribute
RegionBoundary.tangents
, which contains a list of tangent unit vectors. Forquad
cell-types the length of this list is one and forhexahedron
cell-types it is of length two. - Add
math.inplane(A, vectors)
to return the in-plane components of a symmetric tensorA
, where the plane is defined by its standard unit vectors. - Add
constitution.jax.Hyperelastic
as a feature-equivalent alternative toHyperelastic
withjax
as backend. - Add
constitution.jax.Material(..., jacobian=None)
with JAX as backend. A custom jacobian-callable may be passed to switch between forward- and backward-mode automatic differentiation. - Add material models for JAX-based materials. Hyperelastic models available at
constitution.jax.models.hyperelastic
:extended_tube()
,miehe_goektepe_lulei()
,mooney_rivlin()
,neo_hooke()
,yeoh()
,third_order_deformation()
,van_der_waals()
. Lagrange (stress-based) models available atconstitution.jax.models.lagrange
:morph()
,morph_representative_directions()
. - Add
constitution.jax.total_lagrange()
,constitution.jax.updated_lagrange()
andconstitution.jax.isochoric_volumetric_split()
function decorators for the JAX hyperelastic material class. - Add an optional keyword-argument
Region.astype(copy=True)
to modify the data types of the arrays of the region in-place ifcopy=False
. - Add
FieldContainer.evaluate.right_cauchy_green_deformation()
andmath.right_cauchy_green_deformation(field)
to evaluate the right Cauchy-Green deformation tensor. - Add
math.strain(field, C=None, ..., **kwargs)
to use a given right Cauchy-Green deformation tensor for the evaluation of the strain tensor. - Add the hyperelastic foam models
storakers()
andblatz_ko()
for both AD-backends. - Add the
saint_venant_kirchhoff_orthotropic()
hyperelastic model (tensortrax).
Changed
- Change default
np.einsum(..., order="K")
tonp.einsum(..., order="C")
in the methods ofField
,FieldAxisymmetric
,FieldPlaneStrain
andFieldContainer
. - Change supported Python versions to 3.9 - 3.12.
- Change the
dtype
-argument inRegion.astype(dtype)
from an optional to a required argument. - Make
tensortrax
an optional dependency (again). Now FElupe does only depend on NumPy and SciPy, all other extras are optional.
Fixed
- Fix the number of points for non-disconnected dual meshes. This reduces the assembled (sparse) vector- and matrix-shapes, which are defined on mixed-fields.
- Fix wrong results of
ConstitutiveMaterial.plot()
if any stretch is non-physical, i.e. lower or equal zero. This raises an error now.
Removed
- Remove the unused, deprecated aliases
UserMaterial
,UserMaterialStrain
andUserMaterialHyperelastic
.
What's Changed
- Add
QuadraticQuad.hessian()
by @adtzlr in #851 - Update issue templates by @adtzlr in #855
- Fix pyOpenSci basic checks by @adtzlr in #854
- Extract C-contiguous arrays by default from fields by @adtzlr in #856
- Add an optional multiplier in
Laplace(multiplier=1.0)
by @adtzlr in #864 - Add optional kwargs in
math.transpose(**kwargs)
by @adtzlr in #865 - Fix the number of points for non-disconnected dual-meshes by @adtzlr in #867
- Fix wrong result of
ConstitutiveMaterial.plot()
if any stretch <= 0 by @adtzlr in #872 - Add
RegionBoundary.tangents
andmath.inplane()
by @adtzlr in #873 - Add
constitution.jax.Hyperelastic
by @adtzlr in #876 - Group the
constitution
module by autodiff-backends by @adtzlr in #878 - Add
felupe.constitution.autodiff.jax.Material
by @adtzlr in #879 - Add
morph()
for JAX-basedMaterial
by @adtzlr in #880 - Simplify the constitution module by @adtzlr in #881
- Add Total-Lagrange and Updated-Lagrange decorators for JAX by @adtzlr in #883
- Add more JAX-based models by @adtzlr in #884
- Add
isochoric_volumetric_split()
for JAX-hyperelastic material by @adtzlr in #885 - Move
constitution.jax.isochoric_volumetric_split()
by @adtzlr in #887 - Add optional in-place cast
Region.astype(dtype, copy=True)
by @adtzlr in #888 - Make the examples run faster on CI/CD by @adtzlr in #890
- Add
miehe_goektepe_lulei
model for JAX by @adtzlr in #892 - Make
tensortrax
optional by @adtzlr in #894 - Test the import in an environment with no autodiff-backend present by @adtzlr in #895
- Enable
jax.Hyperelastic(..., parallel=True)
withjax.pmap
on quadrature-points axis by @adtzlr in #896 - Update GitHub-Actions by @adtzlr in #897
- Add math-function for the right Cauchy-Green deformation tensor by @adtzlr in #898
- Add the Storåkers hyperelastic foam model by @adtzlr in #900
- Add the Blatz-Ko hyperelastic foam model by @adtzlr in #901
- Add the Van-der-Waals model for JAX by @adtzlr in #902
- Add more hyperelastic models by @adtzlr in #903
- Add
constitution.lame_converter_orthotropic()
by @adtzlr in #904 - Add an optional strain exponent for the SVK-material by @adtzlr in #905
Full Changelog: v9.0.0...v9.1.0