pyxfem.solidmechanics.membrane module

Module to test ideas for hyper elastic membrane. For now splitting F in F1@iF0

class pyxfem.solidmechanics.membrane.AssemblerMatrix(OpLeft, OpRight, dofs: NDArray[int64] | slice = slice(None, None, None))[source]

Bases: object

assemble(D)[source]
class pyxfem.solidmechanics.membrane.AssemblerVector(Op, dofs: NDArray[int64] | slice = slice(None, None, None))[source]

Bases: object

assemble(D)[source]

Assemble on the defined dofs

class pyxfem.solidmechanics.membrane.Membrane(law: HyperElasticMaterial, mesh: SMesh)[source]

Bases: object

Class to represent membrane problem in 3d

d2potentiald2F1(F1: NDArray[float64], usenumba=False) → NDArray[float64][source]

return the second derivative of the strain enegy with regard to F1 fo each element (a tangent stifness)

dnormalPerElem(x: NDArray[float64] | None = None, F1: NDArray[float64] | None = None)[source]

return the derivatives of the normal per element as a function of x, the nodals positions

dpotentialdF1(F1: NDArray[float64], usenumba=False) → NDArray[float64][source]

return the first derivative of the strain enegy with regard to F1 fo each element (a stress measure)

getB() → spmatrix[source]

return the sparse matrix B such as B@x return the values of the (FE) local gradient of the vector field x xith regard to the parameters uv of the point in the space of the referent element, for each element

getC(F1: NDArray[float64]) → NDArray[float64][source]

compute the C=FT@F component (2x2) for each element Where F1 contain the gradient with regard to local coordinates of the deformed position dx= F1@du

getF(x: NDArray[float64], algo: Literal[0, 1] = 0) → NDArray[float64][source]

return an array of size nelem, 3, 3 such as F[k].dX = dx where DX is is a tangent vector included in element k in the reference configuration

getGrad(A: NDArray[float64], algo: Literal[0, 1] = 0) → NDArray[float64][source]

return the gradient of the nodal vector field stored in A input A[i,j] coordinate j of field A at node j return G(nelem, 3, 2) matrix, such as : G[ie, j, 0] is the derivative of A in elem ie with regard to reference coordinate u G[ie, j, 1] is the derivative of A in elem ie with regard to reference coordinate v

getN() → spmatrix[source]

return the sparse matrix N such as N@x return the values of the (FE) at gauss point (u,v) = (1/3, 1/3) (Gauss point of the triangle)

getNatVertices() → spmatrix[source]

return the sparse matrix B such as B@x return the values of the (FE) local gradient of the vector field x xith regard to the parameters uv of the point in the space of the referent element, for each element

getd2Cd2F1(F1: NDArray[float64], usenumba=False) → NDArray[float64][source]

return the second derivative of C with regard to F1

getdCdF1(F1: NDArray[float64], usenumba=False) → NDArray[float64][source]

return the derivative of C with regard to F1

internalForce(*, x: NDArray[float64] | None = None, F1: NDArray[float64] | None = None) → NDArray[float64][source]

return the finite element internal force vector

internalStiffness(*, x: NDArray[float64] | None = None, F1: NDArray[float64] | None = None) → csr_array[source]

return the finite element internal stifness as a asparse matrix

normalPerElem(x: NDArray[float64] | None = None, F1: NDArray[float64] | None = None) → NDArray[float64][source]

return the normal to each triangle of the deformed membrane

postProDofVector(U: NDArray[float64], pos: NDArray[float64] | None = None)[source]

return X and U in A 3d array : U[i,j,k] is the displacement in direction k of node j of element i. Usefull for gmsh post-pro

pressureForce(*, p: float, x: NDArray[float64] | None = None, F1: NDArray[float64] | None = None) → NDArray[float64][source]

return the “nodal” pressure force per node, as a function of p and x (or p and F1)

pressureForcePerElem(*, p: float, x: NDArray[float64] | None = None, F1: NDArray[float64] | None = None) → NDArray[float64][source]

return the pressure force per element, as a function of p and x (or p and F1)

pressureStiffness(*, p: float, x: NDArray[float64] | None = None, F1: NDArray[float64] | None = None) → csr_array[source]

return the finite element internal stiffness as a sparse matrix

pressureStiffnessPerElem(*, p: float, x: NDArray[float64] | None = None, F1: NDArray[float64] | None = None) → csr_array[source]

return the derivative of the pressure force per element with reagardto x (the deformed nodal position), as a function of p, x (or p F1)

setAssembler()[source]
setDirichlet(physname2dirichlet: dict)[source]

Compute and return the set of free dofs, fixed dofs and values for fixed dofs

strain_energy(*, x: NDArray[float64] | None = None, F1: NDArray[float64] | None = None) → float64[source]

return the integrates strain energy

surf(x: NDArray[float64]) → float64[source]

return the deformed surface of the membrane

surf0()[source]

return the initial surface of the membrane

pyxfem.solidmechanics.membrane.cylindrical_membrane_under_pressure_load()[source]
class pyxfem.solidmechanics.membrane.membrane_operator_dirichlet(mem: Membrane, free_dofs)[source]

Bases: object

compute_Kext(x, p=1.0)[source]
compute_djacdx_u(x, p, u)[source]

directional derivative of the jacobian in the direction u

compute_equilibrium_jac(x, p)[source]

compute the jacobian : derivative of the residual with regard to x

compute_equilibrium_res(x, p)[source]
compute_fext(x, p=1.0)[source]
position2x(position)[source]
set_start(start_position: NDArray[float64])[source]
x2position(x)[source]
class pyxfem.solidmechanics.membrane.membrane_solver_imposed_displacement(mem, free_dofs)[source]

Bases: membrane_operator_dirichlet

get_fun()[source]
get_jac()[source]
get_linsolver()[source]
solve(start_position, p, *newton_args, **newton_kwargs)[source]
class pyxfem.solidmechanics.membrane.membrane_solver_pressureloading_arclenght(mem, free_dofs)[source]

Bases: membrane_operator_dirichlet

block_x2xp(block_x)[source]
get_fun(a, alpha, scal_equ, scal_arc)[source]
get_jac(alpha, scal_arc, scal_equ)[source]
get_linsolver()[source]
solve(start_position, p0, a=None, delta=None, afac=None, amax=0.1, alpha=None, pred_order=2, *newton_args, **newton_kwargs)[source]
xp2_block_x(x, p)[source]
class pyxfem.solidmechanics.membrane.membrane_solver_pressureloading_newton(mem, free_dofs)[source]

Bases: membrane_operator_dirichlet

get_fun()[source]
get_jac()[source]
get_linsolver()[source]
solve(start_position, p, *newton_args, **newton_kwargs)[source]
pyxfem.solidmechanics.membrane.plot_disp(mem, x, name)[source]