Visualization tool for FElupe
Project description
FEplot
A visualization tool for FElupe.
FEplot is based on the popular visualization library matplotlib
which is used generally to create 2D plots. The fantastic thing that comes with FEplot is that matplotlib
becomes able to plot 3D volume FEA results.
Setup
To run this project, you can easily install it locally using pip:
pip install feplot
All is ready now, let's move on!
How to Use
Starting with a quick example:
import felupe as fem
from feplot.pylab import Plotter
# create a hexahedron-region on a cube
mesh = fem.Cube(n=11)
region = fem.RegionHexahedron(mesh)
# add a field container (with a vector-valued displacement field)
field = fem.FieldContainer([fem.Field(region, dim=3)])
# apply a uniaxial elongation on the cube
boundaries = fem.dof.uniaxial(field, clamped=True)[0]
# define the constitutive material behaviour
# and create a nearly-incompressible (u,p,J - formulation) solid body
umat = fem.NeoHooke(mu=1)
solid = fem.SolidBodyNearlyIncompressible(umat, field, bulk=5000)
# prepare a step with substeps
move = fem.math.linsteps([0, 1], num=10)
step = fem.Step(
items=[solid],
ramp={boundaries["move"]: move},
boundaries=boundaries
)
# add the step to a job, evaluate all substeps
job = fem.Job(steps=[step])
job.evaluate()
# initialize plotter
pl = Plotter()
# plot displacements results (X-Axis)
pl.plot_displacement(field, label='U$_1$', component=0)
# hide grid
pl.hide_grid()
Here are some other features:
# set view to XY-Plane
pl.xy_view()
# add ruler (only for X-Axis)
pl.show_ruler(1, 0, 0)
License
FEplot - A visualization tool for FElupe (C) 2022 Mohamed ZAARAOUI, Tunisia.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file feplot-0.0.8.tar.gz
.
File metadata
- Download URL: feplot-0.0.8.tar.gz
- Upload date:
- Size: 45.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d48b606ecb56ad1f6c372085cf1827198c684b33256f7b08e75a69575f804e3 |
|
MD5 | 3ac437718ba326138a8002676be8f87f |
|
BLAKE2b-256 | 0cfd2d1341c0c1a489a32c8bffba8fc1bcfebcdb2a0304c6b7a98b13c7776ee3 |
File details
Details for the file feplot-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: feplot-0.0.8-py3-none-any.whl
- Upload date:
- Size: 32.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c82bcf1576f477bda8aa33eae6818cfa4b13299f5ad46d407c6d400c81e66aae |
|
MD5 | ad65b845d1c99e6093bcc6b68c2bc0fe |
|
BLAKE2b-256 | 2930e7eafafa35bc656fcf87da8f61f8fee2492c2dbfac5bb52ff20a0819bc0c |