Recent Releases of felupe
felupe - v9.3.0
[9.3.0] - 2025-06-29
Added
- Add
Mesh.add_points(points)to update the mesh with additional points. - Add
Mesh.clear_points_without_cells()to clear the list of points without cells (useful for center-points of multi-point constraints). - Release FElupe on conda-forge, starting with v9.2.0.
- Add
ConstitutiveMaterial.is_stable()which returns a boolean mask of stability for isotropic material model formulations. Note that this will require an additional volumetric part of the strain energy density function for hyperelastic material model formulations without a volumetric part. - Add the linear-elastic material formulation
constitution.LinearElastic1D()and a truss-bodymechanics.TrussBody(). - Add
RegionTrusswith a truss element. This is a line element with aGaussLobatto(order=0)quadrature, i.e. with two quadrature points located at the boundaries.
Changed
- Change the required setuptools-version in the build-system table of
pyproject.tomlto match PEP639 (setuptools>=77.0.3). - Change the labels to well-known labels for the URLs in
pyproject.toml. - Change the first return value of
ViewMaterial.uniaxial(),ViewMaterial.planar(),ViewMaterial.biaxial(),ViewMaterialIncompressible.uniaxial(),ViewMaterialIncompressible.planar(),ViewMaterialIncompressible.biaxial()from the stretch to a list of all three principal stretches.
Fixed
- Fix the declaration of the (spdx identifier) license and license-file in
pyproject.toml. - Fix missing import of
TriQuadraticHexahedronin the top-level namespace. - Fix the path to
docs/_static/logo_without_text.svgindocs/conf.py. - Fix a typo in the docstring of
MeshContainer.from_unstructured_grid(). - Fix
CompositeMaterialfor input lists of length 1.
What's Changed
- Add
Mesh.add_points(points)andMesh.clear_points_without_cells()by @adtzlr in https://github.com/adtzlr/felupe/pull/947 - Update license in pyproject.toml by @adtzlr in https://github.com/adtzlr/felupe/pull/954
- Make license-files more explicit in
pyproject.tomlby @adtzlr in https://github.com/adtzlr/felupe/pull/955 pyproject.tomlensure PEP639 support by @adtzlr in https://github.com/adtzlr/felupe/pull/956- Fix missing import of
TriQuadraticHexahedronby @adtzlr in https://github.com/adtzlr/felupe/pull/958 - Fix the path to the logo in
docs/conf.pyby @adtzlr in https://github.com/adtzlr/felupe/pull/959 - Fix a typo in the docstring of
MeshContainer.from_unstructured_grid()by @adtzlr in https://github.com/adtzlr/felupe/pull/960 - Enhance some docstrings (only minor changes) by @adtzlr in https://github.com/adtzlr/felupe/pull/961
- Docs: Use matplotlib-directive for plots by @adtzlr in https://github.com/adtzlr/felupe/pull/962
- Fix typo from seperated to separated by @tkoyama010 in https://github.com/adtzlr/felupe/pull/963
- Add
ConstitutiveMaterial.is_stable()and fixCompositeMaterialby @adtzlr in https://github.com/adtzlr/felupe/pull/965 - Add
mechanics.Trussandconstitution.LinearElastic1Dby @adtzlr in https://github.com/adtzlr/felupe/pull/966 - Add
RegionTrussby @adtzlr in https://github.com/adtzlr/felupe/pull/967
Full Changelog: https://github.com/adtzlr/felupe/compare/v9.2.0...v9.3.0
- Python
Published by adtzlr 11 months ago
felupe - v9.2.0
Added
- Add
SolidBody.assemble.mass(density=1.0)andSolidBodyNearlyIncompressible.assemble.mass(density=1.0)to assemble the mass matrix. - Add
SolidBody.evaluate.stress(field)to evaluate the (first Piola-Kirchhoff) stress tensor (engineering stress in linear elasticity). - Add a free-vibration modal analysis Step/Job
FreeVibration(items, boundaries)with methods to evaluateFreeVibration.evaluate()and to extractfield, frequency = FreeVibration.extract(n)its n-th result. - Add
Boundary.plot()to plot the points and prescribed directions of a boundary. - Add
BoundaryDictas a subclassed dict with methods toplot(),screenshot()andimshow(). - Add a new argument to apply a callable on the assembled vector/matrix of a solid body,
SolidBody(..., apply=None). This may be used to sum the list of sub-blocks instead of stacking them together,SolidBody(..., block=False, apply=None). This is useful for mixed formulations where both the deformation gradient and the displacement values are required. - Add support for non-symmetric bilinear mixed forms in
IntegralForm. - Add
element.Elementto the top-level package namespace. - Raise a TypeError if a mesh container is used as the
mesh-argument in a region. The error message explains that the container is not supported. A mesh must be used instead. - Add the
Vertexelement formulation. - Add a vertex-region
RegionVertex. - Add
MeshContainer.as_vertex_mesh()to create a merged vertex mesh from the meshes of the mesh container. - Add
Field.from_mesh_container(container)to create a top-level field on a vertex mesh. - Add
GaussLobattoquadrature. The order-argument is equal to the 1d-sample points minus two. This ensures identical minimum order-arguments for Gauss-Legendre and Gauss-Lobatto schemes.
Changed
- The first Piola-Kirchhoff stress tensor is evaluated if
ViewSolid(stress_type=None). - Autodetect the stress-type in
SolidBody.plot(name)fromname. - Enhance the
hello_world(axisymmetric=False, planestrain=False, curve=False, xdmf=False, container=False)function with new arguments to customize the generated template script. - Enhance
Boundarywith added support for multiaxial prescribed values. - Enhance
math.linsteps(..., values=0)with default values except for the columnaxisifaxisis not None. - Link all field-values to the values of the first field if no other field is given in
FieldContainer.link(). - Change the default arguments from
block=Truetoblock=NoneinSolidBody.assemble.vector(block=None)andSolidBody.assemble.matrix(block=None)and defineblockon creation,SolidBody(..., block=True)instead. - Integrate and assemble
None-items in thefun-argument ofIntegralForm. On integration,Noneis returned.Nonewill be assembled to an emtpy sparse matrix. - Enhance
mesh.interpolate_line(mesh, xi, axis=None, ...)which by default uses a curve-progress variable whenaxis=None. The curve progress evaluation pointsximust be within0 <= xi <= 1.
Fixed
- Fix
Boundary(..., mode="and")by ignoring any undefined axis. - Fix
tools.hello_world(planestrain=True)with the correct regionRegionQuadfor the plane-strain template. - Fix the cells-array in
RegionQuadraticQuadBoundaryfor midpoints of edges. - Fix
FieldContainer.plot()for regions without the shape-function gradients available.
Removed
- Remove the unused
shape-argument inelement.Element(shape). Adopt the arbitrary-lagrange element to use its owndim-argument. This simplifies the creation of custom finite element formulations.
What's Changed
- Add
SolidBody.evaluate.mass(density=1.0)by @adtzlr in https://github.com/adtzlr/felupe/pull/906 - Add
SolidBody.evaluate.stress()and autodetect the stress-type inSolidBody.plot(name)fromnameby @adtzlr in https://github.com/adtzlr/felupe/pull/908 - Add
FreeVibration(items, boundaries)by @adtzlr in https://github.com/adtzlr/felupe/pull/909 - Enhance
Boundary: Add support for multiaxial prescribedvalue-argument by @adtzlr in https://github.com/adtzlr/felupe/pull/912 - Add
Boundary.plot()and fixBoundary(..., mode="and")by @adtzlr in https://github.com/adtzlr/felupe/pull/913 - Add
BoundaryDictby @adtzlr in https://github.com/adtzlr/felupe/pull/915 - Add
PointLoad.plot()by @adtzlr in https://github.com/adtzlr/felupe/pull/916 - Enhance
math.linsteps(..., values=0.0)by @adtzlr in https://github.com/adtzlr/felupe/pull/917 - Enhance
FieldContainer.link()by @adtzlr in https://github.com/adtzlr/felupe/pull/918 - Add
SolidBody(..., block=True, apply=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/920 - Enhance
IntegralForm: Non-symmetric mixed forms andNoneby @adtzlr in https://github.com/adtzlr/felupe/pull/922 - Simplify init of base-class
element.Elementby @adtzlr in https://github.com/adtzlr/felupe/pull/924 - Fix
hello_word(planestrain=True)by @adtzlr in https://github.com/adtzlr/felupe/pull/928 - Fix
RegionQuadraticQuadBoundaryby @adtzlr in https://github.com/adtzlr/felupe/pull/933 - Don't create a figure if error in
umat.plot()by @adtzlr in https://github.com/adtzlr/felupe/pull/934 - Raise a TypeError if a container is used in a region by @adtzlr in https://github.com/adtzlr/felupe/pull/939
- Add
MeshContainer.as_vertex_mesh()andField.from_mesh_container()by @adtzlr in https://github.com/adtzlr/felupe/pull/940 - Fix
FieldContainer.plot()forRegionVertex(no gradient available) by @adtzlr in https://github.com/adtzlr/felupe/pull/942 - Add
GaussLobattoquadrature scheme by @adtzlr in https://github.com/adtzlr/felupe/pull/943 - Enhance
mesh.interpolate_line(axis=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/945 - Set version tag to 9.2.0 by @adtzlr in https://github.com/adtzlr/felupe/pull/946
Full Changelog: https://github.com/adtzlr/felupe/compare/v9.1.0...v9.2.0
- Python
Published by adtzlr about 1 year ago
felupe - v9.1.0
[9.1.0] - 2024-11-23
[!TIP] This release adds JAX as alternative backend to the default
tensortrax-backend for automatic differentiation.HyperelasticandMaterialclasses are available atfelupe.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,FieldPlaneStrainto 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 optionaloutandorder-keywords. - Add the attribute
RegionBoundary.tangents, which contains a list of tangent unit vectors. Forquadcell-types the length of this list is one and forhexahedroncell-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.Hyperelasticas a feature-equivalent alternative toHyperelasticwithjaxas 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,FieldPlaneStrainandFieldContainer. - Change supported Python versions to 3.9 - 3.12.
- Change the
dtype-argument inRegion.astype(dtype)from an optional to a required argument. - Make
tensortraxan 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,UserMaterialStrainandUserMaterialHyperelastic.
What's Changed
- Add
QuadraticQuad.hessian()by @adtzlr in https://github.com/adtzlr/felupe/pull/851 - Update issue templates by @adtzlr in https://github.com/adtzlr/felupe/pull/855
- Fix pyOpenSci basic checks by @adtzlr in https://github.com/adtzlr/felupe/pull/854
- Extract C-contiguous arrays by default from fields by @adtzlr in https://github.com/adtzlr/felupe/pull/856
- Add an optional multiplier in
Laplace(multiplier=1.0)by @adtzlr in https://github.com/adtzlr/felupe/pull/864 - Add optional kwargs in
math.transpose(**kwargs)by @adtzlr in https://github.com/adtzlr/felupe/pull/865 - Fix the number of points for non-disconnected dual-meshes by @adtzlr in https://github.com/adtzlr/felupe/pull/867
- Fix wrong result of
ConstitutiveMaterial.plot()if any stretch <= 0 by @adtzlr in https://github.com/adtzlr/felupe/pull/872 - Add
RegionBoundary.tangentsandmath.inplane()by @adtzlr in https://github.com/adtzlr/felupe/pull/873 - Add
constitution.jax.Hyperelasticby @adtzlr in https://github.com/adtzlr/felupe/pull/876 - Group the
constitutionmodule by autodiff-backends by @adtzlr in https://github.com/adtzlr/felupe/pull/878 - Add
felupe.constitution.autodiff.jax.Materialby @adtzlr in https://github.com/adtzlr/felupe/pull/879 - Add
morph()for JAX-basedMaterialby @adtzlr in https://github.com/adtzlr/felupe/pull/880 - Simplify the constitution module by @adtzlr in https://github.com/adtzlr/felupe/pull/881
- Add Total-Lagrange and Updated-Lagrange decorators for JAX by @adtzlr in https://github.com/adtzlr/felupe/pull/883
- Add more JAX-based models by @adtzlr in https://github.com/adtzlr/felupe/pull/884
- Add
isochoric_volumetric_split()for JAX-hyperelastic material by @adtzlr in https://github.com/adtzlr/felupe/pull/885 - Move
constitution.jax.isochoric_volumetric_split()by @adtzlr in https://github.com/adtzlr/felupe/pull/887 - Add optional in-place cast
Region.astype(dtype, copy=True)by @adtzlr in https://github.com/adtzlr/felupe/pull/888 - Make the examples run faster on CI/CD by @adtzlr in https://github.com/adtzlr/felupe/pull/890
- Add
miehe_goektepe_luleimodel for JAX by @adtzlr in https://github.com/adtzlr/felupe/pull/892 - Make
tensortraxoptional by @adtzlr in https://github.com/adtzlr/felupe/pull/894 - Test the import in an environment with no autodiff-backend present by @adtzlr in https://github.com/adtzlr/felupe/pull/895
- Enable
jax.Hyperelastic(..., parallel=True)withjax.pmapon quadrature-points axis by @adtzlr in https://github.com/adtzlr/felupe/pull/896 - Update GitHub-Actions by @adtzlr in https://github.com/adtzlr/felupe/pull/897
- Add math-function for the right Cauchy-Green deformation tensor by @adtzlr in https://github.com/adtzlr/felupe/pull/898
- Add the Storåkers hyperelastic foam model by @adtzlr in https://github.com/adtzlr/felupe/pull/900
- Add the Blatz-Ko hyperelastic foam model by @adtzlr in https://github.com/adtzlr/felupe/pull/901
- Add the Van-der-Waals model for JAX by @adtzlr in https://github.com/adtzlr/felupe/pull/902
- Add more hyperelastic models by @adtzlr in https://github.com/adtzlr/felupe/pull/903
- Add
constitution.lame_converter_orthotropic()by @adtzlr in https://github.com/adtzlr/felupe/pull/904 - Add an optional strain exponent for the SVK-material by @adtzlr in https://github.com/adtzlr/felupe/pull/905
Full Changelog: https://github.com/adtzlr/felupe/compare/v9.0.0...v9.1.0
- Python
Published by adtzlr over 1 year ago
felupe - v9.0.0
[9.0.0] - 2024-09-06
Added
- Add
Region.astype(dtype=None)to copy and cast the region arrays to a specified type. - Add
Field(..., dtype=None)to cast the array with field values to a specified type. - Add
Field.extract(dtype=None)to cast the extracted field gradient/interpolated values to a specified type. - Add
hello_world()to print the lines of a minimal-working-example to the console. - Add
mesh.interpolate_line(mesh, xi, axis)to interpolate a line mesh. The attributepoints_derivativeholds the derivatives of the independent variable w.r.t. the dependent variable(s). The column of the independent variable is filled with zeros. - Add optional keyword-argument
SolidBody.assemble.matrix(block=True), also forSolidBody.assemble.vector(block=True)and the assemble-methods ofSolidBodyNearlyIncompressible. Ifblock=False, these methods will assemble a list of the upper-triangle sub block-vectors/-matrices instead of the combined block-vector/-matrix. - Add
SolidBodyForceas a replacement forSolidBodyGravitywith more general keyword arguments ("values"instead of"gravity","scale"instead of"density"). - Add
Laplaceto be used as user-material in a solid body. Works with scalar- and vector-valued fields. - Add an optional
mechanics.Assemble(..., multiplier=None)argument which is used in external items likeSolidBodyForce,SolidBodyGravityandPointLoadand is applied innewtonrhapson(items, ...). - Add a new submodule
viewwhich contains theView...classes likeViewSolidorViewField, previously located attools._plot. - Add the
grad- andhess-arguments to thereload()- andcopy()-methods of aRegion, i.e.Region.reload(grad=None, hess=None). - Add
LinearElasticOrthotropic. - Add
SolidBodyCauchyStressin addition toSolidBodyPressure. - Add
mesh.cell_types()which returns an object-array with cell-type mappings for FElupe and PyVista. - Add
MeshContainer.from_unstructured_grid(grid, dim=None, **kwargs)to create a mesh-container from an unstructured grid (PyVista).
Changed
- Change the internal initialization of
field = Field(region, values=1, dtype=None)values fromfield.values = np.ones(shape) * valuestofield = np.full(shape, fill_value=values, dtype=dtype). This enforcesfield = Field(region, values=1)to return the gradient array with data-typeintwhich was of typefloatbefore. - Initialize empty matrices of
SolidBodyForce,SolidBodyGravityandPointLoadwithdtype=float. - Don't multiply the assembled vectors of
SolidBodyForce,SolidBodyGravityandPointLoadby-1.0. Instead,mechanics.Assemble(multiplier=-1.0)is used in the solid bodies. - Change the visibility of the internal helpers
mechanics.Assemble,mechanics.Evaluateandmechanics.Resultsfrom private to public. - Import the
assemblymodule to the global namespace. - Isolate the submodules, i.e. a submodule only uses the public API of another submodule. If necessary, this will help to change one or more modules to a future extension package.
- Enforce contiguous arrays for the region shape-function and -gradient arrays
handdhdX. This recovers the integral-form assembly performance from v8.6.0. - Make the private basis classes public (
assembly.expression.Basis,assembly.expression.BasisFieldandassembly.expression.BasisArray) as especially their docstrings are useful to understand how a Basis is created on a field. - Remove material parameter keyword-arguments in the
function()-,gradient()- andhessian()-methods of the core constitutive material formulations. This removes the ability for temporary material parameters inLinearElastic(E=None, nu=0.3).gradient(x, E=1.0), useLinearElastic(E=1.0, nu=0.3).gradient(x)instead. This affects the material formulationsLinearElastic,LinearElasticPlaneStrain,LinearElasticPlaneStress,LinearElasticLargeStrain,NeoHookeandNeoHookeCompressible.Noneis still supported for the material parameters ofNeoHookeandNeoHookeCompressible. - Remove
LinearElasticPlaneStrainfrom the top-level package namespace because this should only be used withField(region, dim=2). The preferred method is to useFieldPlaneStrain(region, dim=2)and the defaultLinearElastic.LinearElasticPlaneStrainremains available inconstitution.LinearElasticPlaneStrain. - Rename
Mesh.as_pyvista()toMesh.as_unstructured_grid()and addMesh.as_pyvista()as alias.
Deprecated
- Deprecate
SolidBodyGravity,SolidBodyForceshould be used instead.
What's Changed
- Add
Region.astype(dtype=None)andField(..., dtype=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/797 - Add
hello_world()by @adtzlr in https://github.com/adtzlr/felupe/pull/799 - Add
mesh.interpolate_line(mesh, xi, axis)by @adtzlr in https://github.com/adtzlr/felupe/pull/811 - Change the derivative storage in
mesh.interpolate_line()by @adtzlr in https://github.com/adtzlr/felupe/pull/812 - Add optional
SolidBody.assemble.matrix(block=False)by @adtzlr in https://github.com/adtzlr/felupe/pull/813 - Add
SolidBodyForceandLaplaceby @adtzlr in https://github.com/adtzlr/felupe/pull/814 - Add optional
Assemble(multiplier=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/817 - Change the visibility of the helpers in the mechanics-module from private to public by @adtzlr in https://github.com/adtzlr/felupe/pull/818
- Fix Ex.09: Take care of changed sign of external form items by @adtzlr in https://github.com/adtzlr/felupe/pull/820
- Add submodule view by @adtzlr in https://github.com/adtzlr/felupe/pull/823
- Enhance the imports of the
quadraturesubmodule by @adtzlr in https://github.com/adtzlr/felupe/pull/824 - Enhance the imports of the
mechanicssubmodule by @adtzlr in https://github.com/adtzlr/felupe/pull/825 - Enhance (isolate) the cross-imports between submodules by @adtzlr in https://github.com/adtzlr/felupe/pull/826
- Fix the assembly performance by @adtzlr in https://github.com/adtzlr/felupe/pull/828
- Test if region attribute arrays are C-contiguous by @adtzlr in https://github.com/adtzlr/felupe/pull/829
- Add an example for the third medium contact method by @adtzlr in https://github.com/adtzlr/felupe/pull/834
- Make the classes
Basis,BasisFieldandBasisArraypublic by @adtzlr in https://github.com/adtzlr/felupe/pull/835 - Add
hessargument toRegion(hess=False)by @adtzlr in https://github.com/adtzlr/felupe/pull/836 - Add
LinearElasticOrthotropicby @adtzlr in https://github.com/adtzlr/felupe/pull/840 - Add
SolidBodyCauchyStressby @adtzlr in https://github.com/adtzlr/felupe/pull/842 - Remove temporary kwargs in core constitutive materials by @adtzlr in https://github.com/adtzlr/felupe/pull/843
- Don't import
LinearElasticPlaneStrainin top-level package namespace by @adtzlr in https://github.com/adtzlr/felupe/pull/844 - Add
felupe.mesh.cell_types()by @adtzlr in https://github.com/adtzlr/felupe/pull/846 - Add
MeshContainer.from_unstructured_grid()by @adtzlr in https://github.com/adtzlr/felupe/pull/847 - Update README.md by @adtzlr in https://github.com/adtzlr/felupe/pull/850
Full Changelog: https://github.com/adtzlr/felupe/compare/v8.8.0...v9.0.0
- Python
Published by adtzlr over 1 year ago
felupe - v8.8.0
[8.8.0] - 2024-06-16
Added
- Add
Region(uniform=False), a flag to invoke a reduced evaluation of the element shape functions and their gradients. If True, only the first cell is evaluated. This drastically speeds up linear-elasticity on uniform grid meshes (e.g. voxel-like quads and hexahedrons). - Add an update-method in
FormItem(..., ramp_item=0).update(value). This enables aFormItemto be used as a ramped-item in aStep.
What's Changed
- Add
Region(uniform=False): A performance feature for uniform grid meshes by @adtzlr in https://github.com/adtzlr/felupe/pull/792 - Add
FormItem().update(values)by @adtzlr in https://github.com/adtzlr/felupe/pull/796
Full Changelog: https://github.com/adtzlr/felupe/compare/v8.7.0...v8.8.0
- Python
Published by adtzlr almost 2 years ago
felupe - v8.7.0
[8.7.0] - 2024-06-07
[!NOTE]
This is the first release with support for NumPy 2.0.
Added
- Add
math.solve_nd(A, b, n=1)as a generalized function ofmath.solve_2d(A, b)with supported broadcasting on the elementwise-operating trailing axes.
Changed
- Rebase
math.solve_2d(A, b)onmath.solve_nd(A, b, n=2)with a batched-rhs supported in NumPy 2.0. - Change
ogden_roxburgh()andOgdenRoxburghto use the Gauss error functionerfinstead oftanhas internal sigmoid function. - Flatten the returned
inverseindices-array ofnp.unique(..., return_inverse=True)inmesh.merge_duplicate_points()to ensure compatibility with NumPy 2.0.
Fixes
- Reset state variables in
PlotMaterial.evaluate()after each completed load case.
What's Changed
- Reset state variables in
PlotMaterial.evaluate()after each completed load case by @adtzlr in https://github.com/adtzlr/felupe/pull/784 - Add
math.solve_nd(A, b, n=1)by @adtzlr in https://github.com/adtzlr/felupe/pull/785 - Support broadcasting in matrix-axes of
math.solve_nd()by @adtzlr in https://github.com/adtzlr/felupe/pull/787 - Fix small typo focusses -> focuses by @tkoyama010 in https://github.com/adtzlr/felupe/pull/786
- Change
ogden_roxburgh()andOgdenRoxburghto useerfinstead oftanhby @adtzlr in https://github.com/adtzlr/felupe/pull/788 - Add support for NumPy 2.0 by @adtzlr in https://github.com/adtzlr/felupe/pull/789
Full Changelog: https://github.com/adtzlr/felupe/compare/v8.6.0...v8.7.0
- Python
Published by adtzlr almost 2 years ago
felupe - v8.6.0
[8.6.0] - 2024-05-29
Added
- Add the isotropic-hyperelastic
alexander(C1, C2, C2, gamma, k)material model formulation to be used inHyperelastic(). - Add the isotropic-hyperelastic Micro-Sphere
miehe_goektepe_lulei(mu, N, U, p, q)material model formulation to be used inHyperelastic(). - Add the pseudo-elastic
ogden_roxburgh(r, m, beta, material, **kwargs)material model formulation to be used inHyperelastic(). - Add an optional relative-residuals argument to
ConstitutiveMaterial.optimize(relative=False). - Add a class-decorator
constitutive_material(Msterial, name=None). - Add the Total-Lagrange MORPH material formulation implemented by the concept of representative directions
morph_representative_directions(p)to be used inMaterialAD(). - Add the Total-Lagrange (original) MORPH material formulation
morph(p)to be used inHyperelastic(). - Add decorators
@total_lagrangeand@updated_lagrangefor Total / Updated Lagrange material formulations to be used inMaterialAD. - Add the isotropic-hyperelastic
anssari_benam_bucchi(mu, N)material model formulation to be used inHyperelastic(). - Add the isotropic-hyperelastic
lopez_pamies(mu, alpha)material model formulation to be used inHyperelastic().
Changed
- Recfactor the
constitutionmodule.
Fixed
- Fix plotting the keyword-arguments of a constitutive material
ConstitutiveMaterial.plot(show_kwargs=True). For list-based material parameters of length 1, the brackets aren't shown now. E.g., this affects optimized material parameters. - Don't update the material parameters in-place in
ConstitutiveMaterial.optimize(). - Don't convert material parameter scalars to arrays in
ConstitutiveMaterial.optimize().
What's Changed
- Add the isotropic-hyperelastic Alexander model by @adtzlr in https://github.com/adtzlr/felupe/pull/756
- Re-organize the constitution module by @adtzlr in https://github.com/adtzlr/felupe/pull/758
- Delete modelshyperelasticity_ad.py by @adtzlr in https://github.com/adtzlr/felupe/pull/759
- Fix the Alexander model by @adtzlr in https://github.com/adtzlr/felupe/pull/761
- Add
ogden_roxburghusing AD forHyperelasticby @adtzlr in https://github.com/adtzlr/felupe/pull/762 - Add
ConstitutiveMaterial.optimize(relative=False)by @adtzlr in https://github.com/adtzlr/felupe/pull/764 - Add the Micro-Sphere hyperelastic material model framework by @adtzlr in https://github.com/adtzlr/felupe/pull/766
- Add
constitutive_material(Material)decorator by @adtzlr in https://github.com/adtzlr/felupe/pull/768 - Add the MORPH material model (by the method of representative directions) by @adtzlr in https://github.com/adtzlr/felupe/pull/770
- Add the MORPH material model formulation by @adtzlr in https://github.com/adtzlr/felupe/pull/771
- Add
@total_lagrangeand@updated_lagrangedecorators forMaterialADby @adtzlr in https://github.com/adtzlr/felupe/pull/773 - Rebase
morph_representative_directions()as Total-Lagrange material forMaterialADby @adtzlr in https://github.com/adtzlr/felupe/pull/774 - Add the Anssari-Benam Bucchi isotropic-hyperelastic material model formulation by @adtzlr in https://github.com/adtzlr/felupe/pull/775
- Don't update the material parameters in-place and don't convert them to arrays in
ConstitutiveMaterial.optimize()by @adtzlr in https://github.com/adtzlr/felupe/pull/778 - Add the Lopez-Pamies hyperelastic model
lopez_pamies(mu, alpha)by @adtzlr in https://github.com/adtzlr/felupe/pull/779 - Fix small typo cartesion -> cartesian by @tkoyama010 in https://github.com/adtzlr/felupe/pull/781
- add example for nonlinear viscoelasticity by @bhaveshshrimali in https://github.com/adtzlr/felupe/pull/780
New Contributors
- @tkoyama010 made their first contribution in https://github.com/adtzlr/felupe/pull/781
- @bhaveshshrimali made their first contribution in https://github.com/adtzlr/felupe/pull/780
Full Changelog: https://github.com/adtzlr/felupe/compare/v8.5.1...v8.6.0
- Python
Published by adtzlr about 2 years ago
felupe - v8.5.1
[8.5.1] - 2024-05-08
Fixed
- Fix the gradient evaluation in
NeoHookeCompressible(mu=1, lmbda=None). - Fix
MaterialStrain.plot().
What's Changed
- Fix gradient-evaluation in
NeoHookeCompressible(lmbda=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/754 - Fix
MaterialStrain.plot()by @adtzlr in https://github.com/adtzlr/felupe/pull/755
Full Changelog: https://github.com/adtzlr/felupe/compare/v8.5.0...v8.5.1
- Python
Published by adtzlr about 2 years ago
felupe - v8.5.0
[8.5.0] - 2024-04-27
Added
- Add
umat_new, res = ConstitutiveMaterial.optimize(ux=[stretches, stresses], ps=None, bx=None)to optimize the material parameters on given experimental data for incompressible uniaxial, biaxial and / or planar tension / compression data byscipy.optimize.least_squares(). - Add initial default material parameters for the hyperelastic material model formulations.
What's Changed
- Add
ConstitutiveMaterial.optimize()by @adtzlr in https://github.com/adtzlr/felupe/pull/750
Full Changelog: https://github.com/adtzlr/felupe/compare/v8.4.0...v8.5.0
- Python
Published by adtzlr about 2 years ago
felupe - v8.4.0
[8.4.0] - 2024-04-12
Added
- Add
math.solve_2d(A, b, solver=np.linalg.solve, **kwargs)to be used innewtonrhapson(solve=solve_2d, ...)for two-dimensional unknowns. This is useful for local Newton-iterations related to viscoelastic evolution equations inside constitutive material formulations. - Add x- and y-offsets in
Job.plot(xoffset=0.0, yoffset=0.0).
Changed
- Wrap the ax-title with the parameters of the material model in
ConstitutiveMaterial.plot().
Fixed
- Sort array of principal values in descending order before plotting in
Scene.plot("Principal Values of ..."). This ensures that the labels are matching user-defined arrays of principal values.
What's Changed
- Sort array of principal values in
Scene.plot()by @adtzlr in https://github.com/adtzlr/felupe/pull/739 - Add
math.solve_2d(A, b)by @adtzlr in https://github.com/adtzlr/felupe/pull/742 - Wrap the ax-title
ConstitutiveMaterial.plot()by @adtzlr in https://github.com/adtzlr/felupe/pull/743
Full Changelog: https://github.com/adtzlr/felupe/compare/v8.3.1...v8.4.0
- Python
Published by adtzlr about 2 years ago
felupe - v8.3.1
[8.3.1] - 2024-04-06
Fixed
- Set the default verbosity level to None in
newtonrhapson(verbose=None)andJob.evaluate(verbose=None). If None, this defaults to True (as before) but evaluates the environmental variableFELUPE_VERBOSEif present withFELUPE_VERBOSE == "true". This does not ignore custom verbosity levels.
What's Changed
- Change default
verbose=NoneinJob.evaluate()andnewtonrhapson()by @adtzlr in https://github.com/adtzlr/felupe/pull/736
Full Changelog: https://github.com/adtzlr/felupe/compare/v8.3.0...v8.3.1
- Python
Published by adtzlr about 2 years ago
felupe - v8.3.0
[8.3.0] - 2024-04-02
Added
- Add a method to convert a mesh to a PyVista unstructured grid
Mesh.as_pyvista(cell_type=None).
Changed
- Change default line-width from
1.0to2.0inViewMesh.plot(line_width=2.0). - Enforce a 3d points-array in
Mesh.as_meshio().
Fixed
- Fix previously ignored line-width in the plot of a mesh
ViewMesh.plot(line_width=1.0). - Fix
math.tovoigt()for one-dimensional tensors.
What's Changed
- Add
Mesh.as_pyvista(), fix and change defaultViewMesh.plot(line_width=1.0)by @adtzlr in https://github.com/adtzlr/felupe/pull/733
Full Changelog: https://github.com/adtzlr/felupe/compare/v8.2.1...v8.3.0
- Python
Published by adtzlr about 2 years ago
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 https://github.com/adtzlr/felupe/pull/728 - Outsource
EvaluateFieldContainertofield/_evaluate.pyby @adtzlr in https://github.com/adtzlr/felupe/pull/729 - Fix
FieldContainer.evaluate.strain(fun=lambda stretch: stretch)for customfun-callables by @adtzlr in https://github.com/adtzlr/felupe/pull/731
Full Changelog: https://github.com/adtzlr/felupe/compare/v8.2.0...v8.2.1
- Python
Published by adtzlr about 2 years ago
felupe - 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 exponentkof the Seth-Hill strain formulation.
Changed
- Change the return type of
math.eig()which returns a namedtuple with attributeseigenvaluesandeigenvectors. 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=0which returns the logarithmic strain.
What's Changed
- Enhance plots of quadrature schemes by @adtzlr in https://github.com/adtzlr/felupe/pull/723
- Enhance the plots of
GaussLegendreBoundaryby @adtzlr in https://github.com/adtzlr/felupe/pull/724 - Add
FieldContainer.evaluate.strain()by @adtzlr in https://github.com/adtzlr/felupe/pull/726
Full Changelog: https://github.com/adtzlr/felupe/compare/v8.1.0...v8.2.0
- Python
Published by adtzlr about 2 years ago
felupe - 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 https://github.com/adtzlr/felupe/pull/715 - Enhance
mesh.expand(expand_dim=True)andmesh.revolve(expand_dim=True)by @adtzlr in https://github.com/adtzlr/felupe/pull/716 - Add
MultiPointContact.plot(**kwargs)method by @adtzlr in https://github.com/adtzlr/felupe/pull/718 - Add
MultiPointConstraint.plot(**kwargs)by @adtzlr in https://github.com/adtzlr/felupe/pull/719 - Enhance the
plot()-methods of region, element and quadrature by @adtzlr in https://github.com/adtzlr/felupe/pull/721 - Enhance element plots by @adtzlr in https://github.com/adtzlr/felupe/pull/722
Full Changelog: https://github.com/adtzlr/felupe/compare/v8.0.0...v8.1.0
- Python
Published by adtzlr about 2 years ago
felupe - 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), whereprojecthas 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), whereprojecthas to be a callable likeproject(values, region).
Changed
- The internal
BasisField.basisis now a subclassed arrayBasisArraywith 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_vandgrad_uarguments 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 ofvanduare now obtained bymath.grad(v)orv.grad. - Enforce quadrature schemes with minimal order for projections in
project()forTriangle,Tetraas 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.99argument 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 theBiQuadraticQuadelement by default. - Permute the 2- and 3-dimensional
GaussLegendrequadrature schemes for order > 2 according to the VTK-Lagrange element formulations. That means for linear and quadratic quads and hexahedrons, the points ofGaussLegendreare 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 forQuadraticHexahedronwith 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
SolidBodyandSolidBodyNearlyIncompressibleon a 2d-Field (plane stress): Automatic fall-back to Kirchhoff-stress and print a warning.
Removed
- Remove the deprecated old-style argument
moveindof.biaxial(). - Remove the deprecated old-style arguments
move,axis_compression,axis_shearandcompressionindof.shear().
What's Changed
- Simplify
Form: Remove requiredgrad_vandgrad_uargs and obtain the gradient byv.gradorgrad(v)by @adtzlr in https://github.com/adtzlr/felupe/pull/688 - Remove deprecated arguments in
dof.biaxial()anddof.shear()by @adtzlr in https://github.com/adtzlr/felupe/pull/689 - Fall-back to
tools.extrapolate(mean=True)forproject(mean=True)by @adtzlr in https://github.com/adtzlr/felupe/pull/691 - Fix single-layer
mesh.expand(n=1)and add axis of expansionmesh.expand(axis=-1)by @adtzlr in https://github.com/adtzlr/felupe/pull/697 - Enhance
imshow()-methods of solid, field and mesh by @adtzlr in https://github.com/adtzlr/felupe/pull/699 - Add optional mask in
mesh.rotate(mask=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/700 - Make
ArbitraryOrderLagrangeElementVTK-compatible by @adtzlr in https://github.com/adtzlr/felupe/pull/702 - Enhance
Scene.plot(): Hide internal edges of quadratic celltypes by @adtzlr in https://github.com/adtzlr/felupe/pull/705 - Add optional projection of stresses in
SolidBody.plot(project=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/707 - Add
FieldContainer.plot(project=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/710 - Simplify
tools.topoints(values, region)by @adtzlr in https://github.com/adtzlr/felupe/pull/712 - Enhance
topoints( values, region, average=True, mean=False)by @adtzlr in https://github.com/adtzlr/felupe/pull/713 - Fix Cauchy-stress for 2d-Fields (plane stress) by @adtzlr in https://github.com/adtzlr/felupe/pull/714
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.19.1...v8.0.0
- Python
Published by adtzlr about 2 years ago
felupe - v7.19.1
[7.19.1] - 2024-03-08
Fixed
- Fix
tools.project()for meshes where some points are not connected to cells.
What's Changed
- Fix
project()for meshes with points without cells by @adtzlr in https://github.com/adtzlr/felupe/pull/687
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.19.0...v7.19.1
- Python
Published by adtzlr about 2 years ago
felupe - 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
NearlyIncompressibleas 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
DiscreteGeometrypropertiesx,yandzto 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()andhessianofNearlyIncompressibleandThreeFieldVariation. - 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,SolidBodyandSolidBodyNearlyIncompressible. - 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_screenandnotebookkeyword-arguments topyvista.Plotter(**kwargs)if they areTrue. This is needed for not ignoring a global variable likepyvista.OFF_SCREEN = True. - Enforce
verbose=0if the environmental variable"FELUPE_VERBOSE"is"false". This is useful for running the examples when building the documentation. - Don't require a
bilinearforminFormItem(bilinearform=None). An emptyFormItemis 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
FieldDualis in the fields of aFieldContainerforIntegralForm. - 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.Formfor 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 https://github.com/adtzlr/felupe/pull/626 - Refactor constitution by @adtzlr in https://github.com/adtzlr/felupe/pull/628
- Add
FieldDualfor the dual (secondary) fields in mixed fields by @adtzlr in https://github.com/adtzlr/felupe/pull/629 - Add quadrature scheme
BazantOh()by @adtzlr in https://github.com/adtzlr/felupe/pull/632 - Add
NearlyIncompressible(material, bulk)by @adtzlr in https://github.com/adtzlr/felupe/pull/633 - Add
math.dot(A, B, mode=(2,3))andmath.ddot(A, B, mode=(2,3))by @adtzlr in https://github.com/adtzlr/felupe/pull/641 - Add optional kwargs to
Job(callback=lambda i, j, res, **kwargs: None, **kwargs)by @adtzlr in https://github.com/adtzlr/felupe/pull/642 - Add support for
FieldDualinIntegralFormby @adtzlr in https://github.com/adtzlr/felupe/pull/643 - Fix
math.inv(A)forA.shape[:2] == (1, 1)by @adtzlr in https://github.com/adtzlr/felupe/pull/644 - Add
FieldDual(disconnect=None). by @adtzlr in https://github.com/adtzlr/felupe/pull/646 - Add
DiscreteGeometrypropertiesx,yandzby @adtzlr in https://github.com/adtzlr/felupe/pull/648 - Add
math.equivalent_von_mises(A)by @adtzlr in https://github.com/adtzlr/felupe/pull/650 - Add
MeshContainer.stack()by @adtzlr in https://github.com/adtzlr/felupe/pull/652 - Enhance the performance by @adtzlr in https://github.com/adtzlr/felupe/pull/654
- Enhance the performance of `
math.inv(out=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/655 - Improve the performance of
math.det(A, out=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/659 - Use only the official API of
tensortrax.mathby @adtzlr in https://github.com/adtzlr/felupe/pull/667 - Only add
off_screenandnotebookkeyword-arguments topyvista.Plotter(**kwargs)if they areTrueby @adtzlr in https://github.com/adtzlr/felupe/pull/670 - Docs: Examples are generated by Sphinx-Gallery by @adtzlr in https://github.com/adtzlr/felupe/pull/671
- Fix error during assembly in
Formfor different mesh- and field-dimensions by @adtzlr in https://github.com/adtzlr/felupe/pull/675 - Add the L2-projection and replace it with the old
tools.project()by @adtzlr in https://github.com/adtzlr/felupe/pull/683
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.18.0...v7.19.0
- Python
Published by adtzlr about 2 years ago
felupe - v7.18.0
[7.18.0] - 2024-02-16
Added
- Create a
FieldContainerby the&-operator between fields and field containers, i.e.field = displacement & pressure, wheredisplacement = Field(region, dim=2)andpressure = Field(region). This also works forfield & pressureas 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
RegionQuadraticTriangleandRegionQuadraticTetrainFieldsMixed.
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
FieldContainerby all logical-and combinations ofFieldandFieldContainerby @adtzlr in https://github.com/adtzlr/felupe/pull/618 - Add
Field.as_container()by @adtzlr in https://github.com/adtzlr/felupe/pull/619 - Add
ViewMaterialIncompressibleby @adtzlr in https://github.com/adtzlr/felupe/pull/620 - Add base class
ConstitutiveMaterialby @adtzlr in https://github.com/adtzlr/felupe/pull/621 - Add
Volumetric,CompositeMaterialand&-operator forConstitutiveMaterialby @adtzlr in https://github.com/adtzlr/felupe/pull/623 - Fix
Mesh.flip(mask=None): Take care of the mask by @adtzlr in https://github.com/adtzlr/felupe/pull/625
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.17...v7.18.0
- Python
Published by adtzlr over 2 years ago
felupe - 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
umatif it has no attributeumat.x. Set the shape of the state variables by default to(0, q, c)inSolidBodyandSolidBodyNearlyIncompressible.
What's Changed
- Add
mesh.Point(a=0)by @adtzlr in https://github.com/adtzlr/felupe/pull/616 - Assume no state variables in
umatif it has no attributexby @adtzlr in https://github.com/adtzlr/felupe/pull/617
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.16...v7.17
- Python
Published by adtzlr over 2 years ago
felupe - 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 https://github.com/adtzlr/felupe/pull/611 - Add
mesh.merge_duplicate_points()andmesh.merge_duplicate_cells()by @adtzlr in https://github.com/adtzlr/felupe/pull/612 - Fix
Mesh.imshow(ax=None),FieldContainer.imshow(ax=None)andSolidBody.imshow(ax=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/613
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.15.0...v7.16
- Python
Published by adtzlr over 2 years ago
felupe - v7.14.0
[7.14.0] - 2024-02-11
Added
- Add optional output location for
FieldContainer.extract(out=None). - Add
Mesh.update(callback=None). This is especially useful if the points array of a mesh is changed and an already existing instance of a region has to be reloaded:Mesh.update(points=new_points, callback=region.reload). - Add
ax = FieldContainer.imshow()which acts as a wrapper on top of theimg = FieldContainer.screenshot(filename=None)method. The image data is passed to a matplotlib figure and theaxobject is returned. - Add
ax = Mesh.imshow()which acts as a wrapper on top of theimg = Mesh.screenshot(filename=None)method. The image data is passed to a matplotlib figure and theaxobject is returned. - Add view-methods for
SolidBodyandSolidBodyNearlyIncompressible(same as already implemented for mesh and fields). - Add lists with norms of values and norms of the objective function in
tools.NewtonResult(xnorms=None, fnorms=None). - Add lists of norms of the objective function as attribute to
Job.fnorms. - Add new method to
Meshfor getting point ids next to a given point coordinateMesh.get_point_ids(value). - Add new method to
Meshfor getting cells attached to a given point coordinateMesh.get_cell_ids(point_ids). - Add new method to
Meshfor getting neighbour cellsMesh.get_cell_ids_neighbours(cell_ids). - Add new method to
Meshfor getting shared points between neighbour cellsMesh.get_point_ids_shared(cell_ids_neighbours). - Add new method to
Meshfor getting points on regular grids which are located at cornersMesh.get_point_ids_corners(). - Add new method to
Meshfor modifying the cell connectivity at cornersMesh.modify_corners(point_ids=None), supported for regular quad and hexahedron meshes.
Changed
- Pass optional keyword-arguments in
math.dot(**kwargs)to the underlying einsum-calls. - Enhance the performance of
math.cdya()by reducing the number of (intermediate) arrays to be created from 4 to 2. - Use fixed output locations for the extracted field-gradients and the integrated stiffness matrices in
SolidBodyandSolidBodyNearlyIncompressible. This enhances the performance. - Change default filename in
Mesh.screenshot()fromfilename="field.png"tofilename="mesh.png". - Change the return value on job-evaluation from
None = Job.evaluate()tojob = Job.evaluate(). - Change implementation of
LinearElasticLargeStrainfromNeoHooketoNeoHookeCompressible. - Do not invoke
pyvista.start_xvfb()on a posix-os. If required, run it manually. - Rename
tools._newton.Resulttotools._newton.NewtonResultand add it to the public API astools.NewtonResultbecause this class is returned as a result of Newton's method. - Rename the
r-arguments oftools.force()andtools.moment()toforces. - Rename the
point-argument oftools.moment()tocenterpoint. - Rename the
r-argument intools.save()toforces. Remove the unused argumentconverged. - Change the default file-extension from
.vtkto.vtuintools.save(filename="result.vtu"). - Change the default values of the gravity vector to zeros if
gravity=NoneinSolidBodyGravity(field, gravity=None, density=1.0).
Fixed
- Fix
tools.moment(). Usemath.cross(). The old implementation was completely wrong!
What's Changed
- Enhance performance of
cdya()and pass kwargs indot()by @adtzlr in https://github.com/adtzlr/felupe/pull/593 - Add output location for
field.extract(out=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/594 - Add
out-locations to the integral forms and use them in the solid bodies by @adtzlr in https://github.com/adtzlr/felupe/pull/595 - Add
Mesh.update(callback=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/596 - Do not invoke
pyvista.start_xvfb()on a posix-os by @adtzlr in https://github.com/adtzlr/felupe/pull/597 - Add
Mesh.imshow()andFieldContainer.imshow()by @adtzlr in https://github.com/adtzlr/felupe/pull/598 - Change return value in
job = Job.evaluate()by @adtzlr in https://github.com/adtzlr/felupe/pull/599 - Add view-methods for solid bodies by @adtzlr in https://github.com/adtzlr/felupe/pull/600
- Change implementation of
LinearElasticLargeStrainfromNeoHooketoNeoHookeCompressibleby @adtzlr in https://github.com/adtzlr/felupe/pull/601 - Rename
tools._newton.Resulttotools.NewtonResultby @adtzlr in https://github.com/adtzlr/felupe/pull/603 - Fix
tools.moment(field, forces, boundary, centerpoint=np.zeros(3))by @adtzlr in https://github.com/adtzlr/felupe/pull/605 - Add
tools.NewtonResult(xnorms=None, fnorms=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/606 - Rename
tools.save()-argumentrtoforcesby @adtzlr in https://github.com/adtzlr/felupe/pull/607 - Add new methods to
Meshby @adtzlr in https://github.com/adtzlr/felupe/pull/608 - Rename arguments of new
Mesh-methods by @adtzlr in https://github.com/adtzlr/felupe/pull/609 - Remove
fig-argument inCharacteristicCurve.plot(ax=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/610
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.13.0...v7.14.0
- Python
Published by adtzlr over 2 years ago
felupe - v7.13.0
[7.13.0] - 2023-12-22
Added
- Add
NeoHookeCompressiblefor compressible hyperelastic materials or even as a fast alternative forNeoHookewhen used inSolidBodyIncompressible.
Changed
- Vectorize
mesh.expand()which enhances the performance of quad/hex mesh-generators likeRectangle()andCube().
Fixed
- Fix logarithmic strain tensor evaluation in
Job.evaluate(filename="result.xdmf")and infield.plot("Logarithmic Strain", component=0).
What's Changed
- Vectorize
mesh.expand()by @adtzlr in https://github.com/adtzlr/felupe/pull/584 - Add compressible Neo-Hookean material formulation by @adtzlr in https://github.com/adtzlr/felupe/pull/586
- Fix logarithmic strain tensor evaluation by @adtzlr in https://github.com/adtzlr/felupe/pull/589
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.12.0...v7.13.0
- Python
Published by adtzlr over 2 years ago
felupe - v7.12.0
[7.12.0] - 2023-12-05
Added
- Add plot- and screenshot-methods to
RegionandScheme(base class for quadratures). - Add
item = FormItem(bilinearform, linearform=None)to be used as an item in aStep(items=[item]). - Add a new method
Boundary.apply_mask(mask). This simplifies re-definitions of boundary conditions with a custommask. - Add support for two-dimensional dof-based masks in
Boundary(mask)withmask.shapeof(mesh.npoints, field.dim)in addition to point-based masks withmask.sizeofmesh.npoints. - Add a bubble-multiplier argument for
RegionTriangleMINI(mesh, bubble_multiplier=0.1)andRegionTetraMINI(mesh, bubble_multiplier=0.1). - Add
region.reload(mesh, element, quadrature)to re-evaluate a region, already linked to a field, with a modified mesh or element class or quadrature.
Changed
- Refactor the assembly-submodule. Move the weak-form expression-related classes to the
assembly.expressionsubmodule. - Move
Basisto the newassembly.expressionsubmodule. - Make the
field-submodule public. - Always
import felupe as femin docs and tests. - Change default optional (keyword) arguments of a weak-form expression decorator from
Form(args=(), kwargs={})toForm(args=None, kwargs=None). - Change default value of the skip-argument
Boundary(skip=None). This will be set to(False, False, False)during initialization ifmask=None. - Change the default bubble-multiplier in
RegionTriangleMINIandRegionTetraMINIfrom 1.0 to 0.1. This affects only the template regions and not the element formulationsTriangleMINIandTetraMINI, which still default to a bubble-multiplier of 1.0. - Pass optional keyword-arguments to
math.einsum(**kwargs). This enables support for theout-argument. - Don't broadcast
math.identity(). - Rename
quadrature/_base.pytoquadrature/_scheme.py.
Fixed
- Fix
Boundaryand subsequently alsodof.symmetry()for different dimensions of the mesh and the field. - Fix negative cell-volumes error in
RegionTriangleMINIfor meshes likeRectangle(n=11).triangulate().add_midpoints_faces()by scaling down the (arbitrary) bubble-multiplier from 1.0 to 0.1.
Removed
- Don't import
Basisto the global namespace (not necessary as it is used only internally by the weak-Formexpression decorator). - Remove unused internal assemble-methods from
assembly.expression._linear.LinearFormandassembly.expression._bilinear.BilinearForm. - Remove extra-index-url
https://wheels.vtk.orgas they are now available on PyPI for Python 3.12.
What's Changed
- Add
Region.plot_scheme()by @adtzlr in https://github.com/adtzlr/felupe/pull/554 - Add
Region.plot()andquadrature.Scheme.plot()by @adtzlr in https://github.com/adtzlr/felupe/pull/556 - Refactor the assembly submodule by @adtzlr in https://github.com/adtzlr/felupe/pull/558
- Change private
_fieldto publicfieldsubmodule by @adtzlr in https://github.com/adtzlr/felupe/pull/560 - Docs and Tests: Always
import felupe as femby @adtzlr in https://github.com/adtzlr/felupe/pull/565 - Add
FormItem(bilinearform, linearform=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/566 - Add
Boundary.apply_mask()by @adtzlr in https://github.com/adtzlr/felupe/pull/571 Boundary: Add support for a dof-basedmaskby @adtzlr in https://github.com/adtzlr/felupe/pull/573- VTK-wheels: Remove extra-index-url
https://wheels.vtk.orgby @adtzlr in https://github.com/adtzlr/felupe/pull/574 - Add argument and change default
RegionTriangleMINI(bubble_multiplier=0.1), also forRegionTetraMINIby @adtzlr in https://github.com/adtzlr/felupe/pull/576 - Don't broadcast
math.identity() and add optional kwargs inmath.einsum(**kwargs)` by @adtzlr in https://github.com/adtzlr/felupe/pull/579 - Rename
quadrature/_base.pytoquadrature/_scheme.py. by @adtzlr in https://github.com/adtzlr/felupe/pull/580 - Add
Region.reload(mesh=None, element=None, quadrature=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/582
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.11.0...v7.12.0
- Python
Published by adtzlr over 2 years ago
felupe - v7.11.0
[7.11.0] - 2023-10-22
Added
- Add cell-type argument to
Mesh.add_midpoints_volumes(cell_type=None)and its variants for edges and faces. - Add
element.Element.view(),element.Element.plot()andelement.Element.screenshot(). This enables an interactive plot of the element in the reference configuration with its point ids, e.g.Hexahedron().plot().show().
Changed
- Change function signature and enhance
dof.biaxial(field, lefts=(None, None), rights=(None, None), moves=(0.2, 0.2), axes=(0, 1), clampes=(False, False), sym=True). Now with a full-featured docstring including an example. The old-style inputmovedefaults toNone, is deprecated and will be removed in the next major release. - Change function signature and enhance
dof.shear(field, bottom=None, top=None, moves=(0.2, 0.0, 0.0), axes=(0, 1), sym=True). Now with a full-featured docstring including an example. The old-stylemove,axis_compression,axis_shearandcompressionall default toNone, are deprecated and will be removed in the next major relase. - Merge keyword-arguments for the dual-regions with hard-coded arguments in
FieldsMixed(region, **kwargs). - Replace
np.product()(will be removed in NumPy 2.0) with the equivalentnp.prod().
Fixed
- Fix
FieldsMixed()for regions with MINI-element formulations: Disable the disconnection of the dual mesh. - Fix
dof.shear(sym=True)which was previously ignored due to a wrong setup of the symmetry boundaries. - Fix the install command on Python 3.12 by adding an extra-index-url for VTK wheels if they are not yet available on PyPI (the extra index is provided by Kitware).
- Fix a warning because the timings of the Newton-Rhapson solver are printed from a one-dimensional array. Take the first item of the runtime-array to resolve this warning.
Removed
- Remove the undocumented
dof.planar()because this is a special case of the biaxial load casedof.biaxial(field, clampes=(True, False), moves=(0.2, 0), sym=False, axes=(0, 1)).
What's Changed
- Enhance loadcase biaxial by @adtzlr in https://github.com/adtzlr/felupe/pull/534
- Remove planar load case by @adtzlr in https://github.com/adtzlr/felupe/pull/535
- Fix
FieldsMixed()for MINI-elements by @adtzlr in https://github.com/adtzlr/felupe/pull/538 - Fix
dof.shear(sym=True)by @adtzlr in https://github.com/adtzlr/felupe/pull/540 FieldsMixed(region, **kwargs): Mergekwargsfor the dual region by @adtzlr in https://github.com/adtzlr/felupe/pull/541- Add support for Python 3.12 by @adtzlr in https://github.com/adtzlr/felupe/pull/543
- Add element methods view, plot and screenshot by @adtzlr in https://github.com/adtzlr/felupe/pull/551
- Deprecate old-style args of load cases by @adtzlr in https://github.com/adtzlr/felupe/pull/553
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.10.0...v7.11.0
- Python
Published by adtzlr over 2 years ago
felupe - v7.10.0
[7.10.0] - 2023-09-14
Added
- Add
ViewFieldas method to a field containerFieldContainer.view(). Now a field container provides the view sub-methods directly, i.e. addFieldContainer.plot()andFieldContainer.screenshot(filename="mesh.png").
Changed
- Hide the undeformed mesh in
Mesh.plot()by default (also affectsMesh.screenshot()).
Fixed
- Fix taking screenshots of a mesh.
What's Changed
- Add
ViewField(field)as method toFieldContainer.view()by @adtzlr in https://github.com/adtzlr/felupe/pull/533
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.9.0...v7.10.0
- Python
Published by adtzlr over 2 years ago
felupe - v7.9.0
[7.9.0] - 2023-09-13
Added
- Add
ViewMeshas method to a meshMesh.view(). Now a mesh provides the view sub-methods directly, i.e. addMesh.plot()andMesh.screenshot(filename="mesh.png").
What's Changed
- Add plot-related methods from
ViewMeshtoMesh: view, plot, screenshot by @adtzlr in https://github.com/adtzlr/felupe/pull/532
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.8.0...v7.9.0
- Python
Published by adtzlr over 2 years ago
felupe - v7.8.0
[7.8.0] - 2023-09-05
Added
- Add
mesh.Triangle(a, b, c, n=2)for the creation of a quad-meshed triangle.
Changed
- Change
mesh.Circle(n=6)to the minimummesh.Circle(n=2). - Enhance
dof.uniaxial(axis=0, sym=(False, True, False))by a user-defined axis and selective symmetries. - Enhance
dof.shear(axis_compression=1, axis_shear=0, sym=True)by user-defined axes of compression and shear.
What's Changed
- Add
mesh.Triangle(a, b, c, n)by @adtzlr in https://github.com/adtzlr/felupe/pull/526 - Fix
mesh.concatenate()for a list of length one by @adtzlr in https://github.com/adtzlr/felupe/pull/528 - Enhance uniaxial- and shear-loadcases by @adtzlr in https://github.com/adtzlr/felupe/pull/529
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.7.0...v7.8.0
- Python
Published by adtzlr over 2 years ago
felupe - v7.7.0
[7.7.0] - 2023-08-31
Added
- Add optional normalization of mesh runouts (which are then indents) by
mesh.runouts(normalize=False). - Add
LinearElasticLargeStrain(E=None, nu=None, parallel=False), suitable for large-rotation analyses. This is based onNeoHooke()with converted Lamé-constants. - Add a simple boundary-based quad- or hex mesher: A mesh tool for filling the face or volume between two line- or quad-meshes
mesh.fill_between(mesh, other_mesh, n=11). - Add
Circle(radius, centerpoint, n)for the creation of a quad-meshed circle.
Changed
- Update the mesh also with a new points array: this changes the Mesh-update function
mesh.update(cells, cell_type=None)tomesh.update(points=None, cells=None, cell_type=None). Note that this could break old scripts which usemesh.update(new_cells)instead ofmesh.update(cells=new_cells). - Move the copy-method of a Mesh
Mesh.copy()to its base-class and extend it to optionally update the attributesDiscreteGeometry.copy(points=None, cells=None, cell_type=None).
Removed
- Remove tests on Python 3.7 (end of life).
What's Changed
- Normalize runouts of meshes
mesh.runouts(normalize=True)by @adtzlr in https://github.com/adtzlr/felupe/pull/510 - Add
LinearElasticLargeStrainfor linear-elastic materials by @adtzlr in https://github.com/adtzlr/felupe/pull/514 - Add a minimalistic boundary-based quad- or hex-mesh tool by @adtzlr in https://github.com/adtzlr/felupe/pull/519
- Update-method of
Mesh: Add optional points-argument by @adtzlr in https://github.com/adtzlr/felupe/pull/521 - Move
Mesh.copy()toDiscreteGeometry.copy()by @adtzlr in https://github.com/adtzlr/felupe/pull/523 - Add
Circle(radius, centerpoint, n)for creating quad-meshed circles by @adtzlr in https://github.com/adtzlr/felupe/pull/524
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.6.1...v7.7.0
- Python
Published by adtzlr almost 3 years ago
felupe - v7.5.0
[7.5.0] - 2023-07-20
Added
- Add
ViewSolid, which enablesview = ViewSolid(field, solid=None)the view of cauchy stresses, e.g.view.plot("Principal Values of Cauchy Stress").show(). - Add constitutive models to top-level namespace, e.g.
yeoh()fromconstitution.yeoh(). This makes typing hyperelastic material formulations shorter:Hyperelastic(yeoh, C10=0.5, C20=-0.1, C30=0.02). - Add
CharacteristicCurve.plot(swapaxes=False). - Add
MaterialAD: A user-defined material definition with Automatic Differentiation. Only the first Piola-Kirchhoff stress tensor must be provided.
Changed
- Add optional point- and cell-data args for
ViewMesh(mesh, point_data=None, cell_data=None)like already implemented inViewField. - Enforce contiguous arrays in
UserMaterialHyperelastic(enhance performance). View: Switch fromViewFieldtoViewSolid.View: Always plot the undeformed mesh withopacity=0.2andshow_edges=False.- Rename
UserMaterialtoMaterial,UserMaterialStraintoMaterialStrain,UserMaterialHyperelastictoHyperelastic(keep old alias names until next major release). - Use consistent indices in
einsum()for (elementwise operating) trailing axes:qfor quadrature point andcfor cell. - Rename internal
IntegralFormMixedtoIntegralForm, which is now consistent internally and in the top-level namespace. The previous internal base-class for a single-fieldIntegralFormis renamed toWeakForm. - Don't plot x- and y-labels in
CharacteristicCurve.plot(xlabel=None, ylabel=None)if they are not specified.
Fixed
- Don't warp the mesh in
ViewMesh.plot(). - Warp the mesh in case no name is passed in
View.plot(name=None). - Don't modify a given label in
Scene.plot(label=None). - Fix the second invariant of the distortional part of the right Cauchy-Green deformation tensor in hyperelastic material formulations using tensortrax, i.e. fix the implementations of
mooney_rivlin(),third_order_deformation()andvan_der_waals().
Removed
- Remove internal (unused) imports of the assembly submodule. ## What's Changed
- Enhance
View: Add optional point- and cell-data toViewMeshby @adtzlr in https://github.com/adtzlr/felupe/pull/475 - Add
ViewSolid(field, solid=None)and setView = ViewSolidby @adtzlr in https://github.com/adtzlr/felupe/pull/479 - Warp the mesh for
View.plot(name=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/481 - Rename
UserMaterial...to shorter names by @adtzlr in https://github.com/adtzlr/felupe/pull/483 - Add constitutive material formulations to top-level namespace by @adtzlr in https://github.com/adtzlr/felupe/pull/485
- Docs: Add Example Inflation by @adtzlr in https://github.com/adtzlr/felupe/pull/484
- Consistent idx in
einsum(), EnhanceFieldsMixed(n=1)by @adtzlr in https://github.com/adtzlr/felupe/pull/489 Basis: Rename idx ineinsum()by @adtzlr in https://github.com/adtzlr/felupe/pull/490- Rename internal
IntegralFormMixedtoIntegralFormby @adtzlr in https://github.com/adtzlr/felupe/pull/491 - Remove unused imports of the assembly submodule by @adtzlr in https://github.com/adtzlr/felupe/pull/492
- Don't modify a given label in
Scene.plot(label=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/495 - Enhance plotting in a characteristic-curve job by @adtzlr in https://github.com/adtzlr/felupe/pull/498
- Fix
mooney_rivlin(),third_order_deformation()andvan_der_waals()by @adtzlr in https://github.com/adtzlr/felupe/pull/502 - Add
MaterialAD: PK1-based Material w/ Automatic Differentiation by @adtzlr in https://github.com/adtzlr/felupe/pull/493
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.4.1...v7.5.0
- Python
Published by adtzlr almost 3 years ago
felupe - v7.4.0
[7.4.0] - 2023-04-29
Added
- Add
ViewMesh(mesh)and rebaseView(internally renamed toViewField) onViewMeshwith additional point- and cell-data.
Changed
- Change
math.linsteps(axis=None, axes=None)to create optional multi-column arrays, where the steps are inserted at the givenaxis. - Make last
gravityanddensityarguments ofSolidBodyGravity(field, gravity=None, density=1.0)optional.
What's Changed
- Add
ViewMesh(mesh, cell_type=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/470 - Multi-column
math.linsteps(axis=None, axes=None)and optional args inSolidBodyGravity(field, gravity=None, density=1.0)by @adtzlr in https://github.com/adtzlr/felupe/pull/472
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.3.0...v7.4.0
- Python
Published by adtzlr about 3 years ago
felupe - v7.3.0
[7.3.0] - 2023-04-28
Changed
- Show a progress bar during
Job.evaluate(verbose=True)(new optional dependencytqdm). The legacy detailed output is available withJob.evaluate(verbose=2).
Removed
- Remove config files for MyBinder. They are now located in a different repository adtzlr/felupe-web.
What's Changed
Job: Add progress bar by @adtzlr in https://github.com/adtzlr/felupe/pull/467Job.evaluate(verbose=True): Further reduce the output by @adtzlr in https://github.com/adtzlr/felupe/pull/469
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.2.0...v7.3.0
- Python
Published by adtzlr about 3 years ago
felupe - v7.2.0
[7.2.0] - 2023-04-26
Added
- Add
environment.ymlconfig file for MyBinder. - Add a timetrack-list as
Job.timetrackwhich is updated incrementally onJob.evaluate(). - Add
View(field, point_data=None, cell_data=None), a result plotter powered bypyvista. - Add
ViewXdmf(filename, time=0), a result plotter powered bypyvista.
Changed
- Make everything in
/srccompliant with flake8. - Generalize the math-module so that all functions handle an arbitrary number of elementwise-operating trailing axes.
- The special contraction modes of
math.dot(mode=(2,2))andmath.ddot(mode=(2,2))have to be specified by themode-argument and are not detected by the shapes of the operands. - Enhance the overall performance by enforcing the identity matrix to a C-contiguous array.
- Change point- and cell-data functions used in
Job.evaluate(point_data=None, cell_data=None)fromfun(substep)tofun(field, substep).
Fixed
- Fix timings shown in
newtonrhapson(verbose=True): The solve time was only related to one call of the solver while the assembly time referred to the whole runtime subtracted by the single-call solve time.
What's Changed
- Flake8 Compliance (without tests) by @adtzlr in https://github.com/adtzlr/felupe/pull/448
- Flake8: Remove E741 from ignore list by @adtzlr in https://github.com/adtzlr/felupe/pull/449
math: Handle arbitrary number of trailing axes by @adtzlr in https://github.com/adtzlr/felupe/pull/451- Fix timings in
newtonrhapson()by @adtzlr in https://github.com/adtzlr/felupe/pull/453 Job: Addtimetrackattribute by @adtzlr in https://github.com/adtzlr/felupe/pull/455- Add
Result()for plotting XDMF-files by @adtzlr in https://github.com/adtzlr/felupe/pull/456 - Enhance and simplify
Resultby @adtzlr in https://github.com/adtzlr/felupe/pull/458 Result: Switch to more default args ofpyvistaby @adtzlr in https://github.com/adtzlr/felupe/pull/460Job.evaluate(): Change point- and cell-data function arguments by @adtzlr in https://github.com/adtzlr/felupe/pull/461Result.plot(name=None): Plot only the undeformed mesh by @adtzlr in https://github.com/adtzlr/felupe/pull/462- Rename
ResulttoViewby @adtzlr in https://github.com/adtzlr/felupe/pull/463 View: Addcell_type-argument by @adtzlr in https://github.com/adtzlr/felupe/pull/464- Docs: Add Notebook support by @adtzlr in https://github.com/adtzlr/felupe/pull/465
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.1.0...v7.2.0
- Python
Published by adtzlr about 3 years ago
felupe - v7.1.0
[7.1.0] - 2023-04-15
Added
- Add string representations for
RegionandFieldContainer. - Add
Job.evaluate(parallel=True)in addition toJob.evaluate(kwargs={"parallel": True}). If both are given, the key in the dict is overwritten by the user-defined value. - Add
mesh.stack(meshes)for joining meshes with identical points-arrays and cell-types. Contrary tomesh.concatenate(meshes), the points are not stacked and no offsets are inserted into the cells-arrays. - Add
mesh.translate(move, axis)for the translation of mesh-points.
Changed
- Pass optional keyword-arguments in
CharacteristicCurve.plot(**kwargs)to the figure. - Don't invoke
CharacteristicCurve.evaluate()fromCharacteristicCurve.plot(), raise an error if the current job is not evaluated instead. - Make the endpoint of
math.linsteps(endpoint=True)optional. - Don't modify the mesh for the dual regions
RegionConstantQuad()andRegionConstantHexahedron(). Instead, it is required to pass a dual (disconnected) mesh with one point per cellRegionConstantQuad(mesh.dual(points_per_cell=1)). - Make requirement
einsumtoptional again due to issues with JupyterLite. - Add
matplotlibto optional requirements.
Fixed
- Catch
ModuleNotFoundErroriffrom einsumt import einsumtfails (in JupyterLite) and fall back tofrom numpy import einsum as einsumt.
What's Changed
- Add string representations for
RegionandFieldContainerby @adtzlr in https://github.com/adtzlr/felupe/pull/432 CharacteristicCurve: Pass kwargs to the plot by @adtzlr in https://github.com/adtzlr/felupe/pull/435- Add
Job.evaluate(parallel=False)by @adtzlr in https://github.com/adtzlr/felupe/pull/437 - Add
Mesh.dual()and rebaseMesh.disconnect(), create dual-meshes inFieldsMixed()by @adtzlr in https://github.com/adtzlr/felupe/pull/441 - Add
mesh.stack(meshes)andmesh.translate(move, axis)by @adtzlr in https://github.com/adtzlr/felupe/pull/443 - Threaded einsum: Fall-back to numpy if
einsumtis not available by @adtzlr in https://github.com/adtzlr/felupe/pull/446
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.0.0...v7.1.0
- Python
Published by adtzlr about 3 years ago
felupe - v7.0.0
[7.0.0] - 2023-04-07
Added
- Add boundary regions
RegionQuadraticQuadBoundaryandRegionBiQuadraticQuadBoundaryfor quadratic quads. - Add boundary regions
RegionQuadraticHexahedronBoundaryandRegionTriQuadraticHexahedronBoundaryfor quadratic hexahedrons. - Add
mesh.flip(mask=None)to flip a mirrored or wrong indexed cells array, applied on a given booleanmaskof cells.
Changed
- Change
einsumtfrom an optional to a required dependency. - Vectorize implementations of
MultiPointConstraintandMultiPointContactand re-implement both asscipy.sparse.lil_matrix(). - Rename old
MeshtoDiscreteGeometryand rebase newMeshonDiscreteGeometry. - Simplify the usage of explicit mesh-related tools by adding them as methods to
Mesh, i.e.mesh.tools.expand(Rectangle())is equivalent toRectangle().expand(). - Print runtimes for time spent on Assembly and Solve in
newtonrhapson(verbose=True). - Check for negative cell-volumes at quadrature points and print a warning along with a possible fix.
Fixed
- Fix
tools.project()for higher-order quad- and hexahedron elements. - Fix transposed output of
tools.project(). - Fix failed scalar-value checks by using
np.isscalar()inmesh.expand(z=1)andmesh.revolve(phi=180)wherezorphiare of typenp.int32. - Fix read a Mesh with no cells in
mesh.read().
Removed
- Remove
jit-compilation of forms (parallelis the preferred method). - Remove unused
tools.check(). - Remove optional dependency
sparse.
What's Changed
- Remove
jitand reduce complexity ofnewtonrhapson()by @adtzlr in https://github.com/adtzlr/felupe/pull/408 - Enforce
einsumtby @adtzlr in https://github.com/adtzlr/felupe/pull/409 - Vectorize implementation of
MultiPointConstraintby @adtzlr in https://github.com/adtzlr/felupe/pull/412 - Add boundary regions for quadratic quads by @adtzlr in https://github.com/adtzlr/felupe/pull/414
- Add boundary regions for quadratic hexahedrons by @adtzlr in https://github.com/adtzlr/felupe/pull/415
- Fix
TriQuadraticHexahedron().pointsandtools.projectby @adtzlr in https://github.com/adtzlr/felupe/pull/419 - Fix scalar-checks in
mesh.expand()andmesh.revolve()by @adtzlr in https://github.com/adtzlr/felupe/pull/421 - Fix read a mesh with no cells in
mesh.read()by @adtzlr in https://github.com/adtzlr/felupe/pull/423 - Enhance
Mesh: Mesh tools as methods by @adtzlr in https://github.com/adtzlr/felupe/pull/425 - Print newton-timings for time spent on Assembly and Solve by @adtzlr in https://github.com/adtzlr/felupe/pull/427
- Fix
MultiPointConstraintandMultiPointContactwith active skips by @adtzlr in https://github.com/adtzlr/felupe/pull/429
Full Changelog: https://github.com/adtzlr/felupe/compare/v6.4.0...v7.0.0
- Python
Published by adtzlr about 3 years ago
felupe - v6.4.0
[6.4.0] - 2023-04-01
Added
- Add a new argument to pass a mesh for the dual regions in
FieldsMixed(mesh=None). - Add quadrature and grad arguments to
RegionLagrange. - Add order attribute to
RegionLagrange. - Add items-argument for custom slicing of characteristic curve plots in
CharacteristicCurve.plot(items=None).
Changed
- Enhance Domain integration in
IntegralForm: Ensure C-contiguous arrays asfun-argument. - Enhance performance of hyperelastic material model formulations using automatic differentiation.
- Perform reshape and broadcasting if user-defined
Field-values with correct size are given. - Make symmetry-related boundary conditions in uniaxial loadcase optional
dof.uniaxial(sym=True). - Merge custom point- and cell-data dicts with default dicts in
Jobinstead of replacing them, also addJob(point_data_default=True, cell_data_default=True). - Allow to change cell-type in
Mesh.update(cells, cell_type=None). - Enhance the creation of a disconnected mesh for mixed-field formulations by
Mesh.disconnect(points_per_cell=None, calc_points=True). - Change required to optional arguments in
Step(items, ramp=None, boundaries=None).
Fixed
- Fix broadcast arrays for the geometric stiffness contribution of hyperelastic material model formulations using automatic differentiation.
What's Changed
- IntegralForm: Ensure C-contiguous arrays as fun-argument by @adtzlr in https://github.com/adtzlr/felupe/pull/386
- Perform reshape and broadcasting if user-defined
Field-values with correct size are given. by @adtzlr in https://github.com/adtzlr/felupe/pull/388 - Make symmetry boundary conditions optional in
dof.uniaxial(sym=True)by @adtzlr in https://github.com/adtzlr/felupe/pull/392 Job: Append point- and cell-data to default instead of replacing them by @adtzlr in https://github.com/adtzlr/felupe/pull/394- Add a custom mesh for the dual regions in
FieldsMixed(mesh=None)by @adtzlr in https://github.com/adtzlr/felupe/pull/396 - Enhance
FieldsMixed(): Add support forRegionLagrange(family of Taylor-Hood elements) by @adtzlr in https://github.com/adtzlr/felupe/pull/400 - Characteristic Curve - Job plot: Add items-argument for custom slicing by @adtzlr in https://github.com/adtzlr/felupe/pull/390
- Enhance
Mesh.disconnect(points_per_cell=None, calc_points=True)by @adtzlr in https://github.com/adtzlr/felupe/pull/403 Step: Make argumentsrampandboundariesoptional by @adtzlr in https://github.com/adtzlr/felupe/pull/405
Full Changelog: https://github.com/adtzlr/felupe/compare/v6.3.0...v6.4.0
- Python
Published by adtzlr about 3 years ago
felupe - v6.3.0
[6.3.0] - 2023-02-06
Added
- Add more hyperelastic material formulations: Saint Venant-Kirchhoff, Mooney-Rivlin, Arruda-Boyce, Extended Tube and Van der Waals.
- Add
BiQuadraticQuadelement (as a permuted version ofArbitraryOrderLagrangeElement). - Add
Quadraticelement. - Add new arguments for more flexible region templates, e.g.
RegionQuad(mesh, quadrature=GaussLegendre(order=1, dim=2), grad=True). - Add support for triangle/tetra in
FieldsMixed(). - Add optional state variables to
UserMaterialHyperelastic(model, nstatevars=0). - Add finite-strain viscoelastic material formulation.
Changed
- Switch to a
src/-layout. - Import base-element class as
element.Element(). - Auto-detect min/max-coordinates of mesh-points for loadcases if
dof.uniaxial(right=None). - Ensure compatibility with
tensortrax>0.6.0(Van-der-Waals and Viscoelastic models).
Fixed
- Fix rotation matrix for a rotation around the y-axis.
What's Changed
- Add more hyperelastic material formulations by @adtzlr in https://github.com/adtzlr/felupe/pull/369
- Fix rotation matrix around y-axis by @adtzlr in https://github.com/adtzlr/felupe/pull/370
- Add
QuadraticQuad()andBiQuadraticQuad()elements by @adtzlr in https://github.com/adtzlr/felupe/pull/371 - Add support for dual triangle/tetra-regions by @adtzlr in https://github.com/adtzlr/felupe/pull/373
- Switch to
src/-layout by @adtzlr in https://github.com/adtzlr/felupe/pull/374 - Add optional state variables to
UserMaterialHyperelastic(nstatevars=0)by @adtzlr in https://github.com/adtzlr/felupe/pull/377 - Import base-element class
element.Element()by @adtzlr in https://github.com/adtzlr/felupe/pull/378 - Change loadcases: Detect Min/Max Coordinates of
mesh.pointsby @adtzlr in https://github.com/adtzlr/felupe/pull/381 - Fix
tensortrax>0.6.0compatibility by @adtzlr in https://github.com/adtzlr/felupe/pull/382
Full Changelog: https://github.com/adtzlr/felupe/compare/v6.2.5...v6.3.0
- Python
Published by adtzlr over 3 years ago
felupe - v6.2.5
[6.2.5] - 2023-01-02
Fixed
- Once again fix init if
tensortraxis not installed.
What's Changed
- Fix import of
UserMaterialHyperelasticby @adtzlr in https://github.com/adtzlr/felupe/pull/367
Full Changelog: https://github.com/adtzlr/felupe/compare/v6.2.4...v6.2.5
- Python
Published by adtzlr over 3 years ago
felupe - v6.2.3
[6.2.3] - 2023-01-01
Changed
- Remove
setup.cfg, changepyproject.tomland store the version tag only once within the source code (__about__.py).
What's Changed
- Change
pyproject.tomlby @adtzlr in https://github.com/adtzlr/felupe/pull/362
Full Changelog: https://github.com/adtzlr/felupe/compare/v6.2.2...v6.2.3
- Python
Published by adtzlr over 3 years ago
felupe - v6.2.2
[6.2.2] - 2022-12-20
Fixed
- Fix init if
tensortraxis not installed.
What's Changed
- Fix init if
tensortraxis not installed. by @adtzlr in https://github.com/adtzlr/felupe/pull/360
Full Changelog: https://github.com/adtzlr/felupe/compare/v6.2.1...v6.2.2
- Python
Published by adtzlr over 3 years ago
felupe - v6.2.0
[6.2.0] - 2022-12-16
Added
- Add Total-Lagrange
UserMaterialHyperelastic(fun, parallel=False, **kwargs)based on optionaltensortrax. Only available iftensortraxis installed. - Add constitutive isotropic hyperelastic model formulations to be used with
UserMaterialHyperelastic()(constitution.ogden(C, mu, alpha), etc.).
Auto-Generated Release-Notes
What's Changed
- Add
UserMaterialHyperelastic()by @adtzlr in https://github.com/adtzlr/felupe/pull/355 - Make
tensortraxoptional by @adtzlr in https://github.com/adtzlr/felupe/pull/357 - Add models for isotropic hyperelasticity
UserMaterialHyperelastic()by @adtzlr in https://github.com/adtzlr/felupe/pull/358
Full Changelog: https://github.com/adtzlr/felupe/compare/v6.1.0...v6.2.0
- Python
Published by adtzlr over 3 years ago
felupe - v6.1.0
[6.1.0] - 2022-12-10
Changed
- Enhance plotting with custom
x- andy-data inCharacteristicCurve.plot(x, y)and allow a list of items for force evaluation inCharacteristicCurve(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)).
Auto-Generated Release-Notes
What's Changed
- Enhance
CharacteristicCurve(items=[...]).plot(x, y)by @adtzlr in https://github.com/adtzlr/felupe/pull/350 - Enhance
linstepsby supporting a list of substeps by @adtzlr in https://github.com/adtzlr/felupe/pull/352 - Enhance
dof.shear(compression=(0, 0)by @adtzlr in https://github.com/adtzlr/felupe/pull/354
Full Changelog: https://github.com/adtzlr/felupe/compare/v6.0.0...v6.1.0
- Python
Published by adtzlr over 3 years ago
felupe - v6.0.0
[6.0.0] - 2022-11-20
Added
- Add
project(mean=True)to project cell mean-values to mesh-points. Nowproject()supports Triangles and Tetrahedrons. - Add
RegionBoundary.mesh_faces()for a mesh with face-cells on the selected boundary of a region. - Add pseudo-elastic material
OgdenRoxburgh()which may be used withSolidBodyNearlyIncompressible(). - Add
umat = UserMaterial(stress, elasticity, nstatevars=0, **kwargs)with user-defined functions for the (first Piola-Kirchhoff) stress tensorP, statevars_new = umat.gradient([F, statevars], **kwargs)and the according fourth-order elasticity tensorA = umat.hessian([F, statevars], **kwargs)based on the deformation gradient. - Add
UserMaterialStrain()for small-strain based user-defined material formulations with an umat-interface suitable for elastic-plastic frameworks. - Add
LinearElasticPlasticIsotropicHardening()which is based onUserMaterialStrain()andconstitution.linear_elastic_plastic_isotropic_hardening(). - Add new math helpers
math.ravel()andmath.reshape(). - Add optional axis argument on which the norm is evaluated
math.norm(axis=None).
Changed
- Unify material definition with methods for the stress
P, statevars_new = umat.gradient([F, statevars])and the elasticity tensorA = umat.hessian([F, statevars]). This breaks support for materials defined by matadi<=0.1.10. - Do not broadcast the (constant) elasticity tensor for linear-elastic materials as
einsumt>=0.9.3supports broadcasting along the parallel-executed dimension. - Change not-updating attribute of
FieldContainer(fields).valuesto a methodFieldContainer(fields).values()which returns the current field values.
Removed
- Remove unused
SolidBodyTensor()andSolidBodyTensorNearlyIncompressible(). - Remove unused
regionargument ofLinearElastic().hessian().
Auto-Generated Release-Notes
What's Changed
- Add
project(mean=True)by @adtzlr in https://github.com/adtzlr/felupe/pull/329 - Add
RegionBoundary.mesh_faces()by @adtzlr in https://github.com/adtzlr/felupe/pull/334 - Add pseudo-elastic material
OgdenRoxburgh()by @adtzlr in https://github.com/adtzlr/felupe/pull/335 - Unify
umatfor hyperelastic and tensor-based material formulations by @adtzlr in https://github.com/adtzlr/felupe/pull/339 - Do not broadcast linear-elastic elasticity tensor by @adtzlr in https://github.com/adtzlr/felupe/pull/342
- FieldContainer: Change attribute
valuesto methodvalues()by @adtzlr in https://github.com/adtzlr/felupe/pull/344 - Add
UserMaterialStrain()by @adtzlr in https://github.com/adtzlr/felupe/pull/346 - Enhance and Fix the Documentation by @adtzlr in https://github.com/adtzlr/felupe/pull/347
Full Changelog: https://github.com/adtzlr/felupe/compare/v5.3.1...v6.0.0
- Python
Published by adtzlr over 3 years ago
felupe - v5.3.1
Changelog since [5.3.0] - 2022-11-03
Fixed
- Fix volume evaluation of (nearly) incompressible solids for axisymmetric fields.
Auto-Generated Release-Notes
What's Changed
- Fix incompressible solid: Wrong volume evaluation for axisymmetric fields by @adtzlr in https://github.com/adtzlr/felupe/pull/327
Full Changelog: https://github.com/adtzlr/felupe/compare/v5.3.0...v5.3.1
- Python
Published by adtzlr over 3 years ago
felupe - v5.3.0
Changelog since [5.2.0] - 2022-10-08
Added
- Add optional pre-compression to shear-loadcase
dof.shear(compression=0.0). - Add
MeshContainerand string-representation forMeshobjects. - Add a mesh-reader using meshio
mesh.read(filename, ...). - Add
SolidBodyNearlyIncompressible(umat, field, bulk)for (nearly) incompressible solids and a given (distortional-part only) constitutive material formulation. This is a pure displacement-based alternative to the three-field-formulation technique.
Changed
- Support an optional user-defined meshio-object in
Job().evaluate(mesh=None, filename="result.xdmf"). - Support a distortional-part only Neo-Hookean material formulation with no bulk modulus defined
NeoHooke(mu=1.0).
Fixed
- Fix missing
ArbitraryOrderLagrangeElement.pointsattribute. - Fix ignored mask
only_surface=TrueforRegionBoundary().mesh.cells_faces. - Set default pressure to zero in
SolidBodyPressure(). - Take the mesh from the global
x0-field ifx0is passed tojob.evaluate(x0=...). - Fix missing update of global field
x0injob.evaluate(x0)after each completed substep.
Auto-Generated Release-Notes
What's Changed
- Add points attribute to lagrange element by @adtzlr in https://github.com/adtzlr/felupe/pull/301
- Add pre-compression to shear loadcase by @adtzlr in https://github.com/adtzlr/felupe/pull/305
- Fix ignored surface mask for
cells_facesofRegionBoundaryby @adtzlr in https://github.com/adtzlr/felupe/pull/307 - Add
MeshContainerand string-representation forMeshobjects by @adtzlr in https://github.com/adtzlr/felupe/pull/312 - Enhance Mesh-Container by @adtzlr in https://github.com/adtzlr/felupe/pull/313
- Add
mesh.read(filename, ...)by @adtzlr in https://github.com/adtzlr/felupe/pull/316 job.evaluate(x0=...): Take mesh from global fieldx0if present by @adtzlr in https://github.com/adtzlr/felupe/pull/320- Add
SolidBodyNearlyIncompressible(umat, field, bulk)by @adtzlr in https://github.com/adtzlr/felupe/pull/323 - Fix missing update of
x0injob.evaluate(x0)after each completed substep by @adtzlr in https://github.com/adtzlr/felupe/pull/324
Full Changelog: https://github.com/adtzlr/felupe/compare/v5.2.0...v5.3.0
- Python
Published by adtzlr over 3 years ago
felupe - v5.2.0
Changelog since [5.1.0] - 2022-09-09
Added
- Add
xscaleandyscalearguments toCharacteristicCurve.plot(). - Add
mesh.Grid(*xi)as generalized line, rectangle or cube with custom linspaces. - Add
mesh.concatenate(meshes)to join a sequence of meshes with identical cell types. - Add
x0argument toJob.evaluate(x0=field). - Add
maskargument tomesh.runouts(mask=slice(None)). - Add
callback(stepnumber, substepnumber, substep)argument toCharacteristicCurve()(like inJob()). - Add an on-the-fly XDMF writer for a job (via meshio)
Job.evaluate(filename="result.xdmf")with the possibility to add optionalpoint_dataandcell_datadicts.
Changed
- Remove Warning if
einsumtrequirement is not found (switch to numpy without any warnings). - Requires Python 3.7+.
Fixed
- Fix ignored axis argument of
mesh.revolve(axis=1).
Auto-Generated Release-Notes
What's Changed
- Add
xscaleandyscalearguments toCharacteristicCurve.plot()by @adtzlr in https://github.com/adtzlr/felupe/pull/281 - Add
mesh.Grid(*xi)andmesh.concatenate([mesh1, mesh2, ...])by @adtzlr in https://github.com/adtzlr/felupe/pull/284 - Add
job.evaluate(x0=field)by @adtzlr in https://github.com/adtzlr/felupe/pull/286 - Fix
mesh.revolve(axis=1)by @adtzlr in https://github.com/adtzlr/felupe/pull/288 - Add
callbackargument toCharacteristicCurve()by @adtzlr in https://github.com/adtzlr/felupe/pull/290 - Remove Warning if
einsumtis not installed by @adtzlr in https://github.com/adtzlr/felupe/pull/292 - Add XDMF writer by @adtzlr in https://github.com/adtzlr/felupe/pull/294
Full Changelog: https://github.com/adtzlr/felupe/compare/v5.1.0...v5.2.0
- Python
Published by adtzlr over 3 years ago
felupe - v5.1.0
Changelog since [5.0.0] - 2022-08-21
Changed
- Enhance
Boundary: Select Points by value in addition to a callable (fx=lambda x: x == 0is equivalent tofx=0), also addmode="and"andmode="or"argument. - Support line elements within the revolution function
mesh.revolve(). - Import previously hidden functions
fun_items()andjac_items()astools.fun()andtools.jac(), respectively (useful for numeric continuation). - Add step- and substep-numbers as arguments to the
callback(stepnumber, substepnumber, substep)-function of aJob.
Auto-Generated Release-Notes
What's Changed
- Enhance
Boundaryclass by @adtzlr in https://github.com/adtzlr/felupe/pull/274 - Support Line-elements within
mesh.revolve()by @adtzlr in https://github.com/adtzlr/felupe/pull/276 - Import
fun_items()andjac_items()fromfelupe.tools._newtonby @adtzlr in https://github.com/adtzlr/felupe/pull/277 - Docs: Add numeric continuation tutorial with contique by @adtzlr in https://github.com/adtzlr/felupe/pull/278
- Callback: Add args (step- and substep-numbers) by @adtzlr in https://github.com/adtzlr/felupe/pull/279
Full Changelog: https://github.com/adtzlr/felupe/compare/v5.0.0...v5.1.0
- Python
Published by adtzlr over 3 years ago
felupe - v5.0.0
Changelog since [4.0.0] - 2022-08-07
Added
- Add
SolidBodyGravityfor body forces acting on a solid body. - Support list of linked fields in Newton-Rhapson solver
newtonrhapson(fields=[field_1, field_2]). - Automatic init of state variables in
SolidBodyTensor. - Add
mesh.runouts()for the creation of runouts of rubber-blocks of rubber-metal structures. - Add
FieldPlaneStrainwhich is a 2d-field and returns gradients of shape(3, 3)(for plane strain problems with 3d user materials). - Add
PointLoadfor the creation of external force vectors. - Add
Stepwith a generator for substeps,JobandCharacteristicCurve.
Changed
- Move
MultiPointConstraintto mechanics module and unify handling withSolidBody. - Rename
bodiesargument of Newton-Rhapson solver toitems(now supports MPC). - Return partitioned system as dict from loadcases
loadcase=dict(dof0=dof0, dof1=dof1, ext0=ext0). - Check function residuals norm in
newtonrhapson()instead of incremental field-values norm.
Fixed
- Fix assembled vectors and results of
SolidBodyPressurefor initially defined pressure values. - Fix
verbose=0option ofnewtonrhapson(). - Fix wrong assembly of axisymmetric mixed-fields due to introduced plane strain field-trimming.
Auto-Generated Release-Notes
What's Changed
- Add SolidBodyGravity an Fix SolidBodyPressure by @adtzlr in https://github.com/adtzlr/felupe/pull/237
- Modernize MultiPointConstraint by @adtzlr in https://github.com/adtzlr/felupe/pull/238
- Improve loadcase by @adtzlr in https://github.com/adtzlr/felupe/pull/240
- Newton-Rhapson: Support multiple fields by @adtzlr in https://github.com/adtzlr/felupe/pull/242
- Newton remove fields arg by @adtzlr in https://github.com/adtzlr/felupe/pull/243
- Fix multiple mixed subfields by @adtzlr in https://github.com/adtzlr/felupe/pull/245
- Enhance SolidBodyTensor: Automatic init of statevars by @adtzlr in https://github.com/adtzlr/felupe/pull/247
- Fix verbose of newton by @adtzlr in https://github.com/adtzlr/felupe/pull/249
- Check function residuals norm in newton by @adtzlr in https://github.com/adtzlr/felupe/pull/251
- Fix update of state variables in Newton-Rhapson by @adtzlr in https://github.com/adtzlr/felupe/pull/253
- Add Mesh-tool
mesh.runouts()by @adtzlr in https://github.com/adtzlr/felupe/pull/255 - Add
FieldPlaneStrainby @adtzlr in https://github.com/adtzlr/felupe/pull/257 - Field Integration: Fix field-trimming for plane strain by @adtzlr in https://github.com/adtzlr/felupe/pull/260
- Multiply force vector of gravity by -1 by @adtzlr in https://github.com/adtzlr/felupe/pull/262
- Add PointLoad by @adtzlr in https://github.com/adtzlr/felupe/pull/263
- Rename mask argument to points of point-load by @adtzlr in https://github.com/adtzlr/felupe/pull/266
- Add Step, Job and CharacteristicCurve by @adtzlr in https://github.com/adtzlr/felupe/pull/270
- Add missing import
FieldPlaneStrainby @adtzlr in https://github.com/adtzlr/felupe/pull/272
Full Changelog: https://github.com/adtzlr/felupe/compare/v4.0.0...v5.0.0###
- Python
Published by adtzlr almost 4 years ago
felupe - v4.0.0
Changelog since [3.1.0] - 2022-05-02
Added
- Add
SolidBody.evaluate.kirchhoff_stress()method. Contrary to the Cauchy stress method, this gives correct results in incompressible plane stress. - Add
SolidBodyTensorfor tensor-based material definitions with state variables. - Add
bodiesargument tonewtonrhapson(). - Add a container class for fields,
FieldContainer(renamed fromFieldMixed). - Add
len(field)method forFieldContainer(length = number of fields).
Changed
- Unify handling of
FieldandFieldMixed. - Constitutive models use lists as in- and output (consistency between single- and mixed-formulations).
- Allow field updates directly from 1d sparse-solved vector without splitted by field-offsets.
Fixed
- Fix
tovoigt()helper for data with more or less than two trailing axes and 2D tensors. - Fix errors for
force()andmoment()helpers if the residuals are sparse.
Removed
- Remove wrapper for matADi-materials (not necessary with field containers).
- Remove
IntegralFormMixedandIntegralFormAxisymmetricfrom global namespace.
Auto-Generated Release-Notes
What's Changed
- Fix
tovoigt()helper by @adtzlr in https://github.com/adtzlr/felupe/pull/219 - Add SolidBody kirchhoff stress by @adtzlr in https://github.com/adtzlr/felupe/pull/221
- Add SolidBodyTensor by @adtzlr in https://github.com/adtzlr/felupe/pull/224
- Enhance
newtonrhapson(): Addbodyargument by @adtzlr in https://github.com/adtzlr/felupe/pull/226 - Newton-Rhapson: Remove
bodyand addbodiesargument by @adtzlr in https://github.com/adtzlr/felupe/pull/227 - Unify handling of
FieldandFieldMixedby @adtzlr in https://github.com/adtzlr/felupe/pull/229 - Add field-container length method by @adtzlr in https://github.com/adtzlr/felupe/pull/233
- Docs: Fix tutorial "shear" by @adtzlr in https://github.com/adtzlr/felupe/pull/235
Full Changelog: https://github.com/adtzlr/felupe/compare/v3.1.0...v4.0.0
- Python
Published by adtzlr almost 4 years ago
felupe - v3.1.0
Changelog since [3.0.0] - 2022-04-28
Added
- Add optional parallel (threaded) basis evaluation and add
Form(v, u, parallel=True). - Add
mechanicssubmodule withSolidBodyandSolidBodyPressure.
Fixed
- Fix matADi materials for (mixed) axisymmetric analyses.
- Fix missing radius in axisymmetric integral forms.
Auto-Generated Release-Notes
What's Changed
- Enhance Basis: Parallel evaluation by @adtzlr in https://github.com/adtzlr/felupe/pull/212
- Add
mechanicssubmodule:SolidBodyandSolidBodyPressureby @adtzlr in https://github.com/adtzlr/felupe/pull/216
Full Changelog: https://github.com/adtzlr/felupe/compare/v3.0.0...v3.1.0
- Python
Published by adtzlr about 4 years ago
felupe - v3.0.0
Changelog since [2.0.1] - 2022-01-11
Added
- Add
symargument toBilinearform.integrate()andBilinearform.assemble(). - Add
FieldsMixedwhich creates aFieldMixedof lengthnbased on a template region. - Add function to mirror a Mesh
mesh.mirror(). - Add a new
parallelassembly that uses a threaded version ofnp.einsuminstead (einsumt). - Add parallel versions of math helpers (
dya,cdya,dot,ddot) using einsumt. - Add
parallelkeyword to constitutive models (NeoHooke,LinearElasticTensorNotationandThreeFieldVariation). - Add
RegionBoundaryalong with template regions forQuadandHexahedronandGaussLegendreBoundary. - Add optional normal vector argument for function and gradient methods of
AreaChange. - Add a new Mesh-tool
triangulate(), applicable on Quad and Hexahedron meshes. - Add a new Mesh-method
Mesh.as_meshio(). - Add a function decorator
@Form(...)for linear and bilinear form objects.
Changed
- Enforce consistent arguments for functions inside
mesh(points, cells, cell_dataorMesh). - Rename Numba-
parallelassembly tojit. - Move single element shape functions and their derivatives from
region.htoregion.element.handregion.dhdrtoregion.element.dhdr. - Repeat element shape functions and their derivatives for each cell (as preparation for an upcoming
RegionBoundary). - Improve
mesh.convert()by using the function decorator@mesh_or_data. - Allow an array to be passed as the expansion arguments of
mesh.expand()andmesh.revolve(). - Allow optional keyword args to be passed to
Mesh.save(**kwargs), acts as a wrapper forMesh.as_meshio(**kwargs).write().
Fixed
- Fix area normal vectors of
RegionBoundary. - Fix integration and subsequent assembly of
BilinearFormif field and mesh dimensions are not equal.
Auto-Generated Release-Notes
What's Changed
- Add
symargument toBilinearform.integrate()andBilinearform.assemble()by @adtzlr in https://github.com/adtzlr/felupe/pull/186 - Add
FieldsMixedby @adtzlr in https://github.com/adtzlr/felupe/pull/190 - Update coverage.yml: Add Python 3.10 by @adtzlr in https://github.com/adtzlr/felupe/pull/182
- Rename keyword
paralleltojit, introduce newparallel, improved Mesh-tools by @adtzlr in https://github.com/adtzlr/felupe/pull/195 - Preparations for RegionBoundary by @adtzlr in https://github.com/adtzlr/felupe/pull/196
- Add a region on the boundary faces/edges on a mesh by @adtzlr in https://github.com/adtzlr/felupe/pull/197
- Improve AreaChange by @adtzlr in https://github.com/adtzlr/felupe/pull/198
- Add
axisymmetricargument toFieldsMixedby @adtzlr in https://github.com/adtzlr/felupe/pull/199 - Add Mesh-Tool:
triangulate()by @adtzlr in https://github.com/adtzlr/felupe/pull/202 - Improve Mesh-tool
convert()by @adtzlr in https://github.com/adtzlr/felupe/pull/203 - Improve Mesh by @adtzlr in https://github.com/adtzlr/felupe/pull/204
- Fix dimensions of value-array in assembly of
BilinearFormby @adtzlr in https://github.com/adtzlr/felupe/pull/206 - Add function decorator for weakforms by @adtzlr in https://github.com/adtzlr/felupe/pull/208
- Change Forms How-To by @adtzlr in https://github.com/adtzlr/felupe/pull/209
- Simplify How-To on Forms by @adtzlr in https://github.com/adtzlr/felupe/pull/210
Full Changelog: https://github.com/adtzlr/felupe/compare/v2.0.1...v3.0.0
- Python
Published by adtzlr about 4 years ago
felupe - v2.0.0
Changelog since [1.6.0] - 2021-12-02
Added
- Add a new method to deepcopy a
MeshwithMesh.copy() - Add broadcasting capability for trailing axes inside the parallel form integrators.
- Add
Basison top of a field for virtual fields used in linear and bilinear forms. - Add
LinearFormandBilinearForm(including mixed variants) for vector/matrix assembly out of weak form expressions. - Add
parallelkeyword for threaded integration/assembly ofLinearFormandBilinearForm.
Changed
- Enhance
Boundaryfor the application of prescribed values of any user-definedFieldwhich is part ofFieldMixed. - The whole mixed-field has to be passed to
dof.apply()along with theoffsetsreturned fromdof.partitionfor mixed-field formulations. - Set default value
shape=(1, 1)forhessian()methods of linear elastic materials.
Fixed
- Fixed einstein summation of
math.dot()for two vectors with trailing axes.
Removed
- Remove
dof.extendbecausedof.partitiondoes not need it anymore.
- Python
Published by adtzlr over 4 years ago
felupe - v1.6.0
Changelog since [1.5.0] - 2021-11-29
Added
- Add
LinearElasticPlaneStressandLinearElasticPlaneStrainmaterial formulations. - Add
regionargument forLinearElastic.hessian().
Changed
- Re-formulate
LinearElasticmaterials in terms of the deformation gradient. - Re-formulate
LinearElasticmaterial in matrix notation (Speed-up of ~10 for elasticity matrix compared to previous implementation.) - Move previous
LinearElastictoconstitution.LinearElasticTensorNotation.
- Python
Published by adtzlr over 4 years ago
felupe - v1.5.0
Changelog since [1.4.0] - 2021-11-15
Added
- Add kwargs of
field.extract()tofunandjacofnewtonrhapson.
Changed
- Set default number of
threadsinMatadiMaterialtomultiprocessing.cpu_count(). - Moved documentation to Read the Docs (Sphinx).
Fixed
- Fix
dimin calculation of reaction forces (tools.force) forFieldMixed. - Fix calculation of reaction moments (
tools.moment) forFieldMixed.
- Python
Published by adtzlr over 4 years ago
felupe - v1.4.0
Changelog since [1.3.0]
[1.4.0] - 2021-11-15
Added
- Add
maskargument toBoundaryfor the selection of user-defined points. - Add
shearloadcase. - Add a wrapper for
matadimaterials asMatadiMaterial. - Add
verboseandtimingarguments tonewtonrhapson.
Fixed
- Obtain internal
dimfrom Field in calculation of reaction forcetools.force. - Fix
math.dotfor combinations of rank 1 (vectors), rank 2 (matrices) and rank 4 tensors.
- Python
Published by adtzlr over 4 years ago
felupe - v1.3.0
Changelog since [1.2.0]
[1.3.0] - 2021-11-02
Changed
- Rename
mesh.as_discontinous()tomesh.disconnect(). - Rename
constitution.Mixedtoconstitution.ThreeFieldVariation. - Rename
unstacktooffsetsas return of dof-partition and all subsequent references. - Import tools (
newtonrhapson,project,save) and constitution (NeoHooke,LinearElasticandThreeFieldVariation) to FElupe's namespace. - Change minimal README-example to a high-level code snippet and refer to docs for details.
- Python
Published by adtzlr over 4 years ago
felupe - v1.2.0
Changelog since [1.1.0]
[1.2.0] - 2021-10-31
Added
- Add template regions, i.e. a region with a
Hexahedron()element and a quadrature schemeGaussLegendre(order=1, dim=3)asRegionHexahedron, etc. - Add biaxial and planar loadcases (like uniaxial).
- Add a minimal README-example (Hello FElupe!).
Changed
- Deactivate clamped boundary (
clamped=False) as default option for uniaxial loadingdof.uniaxial
- Python
Published by adtzlr over 4 years ago
felupe - v1.1.0
Changelog since [1.0.1]
[1.1.0] - 2021-10-30
Added
- Add inverse quadrature method
quadrature.inv()for Gauss-Legendre schemes. - Add discontinous representation of a mesh as mesh method
mesh.as_discontinous(). - Add
tools.project()to project (and average) values at quadrature points to mesh points.
Changed
- Removed
quadpydependency and use built-in polynomials ofnumpyfor Gauss-Legendre calculation.
Fixed
- Fix typo in first shear component of
math.tovoigt()function. - Fix wrong stress projection in
tools.topoints()due to different quadrature and cell ordering.
- Python
Published by adtzlr over 4 years ago
felupe - v1.0.1 Fix install with pip if `sparse` is not installed
Changelog
[1.0.1] - 2021-10-19
Fixed
- Fix import of dof-module if
sparseis not installed.
- Python
Published by adtzlr over 4 years ago
felupe - v1.0.0 Code simplifications and faster indices evaluation of Fields
Changelog of [1.0.0] - 2021-10-19
Added
- Start using a Changelog.
- Added docstrings for essential classes, methods and functions.
- Add array with point locations for all elements.
Changed
- Rename element methods (from
basistofunctionand frombasisprimetogradient). - Make constitutive materials more flexible (allow material parameters to be passed at stress and elasticity evaluation
umat.gradient(F, mu=1.0)). - Rename
ndimtodim. - Simplify element base classes.
- Speed-up calculation of indices (rows, cols) for Fields and Forms (about 10x faster now).
- Update
test_element.pyaccording to changes in element methods.
Removed
- Automatic check if the gradient of a region can be calculated based on the dimensions. The
gradargument inregion(grad=False)has to be enforced by the user.
- Python
Published by adtzlr over 4 years ago
felupe - v0.1.1 First BETA release of FElupe
First BETA release of FElupe 🥇
A lot of unused, undocumented or deprecated features have been removed. Test coverage is now > 97%. Docs have been simplified, re-tested and enhanced. The code structure is now easier to understand as all sub-modules are located in subfolders. Constitution has been simplified, Automatic Differentation capability is now outsourced to a separate package matadi.
Have fun 🏖️
- Python
Published by adtzlr over 4 years ago
felupe - v0.0.11 Bugfixes and Improvements
Changelog
Bugfixes:
- fix MINI element by using a non-normalized bubble function r*s*t*(1-r-s-t) [1]. This prevents convergence problems.
Enhancements:
- allow user-defined bubble-multiplier for MINI element
- add point_data and cell_data to save option
- add MultiPointContact (no friction), similar to MultiPointConstraint
- add new three-field (Grad(u), P, F) template for Materials with automatic differentiation using CasADi
- IntegralForm (lineaform): allow arbitrary dimension of fun if grad_v=None (non-parallel only)
- add grad argument to Region (default is True)
- add FieldMixed class for mixed-field problems
- split huge source files into several smaller files
- Python
Published by adtzlr over 4 years ago
felupe - v0.0.10 Enhance IntegralForm classes
Now all IntegralForms have the same arguments.
- Python
Published by adtzlr almost 5 years ago
felupe - v0.0.9 Introduce Automatic Differentation Capability (via casADi)
Introduce Automatic Differentation Capability (via casADi)
felupe.constitution now contains ad.Material, ad.Materialup and ad.MaterialupJ for single-, two- and three-field formulations. Only the strain energy density function has to be defined - stress and elasticity tensors are created by automatic differentiation.
Example usage: Neo-Hookean material model
```python import felupe as fe import casadi as ca
def W(F, mu, bulk): "Strain energy density function for Neo-Hookean material formulation." J = ca.det(F) C = F.T @ F IC = ca.trace(C) return mu / 2 * (IC * J ** (-2 / 3) - 3) + bulk / 2 * (J - 1) ** 2
umat = fe.constitution.ad.Material(W, mu=1.0, bulk=2.0)
P = umat.f(F) A = umat.A(F) ```
- Python
Published by adtzlr almost 5 years ago
felupe - v0.0.7 Initial Axisymmetric features
This release adds initial support for axisymmetric problems with rudimental support for fe.utils.axito3d() conversion. Also, Triangle & Tetrahedral elements are supported (experimental). Lots of small improvements since v0.0.6
- Python
Published by adtzlr almost 5 years ago
felupe - v0.0.5-jaeds Minimal release for JAEDS paper
This is a minimal release of felupe based on v0.0.5 containing two scripts which results are used for further postprocessing in a paper.
- Python
Published by adtzlr about 5 years ago
felupe - v0.0.3 Update Requirements and cleanup of docs
- Python
Published by adtzlr about 5 years ago