Questions tagged [finite-element-analysis]

Anything related to finite element analysis or finite element methods (FEMs), i.e. a number of advanced numerical analysis techniques for finding approximate solutions of differential equations. FEMs are heavily used in many branches of engineering, for example to simplify the design phase of a project.

The methods transform the differential equation into a weak form over the problem domain, which is then discretized by a set of elements (e.g. a triangle-shaped plate or quadrilateral shells). This allows for a per-element approximation of the solution and an assembly of global quantities by local quadrature rules, resulting in a possibly nonlinear system of equations. For large problem statements, finding a solution might require parallel computing strategies.

Many areas of engineering profit from these techniques, e.g. solid and structural mechanics on various time- and size-scales, electrical field theory or diffusion problems, and there are plenty of (free) software solutions available. In scientific computing, users regularly need to extend the method by custom element formulations or new solution procedures, which is often done in fortran, c++ or python.

See also the Wikipedia page on FEMs.

235 questions
1
vote
1 answer

Quad mesh generation code

I am looking for some sample code (any language) of quadrilateral mesh generation. However, is seems quite a difficult task! I am not picky, I'd like to mesh at least polygons with holes, nothing fancy! So, we're talking about 2D planar shapes…
senseiwa
  • 2,369
  • 3
  • 24
  • 47
1
vote
1 answer

Sparse matrix solver in java using ojAlgo library

I'm currently doing FEM calculations in java on very large square matrices with sizes up to 1M x 1M. These are very sparse though with under 10M entries. I'm using ojAlgo with the SparseStore matrix implementation and I'm really happy with it so…
1
vote
1 answer

Using sfepy to solve a simple 2D differential euqation

I am trying to learn sfepy. To that effect I want to solve the differential equation On a triangle domain (2D). There';s 2 things I don't understand from reading the docs. How do I specify a single triangle mesh? The code seems to assume you…
1
vote
0 answers

1D finite element method in the Hermite basis (P3C1) - Problem of solution calculation

I am currently working on solving the problem $-\alpha u'' + \beta u = f$ with Neumann conditions on the edge, with the finite element method in MATLAB. I managed to set up a code that works for P1 and P2 Lagragne finite elements (i.e: linear and…
1
vote
1 answer

Finite Element Analysis with Gridap.jl; how to define external forces?

I'm following this tutorial in order to try and do an FEA of a model.msh that I have to see how it would deform given different external forces in different places. There they define the weak form as a(u,v) = ∫( ε(v) ⊙ (σ∘ε(u)) )*dΩ l(v) = 0 and…
guin0x
  • 337
  • 2
  • 10
1
vote
0 answers

FEM Integrating Close to Integration Points

I am working on a program that can essentially determine the electrostatic field of some arbitrarily shaped mesh with some surface charge. To test my program I make use of a cube whose left and right faces are oppositely charged. I use a finite…
1
vote
2 answers

How to check if 4 points form a convex quadrilatera

I'm quite new to coding in general. I have found some answers for this question but the answers seem advanced for me. I'm trying to write my own Finite Element Project. For this I would like to write a method that checks if random 4 nodes given as…
plebianguy
  • 11
  • 1
1
vote
1 answer

Can mass and stiffness matrices be extracted from matlab pde toolbox

I am in the process of simulating a model which involves a component that needs to be modeled as a flexible body. I am performing the simulation using Simscape Multi-body. For modeling the flexible body I should be using the principle of finite…
1
vote
0 answers

I get different signs on the Jacobian's determinant for different Gauss integration points in a square 20 node hexa element, can that be correct? MWE

I'm trying to calculate the stiffness- and mass matrix contributions for a 3D case, using 20 node hexahedron elements. I get very strange results though. The Jacobian is all over the place for the different Gauss points (I use 3-by-3-by-3…
Johan
  • 83
  • 5
1
vote
2 answers

How to solve OdbError in Abaqus Python script?

I am running a 3D solid model in Abaqus Python script, which is supposed to be analyzed for 200 times as the model has been arranged in a for loop (for i in range(0,199):). Sometimes, I receive the following error and then the analysis terminates. I…
1
vote
0 answers

Python: replicate Matlab's generateMesh function

I am in the process of converting a codebase from Matlab to Python and noticed that generateMesh gets called on some polygons before carrying out a finite element analysis. What I need to get as an output is a list of all the elements and nodes,…
1
vote
2 answers

How can I set a shorcut key in VS code to run a .bat file in my working directory?

In my research I work with the finite element method, we use the solver from Abaqus which uses subroutines made with Fortran and I use vs code to edit them. So to run my codes I made a batch file that makes this process simpler (to avoid typing many…
1
vote
1 answer

Draw a line in Python with 2 points and 2 angles (it's a deformed beam)

I am trying to draw a line with 2 points and 2 angles corresponding to a deformed line previously straight (see the image below). Both the coordinates of the points and the angles come from functions. I have tried with matplotlib annotations (with…
mmmaria
  • 11
  • 2
1
vote
2 answers

C#, display and navigate structural 3D FEM model (helix-toolkit, SharpDX?)

Hello! I am trying to implement a simple way to display the deformed shape of a beam. I found HelixToolkit that offers perfect tools, but I can't find the way to display different tiles of the same mesh with a different colour, or gradient. I found…
max_s
  • 83
  • 1
  • 8
1
vote
2 answers

Gmsh export to .su2 mesh

I am currently using a python script to build a mesh around an airfoil. However, once the msh is completed and it is time to export from Gmsh to .su2 mesh format one error occurs go wrong. The mesh file that is produced for SU2 the .su2 file has…
Billy Case
  • 27
  • 10