FEM.Solvers package#

Solvers for Finite Element Method

Submodules#

FEM.Solvers.Lineal module#

Define the structure of a lineal finite element solver

class FEM.Solvers.Lineal.Lineal(FEMObject: Core)#

Bases: Solver

Lineal Finite Element Solver.

run(path: str = '', **kargs)#

Solves the equation system using numpy’s solve function

Parameters:

path (str, optional) – Path where the solution is stored. Defaults to ‘’.

class FEM.Solvers.Lineal.LinealEigen(FEMObject: Core)#

Bases: Lineal

Eigen value solver

Parameters:

FEMObject (Core) – FEM problem

run(path: str = '', k=20, **kargs)#

Solves the smallest k eigenvalues using scipy’s eigen value solver

Parameters:
  • path (str, optional) – Path where the solution is stored. Defaults to ‘’.

  • k (int, optional) – Number of eigenvalues to calculate. Defaults to 20.

class FEM.Solvers.Lineal.LinealSparse(FEMObject: Core)#

Bases: Lineal

Lineal Finite Element Solver using sparse matrix

run(path: str = '', **kargs)#

Solves the equation system using scipy’s spsolve function

Parameters:

path (str, optional) – Path where the solution is stored. Defaults to ‘’.

FEM.Solvers.NoLineal module#

Define the structure of a non lineal finite element solver

class FEM.Solvers.NoLineal.DirectIteration(FEMObject: Core, tol: float = 1e-10, n: int = 50)#

Bases: NonLinealSolver

docstring for DirectIteration

solve(path: str = '', guess=None, _guess=False, **kargs) None#

Solves the equation system using newtons method

class FEM.Solvers.NoLineal.LoadControl(FEMObject, tol: float = 1e-10, n: int = 500, nls=10)#

Bases: DirectIteration

General class for non lineal solvers :param tol: Tolerance for the maximum absolute value for the delta vector :type tol: float :param n: Maximum number of iterations per step :type n: int

run(**kargs) None#

Solves the equation system using newtons method

class FEM.Solvers.NoLineal.Newton(FEMObject: Core, tol: float = 1e-10, n: int = 50)#

Bases: NonLinealSolver

Creates a Newton Raphson iterative solver

Parameters:

FEMObject (Core) – Finite Element Model. The model have to calculate tangent matrix T in the self.elementMatrices() method.

solve(path: str = '', **kargs) None#

Solves the equation system using newtons method

class FEM.Solvers.NoLineal.NonLinealSolver(FEMObject: Core, tol: float, n: int)#

Bases: Solver

General class for non lineal solvers :param tol: Tolerance for the maximum absolute value for the delta vector :type tol: float :param n: Maximum number of iterations per step :type n: int

run(**kargs) None#

Solves the equation system using newtons method

FEM.Solvers.Solver module#

class FEM.Solvers.Solver.Solver(FEMObject: Core)#

Bases: object

Base Finite Element Solver.

run(**kargs)#

Solves the equation system

setSolution(step=-1, elements: bool = False) None#

Sets the solution to the FEM Object.

Parameters:
  • step (int, optional) – Number of solution. Defaults to the last solution found.

  • elements (bool, optional) – To pass the general solution to the domain elements. Defaults to false.

FEM.Solvers.Transient module#

Define the structure of a lineal finite element solver

class FEM.Solvers.Transient.Parabolic(FEMObject: Core)#

Bases: Solver

Lineal Finite Element Solver.

run(t0, tf, steps, dt=None)#

Solves the equation system