Skip to main content

Visualization tool for FElupe

Project description

FEplot

A visualization tool for FElupe.

FEplot is based on the popular visualization library matplotlib which is a comprehensive library for creating static, animated, and interactive visualizations in Python. The main aim of this package is to visualize FElupe results (FElupe is a super finite element analysis package).

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()
# add orientation axes
pl.add_axes()

Figure 2022-11-15 145831

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)

Figure 2022-11-15 145945

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

feplot-0.0.9.tar.gz (45.8 kB view details)

Uploaded Source

Built Distribution

feplot-0.0.9-py3-none-any.whl (33.8 kB view details)

Uploaded Python 3

File details

Details for the file feplot-0.0.9.tar.gz.

File metadata

  • Download URL: feplot-0.0.9.tar.gz
  • Upload date:
  • Size: 45.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for feplot-0.0.9.tar.gz
Algorithm Hash digest
SHA256 4d81ac39d7b3478541504f654a861b512d252829f375bab7bc61f0bc3453b964
MD5 d217ca9235ffa8f30272d3586af89b6c
BLAKE2b-256 c5703c187c21e1752584ad53e649dea4cba49ba0abe0bf4024a59292305f2233

See more details on using hashes here.

File details

Details for the file feplot-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: feplot-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 33.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for feplot-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 09d4fab7e4d4ad1e215222c70da48d03e43dfe228c10e5f5d99b32050a6ace04
MD5 1e724b34900fd4a23f0814d59072b847
BLAKE2b-256 09d9d10342fe1ffbbd7d050ab8ea4192357e2f61cb4ee371146b3046fdfc004c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page