ZAARAOUI999 / feplot

A visualization tool for FElupe.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A visualization tool for FElupe

Generic badge DOI Downloads CodeFactor

FEplot is based on the popular visualization library pyvista 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.

Setup

To run this project, you can easily install it locally using pip:

pip install --upgrade feplot

All is ready now, let's move on!

How to Use

Starting with a quick example:

import felupe as fem
from feplot import Plotter 

mesh = fem.Cube(n=6)
region = fem.RegionHexahedron(mesh)
field = fem.FieldContainer([fem.Field(region, dim=3)])

boundaries, loadcase = fem.dof.uniaxial(field, clamped=True)

umat = fem.OgdenRoxburgh(material=fem.NeoHooke(mu=1), r=3, m=1, beta=0)
solid = fem.SolidBodyNearlyIncompressible(umat, field, bulk=5000)

move = fem.math.linsteps([0, 1, 0, 1, 2, 1], num=5)
step = fem.Step(items=[solid], ramp={boundaries["move"]: move}, boundaries=boundaries)

job = fem.CharacteristicCurve(steps=[step], boundary=boundaries["move"])
job.evaluate(filename="result.xdmf")

p = Plotter()
p.read_xdmf("result.xdmf")
result.mp4

License

FEplot - A visualization tool for FElupe (C) 2023 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/.

About

A visualization tool for FElupe.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%