finite element analysis for continuum mechanics of solid bodies
GPL-3.0 License
Published by adtzlr 10 months ago
NeoHookeCompressible
for compressible hyperelastic materials or even as a fast alternative for NeoHooke
when used in SolidBodyIncompressible
.mesh.expand()
which enhances the performance of quad/hex mesh-generators like Rectangle()
and Cube()
.Job.evaluate(filename="result.xdmf")
and in field.plot("Logarithmic Strain", component=0)
.mesh.expand()
by @adtzlr in https://github.com/adtzlr/felupe/pull/584
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.12.0...v7.13.0
Published by adtzlr 11 months ago
Region
and Scheme
(base class for quadratures).item = FormItem(bilinearform, linearform=None)
to be used as an item in a Step(items=[item])
.Boundary.apply_mask(mask)
. This simplifies re-definitions of boundary conditions with a custom mask
.Boundary(mask)
with mask.shape
of (mesh.npoints, field.dim)
in addition to point-based masks with mask.size
of mesh.npoints
.RegionTriangleMINI(mesh, bubble_multiplier=0.1)
and RegionTetraMINI(mesh, bubble_multiplier=0.1)
.region.reload(mesh, element, quadrature)
to re-evaluate a region, already linked to a field, with a modified mesh or element class or quadrature.assembly.expression
submodule.Basis
to the new assembly.expression
submodule.field
-submodule public.import felupe as fem
in docs and tests.Form(args=(), kwargs={})
to Form(args=None, kwargs=None)
.Boundary(skip=None)
. This will be set to (False, False, False)
during initialization if mask=None
.RegionTriangleMINI
and RegionTetraMINI
from 1.0 to 0.1. This affects only the template regions and not the element formulations TriangleMINI
and TetraMINI
, which still default to a bubble-multiplier of 1.0.math.einsum(**kwargs)
. This enables support for the out
-argument.math.identity()
.quadrature/_base.py
to quadrature/_scheme.py
.Boundary
and subsequently also dof.symmetry()
for different dimensions of the mesh and the field.RegionTriangleMINI
for meshes like Rectangle(n=11).triangulate().add_midpoints_faces()
by scaling down the (arbitrary) bubble-multiplier from 1.0 to 0.1.Basis
to the global namespace (not necessary as it is used only internally by the weak-Form
expression decorator).assembly.expression._linear.LinearForm
and assembly.expression._bilinear.BilinearForm
.https://wheels.vtk.org
as they are now available on PyPI for Python 3.12.Region.plot_scheme()
by @adtzlr in https://github.com/adtzlr/felupe/pull/554
Region.plot()
and quadrature.Scheme.plot()
by @adtzlr in https://github.com/adtzlr/felupe/pull/556
_field
to public field
submodule by @adtzlr in https://github.com/adtzlr/felupe/pull/560
import felupe as fem
by @adtzlr in https://github.com/adtzlr/felupe/pull/565
FormItem(bilinearform, linearform=None)
by @adtzlr in https://github.com/adtzlr/felupe/pull/566
Boundary.apply_mask()
by @adtzlr in https://github.com/adtzlr/felupe/pull/571
Boundary
: Add support for a dof-based mask
by @adtzlr in https://github.com/adtzlr/felupe/pull/573
https://wheels.vtk.org
by @adtzlr in https://github.com/adtzlr/felupe/pull/574
RegionTriangleMINI(bubble_multiplier=0.1)
, also for RegionTetraMINI
by @adtzlr in https://github.com/adtzlr/felupe/pull/576
math.identity() and add optional kwargs in
math.einsum(**kwargs)` by @adtzlr in https://github.com/adtzlr/felupe/pull/579
quadrature/_base.py
to quadrature/_scheme.py
. by @adtzlr in https://github.com/adtzlr/felupe/pull/580
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
Published by adtzlr about 1 year ago
Mesh.add_midpoints_volumes(cell_type=None)
and its variants for edges and faces.element.Element.view()
, element.Element.plot()
and element.Element.screenshot()
. This enables an interactive plot of the element in the reference configuration with its point ids, e.g. Hexahedron().plot().show()
.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 input move
defaults to None
, is deprecated and will be removed in the next major release.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-style move
, axis_compression
, axis_shear
and compression
all default to None
, are deprecated and will be removed in the next major relase.FieldsMixed(region, **kwargs)
.np.product()
(will be removed in NumPy 2.0) with the equivalent np.prod()
.FieldsMixed()
for regions with MINI-element formulations: Disable the disconnection of the dual mesh.dof.shear(sym=True)
which was previously ignored due to a wrong setup of the symmetry boundaries.dof.planar()
because this is a special case of the biaxial load case dof.biaxial(field, clampes=(True, False), moves=(0.2, 0), sym=False, axes=(0, 1))
.FieldsMixed()
for MINI-elements by @adtzlr in https://github.com/adtzlr/felupe/pull/538
dof.shear(sym=True)
by @adtzlr in https://github.com/adtzlr/felupe/pull/540
FieldsMixed(region, **kwargs)
: Merge kwargs
for the dual region by @adtzlr in https://github.com/adtzlr/felupe/pull/541
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.10.0...v7.11.0
Published by adtzlr about 1 year ago
ViewField
as method to a field container FieldContainer.view()
. Now a field container provides the view sub-methods directly, i.e. add FieldContainer.plot()
and FieldContainer.screenshot(filename="mesh.png")
.Mesh.plot()
by default (also affects Mesh.screenshot()
).ViewField(field)
as method to FieldContainer.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
Published by adtzlr about 1 year ago
ViewMesh
as method to a mesh Mesh.view()
. Now a mesh provides the view sub-methods directly, i.e. add Mesh.plot()
and Mesh.screenshot(filename="mesh.png")
.ViewMesh
to Mesh
: 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
Published by adtzlr about 1 year ago
mesh.Triangle(a, b, c, n=2)
for the creation of a quad-meshed triangle.mesh.Circle(n=6)
to the minimum mesh.Circle(n=2)
.dof.uniaxial(axis=0, sym=(False, True, False))
by a user-defined axis and selective symmetries.dof.shear(axis_compression=1, axis_shear=0, sym=True)
by user-defined axes of compression and shear.mesh.Triangle(a, b, c, n)
by @adtzlr in https://github.com/adtzlr/felupe/pull/526
mesh.concatenate()
for a list of length one by @adtzlr in https://github.com/adtzlr/felupe/pull/528
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.7.0...v7.8.0
Published by adtzlr about 1 year ago
mesh.runouts(normalize=False)
.LinearElasticLargeStrain(E=None, nu=None, parallel=False)
, suitable for large-rotation analyses. This is based on NeoHooke()
with converted Lamé-constants.mesh.fill_between(mesh, other_mesh, n=11)
.Circle(radius, centerpoint, n)
for the creation of a quad-meshed circle.mesh.update(cells, cell_type=None)
to mesh.update(points=None, cells=None, cell_type=None)
. Note that this could break old scripts which use mesh.update(new_cells)
instead of mesh.update(cells=new_cells)
.Mesh.copy()
to its base-class and extend it to optionally update the attributes DiscreteGeometry.copy(points=None, cells=None, cell_type=None)
.mesh.runouts(normalize=True)
by @adtzlr in https://github.com/adtzlr/felupe/pull/510
LinearElasticLargeStrain
for linear-elastic materials by @adtzlr in https://github.com/adtzlr/felupe/pull/514
Mesh
: Add optional points-argument by @adtzlr in https://github.com/adtzlr/felupe/pull/521
Mesh.copy()
to DiscreteGeometry.copy()
by @adtzlr in https://github.com/adtzlr/felupe/pull/523
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
Published by adtzlr about 1 year ago
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.6.0...v7.6.1
Published by adtzlr about 1 year ago
View.plot(notebook=False)
by @adtzlr in https://github.com/adtzlr/felupe/pull/507
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.5.1...v7.6.0
Published by adtzlr about 1 year ago
View
by @adtzlr in https://github.com/adtzlr/felupe/pull/505
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.5.0...v7.5.1
Published by adtzlr over 1 year ago
ViewSolid
, which enables view = ViewSolid(field, solid=None)
the view of cauchy stresses, e.g. view.plot("Principal Values of Cauchy Stress").show()
.yeoh()
from constitution.yeoh()
. This makes typing hyperelastic material formulations shorter: Hyperelastic(yeoh, C10=0.5, C20=-0.1, C30=0.02)
.CharacteristicCurve.plot(swapaxes=False)
.MaterialAD
: A user-defined material definition with Automatic Differentiation. Only the first Piola-Kirchhoff stress tensor must be provided.ViewMesh(mesh, point_data=None, cell_data=None)
like already implemented in ViewField
.UserMaterialHyperelastic
(enhance performance).View
: Switch from ViewField
to ViewSolid
.View
: Always plot the undeformed mesh with opacity=0.2
and show_edges=False
.UserMaterial
to Material
, UserMaterialStrain
to MaterialStrain
, UserMaterialHyperelastic
to Hyperelastic
(keep old alias names until next major release).einsum()
for (elementwise operating) trailing axes: q
for quadrature point and c
for cell.IntegralFormMixed
to IntegralForm
, which is now consistent internally and in the top-level namespace. The previous internal base-class for a single-field IntegralForm
is renamed to WeakForm
.CharacteristicCurve.plot(xlabel=None, ylabel=None)
if they are not specified.ViewMesh.plot()
.View.plot(name=None)
.Scene.plot(label=None)
.mooney_rivlin()
, third_order_deformation()
and van_der_waals()
.View
: Add optional point- and cell-data to ViewMesh
by @adtzlr in https://github.com/adtzlr/felupe/pull/475
ViewSolid(field, solid=None)
and set View = ViewSolid
by @adtzlr in https://github.com/adtzlr/felupe/pull/479
View.plot(name=None)
by @adtzlr in https://github.com/adtzlr/felupe/pull/481
UserMaterial...
to shorter names by @adtzlr in https://github.com/adtzlr/felupe/pull/483
einsum()
, Enhance FieldsMixed(n=1)
by @adtzlr in https://github.com/adtzlr/felupe/pull/489
Basis
: Rename idx in einsum()
by @adtzlr in https://github.com/adtzlr/felupe/pull/490
IntegralFormMixed
to IntegralForm
by @adtzlr in https://github.com/adtzlr/felupe/pull/491
Scene.plot(label=None)
by @adtzlr in https://github.com/adtzlr/felupe/pull/495
mooney_rivlin()
, third_order_deformation()
and van_der_waals()
by @adtzlr in https://github.com/adtzlr/felupe/pull/502
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
Published by adtzlr over 1 year ago
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.4.0...v7.4.1
Published by adtzlr over 1 year ago
ViewMesh(mesh)
and rebase View
(internally renamed to ViewField
) on ViewMesh
with additional point- and cell-data.math.linsteps(axis=None, axes=None)
to create optional multi-column arrays, where the steps are inserted at the given axis
.gravity
and density
arguments of SolidBodyGravity(field, gravity=None, density=1.0)
optional.ViewMesh(mesh, cell_type=None)
by @adtzlr in https://github.com/adtzlr/felupe/pull/470
math.linsteps(axis=None, axes=None)
and optional args in SolidBodyGravity(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
Published by adtzlr over 1 year ago
Job.evaluate(verbose=True)
(new optional dependency tqdm
). The legacy detailed output is available with Job.evaluate(verbose=2)
.Job
: Add progress bar by @adtzlr in https://github.com/adtzlr/felupe/pull/467
Job.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
Published by adtzlr over 1 year ago
environment.yml
config file for MyBinder.Job.timetrack
which is updated incrementally on Job.evaluate()
.View(field, point_data=None, cell_data=None)
, a result plotter powered by pyvista
.ViewXdmf(filename, time=0)
, a result plotter powered by pyvista
./src
compliant with flake8.math.dot(mode=(2,2))
and math.ddot(mode=(2,2))
have to be specified by the mode
-argument and are not detected by the shapes of the operands.Job.evaluate(point_data=None, cell_data=None)
from fun(substep)
to fun(field, substep)
.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.math
: Handle arbitrary number of trailing axes by @adtzlr in https://github.com/adtzlr/felupe/pull/451
newtonrhapson()
by @adtzlr in https://github.com/adtzlr/felupe/pull/453
Job
: Add timetrack
attribute by @adtzlr in https://github.com/adtzlr/felupe/pull/455
Result()
for plotting XDMF-files by @adtzlr in https://github.com/adtzlr/felupe/pull/456
Result
by @adtzlr in https://github.com/adtzlr/felupe/pull/458
Result
: Switch to more default args of pyvista
by @adtzlr in https://github.com/adtzlr/felupe/pull/460
Job.evaluate()
: Change point- and cell-data function arguments by @adtzlr in https://github.com/adtzlr/felupe/pull/461
Result.plot(name=None)
: Plot only the undeformed mesh by @adtzlr in https://github.com/adtzlr/felupe/pull/462
Result
to View
by @adtzlr in https://github.com/adtzlr/felupe/pull/463
View
: Add cell_type
-argument by @adtzlr in https://github.com/adtzlr/felupe/pull/464
Full Changelog: https://github.com/adtzlr/felupe/compare/v7.1.0...v7.2.0
Published by adtzlr over 1 year ago
Region
and FieldContainer.
Job.evaluate(parallel=True)
in addition to Job.evaluate(kwargs={"parallel": True})
. If both are given, the key in the dict is overwritten by the user-defined value.mesh.stack(meshes)
for joining meshes with identical points-arrays and cell-types. Contrary to mesh.concatenate(meshes)
, the points are not stacked and no offsets are inserted into the cells-arrays.mesh.translate(move, axis)
for the translation of mesh-points.CharacteristicCurve.plot(**kwargs)
to the figure.CharacteristicCurve.evaluate()
from CharacteristicCurve.plot()
, raise an error if the current job is not evaluated instead.math.linsteps(endpoint=True)
optional.RegionConstantQuad()
and RegionConstantHexahedron()
. Instead, it is required to pass a dual (disconnected) mesh with one point per cell RegionConstantQuad(mesh.dual(points_per_cell=1))
.einsumt
optional again due to issues with JupyterLite.matplotlib
to optional requirements.ModuleNotFoundError
if from einsumt import einsumt
fails (in JupyterLite) and fall back to from numpy import einsum as einsumt
.Region
and FieldContainer
by @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
Job.evaluate(parallel=False)
by @adtzlr in https://github.com/adtzlr/felupe/pull/437
Mesh.dual()
and rebase Mesh.disconnect()
, create dual-meshes in FieldsMixed()
by @adtzlr in https://github.com/adtzlr/felupe/pull/441
mesh.stack(meshes)
and mesh.translate(move, axis)
by @adtzlr in https://github.com/adtzlr/felupe/pull/443
einsumt
is 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
Published by adtzlr over 1 year ago
RegionQuadraticQuadBoundary
and RegionBiQuadraticQuadBoundary
for quadratic quads.RegionQuadraticHexahedronBoundary
and RegionTriQuadraticHexahedronBoundary
for quadratic hexahedrons.mesh.flip(mask=None)
to flip a mirrored or wrong indexed cells array, applied on a given boolean mask
of cells.einsumt
from an optional to a required dependency.MultiPointConstraint
and MultiPointContact
and re-implement both as scipy.sparse.lil_matrix()
.Mesh
to DiscreteGeometry
and rebase new Mesh
on DiscreteGeometry
.Mesh
, i.e. mesh.tools.expand(Rectangle())
is equivalent to Rectangle().expand()
.newtonrhapson(verbose=True)
.tools.project()
for higher-order quad- and hexahedron elements.tools.project()
.np.isscalar()
in mesh.expand(z=1)
and mesh.revolve(phi=180)
where z
or phi
are of type np.int32
.mesh.read()
.jit
-compilation of forms (parallel
is the preferred method).tools.check()
.sparse
.jit
and reduce complexity of newtonrhapson()
by @adtzlr in https://github.com/adtzlr/felupe/pull/408
einsumt
by @adtzlr in https://github.com/adtzlr/felupe/pull/409
MultiPointConstraint
by @adtzlr in https://github.com/adtzlr/felupe/pull/412
TriQuadraticHexahedron().points
and tools.project
by @adtzlr in https://github.com/adtzlr/felupe/pull/419
mesh.expand()
and mesh.revolve()
by @adtzlr in https://github.com/adtzlr/felupe/pull/421
mesh.read()
by @adtzlr in https://github.com/adtzlr/felupe/pull/423
Mesh
: Mesh tools as methods by @adtzlr in https://github.com/adtzlr/felupe/pull/425
MultiPointConstraint
and MultiPointContact
with 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
Published by adtzlr over 1 year ago
FieldsMixed(mesh=None)
.RegionLagrange
.RegionLagrange
.CharacteristicCurve.plot(items=None)
.IntegralForm
: Ensure C-contiguous arrays as fun
-argument.Field
-values with correct size are given.dof.uniaxial(sym=True)
.Job
instead of replacing them, also add Job(point_data_default=True, cell_data_default=True)
.Mesh.update(cells, cell_type=None)
.Mesh.disconnect(points_per_cell=None, calc_points=True)
.Step(items, ramp=None, boundaries=None)
.Field
-values with correct size are given. by @adtzlr in https://github.com/adtzlr/felupe/pull/388
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
FieldsMixed(mesh=None)
by @adtzlr in https://github.com/adtzlr/felupe/pull/396
FieldsMixed()
: Add support for RegionLagrange
(family of Taylor-Hood elements) by @adtzlr in https://github.com/adtzlr/felupe/pull/400
Mesh.disconnect(points_per_cell=None, calc_points=True)
by @adtzlr in https://github.com/adtzlr/felupe/pull/403
Step
: Make arguments ramp
and boundaries
optional by @adtzlr in https://github.com/adtzlr/felupe/pull/405
Full Changelog: https://github.com/adtzlr/felupe/compare/v6.3.0...v6.4.0
Published by adtzlr over 1 year ago
BiQuadraticQuad
element (as a permuted version of ArbitraryOrderLagrangeElement
).Quadratic
element.RegionQuad(mesh, quadrature=GaussLegendre(order=1, dim=2), grad=True)
.FieldsMixed()
.UserMaterialHyperelastic(model, nstatevars=0)
.src/
-layout.element.Element()
.dof.uniaxial(right=None)
.tensortrax>0.6.0
(Van-der-Waals and Viscoelastic models).QuadraticQuad()
and BiQuadraticQuad()
elements by @adtzlr in https://github.com/adtzlr/felupe/pull/371
src/
-layout by @adtzlr in https://github.com/adtzlr/felupe/pull/374
UserMaterialHyperelastic(nstatevars=0)
by @adtzlr in https://github.com/adtzlr/felupe/pull/377
element.Element()
by @adtzlr in https://github.com/adtzlr/felupe/pull/378
mesh.points
by @adtzlr in https://github.com/adtzlr/felupe/pull/381
tensortrax>0.6.0
compatibility by @adtzlr in https://github.com/adtzlr/felupe/pull/382
Full Changelog: https://github.com/adtzlr/felupe/compare/v6.2.5...v6.3.0
Published by adtzlr almost 2 years ago
tensortrax
is not installed.UserMaterialHyperelastic
by @adtzlr in https://github.com/adtzlr/felupe/pull/367
Full Changelog: https://github.com/adtzlr/felupe/compare/v6.2.4...v6.2.5