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

Press enter stops computing python

I'm doing some engineering analysis with the help of a FEA program and Python. When the analysis ends I need to press a key to continue. But this is not a normal press any key to continue. Every code executed with the scripts stops. Like a handput…
1
vote
1 answer

Rendering a mesh with VTK api

I'm making a simpler viewer to read and visualize a mesh. VTK is new to me and I'm first trying to figure out the best/most efficient way to set up the mesh data for the viewer. I see there are many examples of VTK with c++, but a lot of them are to…
remi
  • 937
  • 3
  • 18
  • 45
1
vote
1 answer

PetSc installation Failed with MacPort can anyone help?

I'm trying to install PetSc with MacPorts. My final goal is to install libMesh on my Mac. When I'm trying to install PetSc its failing during configuration. I need to get PetSc installed before any attempt to install libMesh. Here is the error part…
Raiyan Kabir
  • 1,016
  • 2
  • 11
  • 23
1
vote
1 answer

Car crash simulation

I want to ask you How can I make simulation of car crash ? On the internet I found http://www.gamedev.net/reference/articles/article1459.asp . I think about using finite-element-method, but now I think it is too difficult for me :/ Do you know any…
sim89
  • 11
  • 2
1
vote
2 answers

Calloced memory appears to be NULL

What are the possible cases that can make the following code to execute the if condition in the following snippet? As far as I'm concerned, I can't relate any cause for the if statement to execute. #include #include void…
Ahmed
  • 147
  • 7
1
vote
0 answers

total variation of a pressure field with support on the elements of a complex structure

I am trying to develop a mathematical method to calculate the pressure field on offshore structures. We are given the resultant force on the structure F, and a pressure profile model pi = p0 dot(ni,nF) that our solution should follow.…
1
vote
0 answers

Rayleigh–Ritz method for FEM code

I´m trying to generate a code to model a finite elements analysis based on the following equation, using the Rayleigh Ritz Method. -d/dx(adu/dx)+ c u - q with U(0)=1 and adu/dx=0 i´ve got this far in the code but when it tries to integrate a…
1
vote
1 answer

Warning of NameError for wireType in ABAQUS

I tried to connect points through wires using script. A warning regarding the NameError occurred. the code i tried to run in abaqus: a = mdb.models['Model-1'].rootAssembly v11 = a.instances['r-mesh-2'].vertices v12 =…
open0121
  • 105
  • 2
  • 15
1
vote
0 answers

Finite element c++ implementation

I'm dealing with a code that is really poorly commented, since I need to expand a few functionalities I need to understand what every piece of code does in order to know if my changes will affect it. The code is dealing with 2D mesh generation…
mariob6
  • 469
  • 1
  • 6
  • 16
1
vote
0 answers

Declaring sparse matrix is too slow

I'm currently working on FEM with matlab. my code is like this function [A,rhs] = Assemble() pre_process(); [IA,JA,A,rhs] = assemble(pre_processed_parameters); // mex-func // IA : row index // JA : col index // A : value A =…
Dohyun
  • 642
  • 4
  • 15
1
vote
1 answer

Passing function handle as input for mex for Matlab

I'm recently working on finite element method with MATLAB I tried to optimize my code in MATLAB. While searching, I found that matrix assembling could be accelerated by using mex function. While porting my "PoissonAssembler.m" to mex function, I…
Dohyun
  • 642
  • 4
  • 15
1
vote
3 answers

How to ensure node points in gmsh?

I am trying to build a quite simple mesh. I have a box: box_size = 50; lb = 10.; Point(1) = {-box_size/2, -box_size/2, -box_size/2, lb}; Point(2) = {box_size/2, -box_size/2, -box_size/2, lb}; Point(3) = {box_size/2, box_size/2, -box_size/2,…
Julius
  • 735
  • 2
  • 6
  • 17
1
vote
0 answers

Fenics help: Writing a list of data into Expression for nonlinear part in fenics?

I'm trying to solve a nonlinear problem in fenics. Instead of knowing the nonlinear function as an expression, I only know the values in the form of data. In other words, if i am solving nabla(k(u).nabla(u)) = C, I do not know k(u) or cannot write…
JEL
  • 11
  • 1
1
vote
0 answers

Error estimation indicators for adaptive meshes

I have been trying to set up an adaptive mesh for the finite element method for the laplace equation (and thus AU = F where A is the stiffness matrix) however have been running into some trouble with the error estimates and thus keep ending up with…
James
  • 395
  • 2
  • 8
  • 16
1
vote
1 answer

Regarding use of assempde in the following code

I was trying to understand this code. So, I have noted down my understanding in brief and I'll be thankful if anyone could clarify my doubts. [p,e,t] = initmesh('lshapeg'); This will return a 2D triangular mesh for 'L' shape. However, how can I…
CRG
  • 131
  • 6