linear_elasticity
linear_elasticity(V, F, U0, dt=0.1, bb=None, bc=None, Ud0=None, fext=None, K=1.75, mu=0.0115, volumes=None, mass=None)
Linear elastic deformation
Compute the deformation of a 2D solid object according to the usual linear elasticity model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
V |
numpy double array
|
Matrix of vertex coordinates |
required |
F |
numpy int array
|
Matrix of triangle indices |
required |
U0 |
numpy double array
|
Matrix of previous displacements |
required |
dt |
double (optional
|
Timestep |
0.1)
|
bb |
numpy int array (optional
|
Fixed vertex indices into V |
None)
|
bc |
numpy double array (optional
|
Fixed vertex displacements |
None)
|
fext |
numpy double array (optional
|
Matrix of external forces (for example, gravity or a load) |
None)
|
Ud0 |
numpy double array (optional
|
Matrix of previous velocity |
None)
|
K |
double (optional
|
Bulk modulus |
1.75)
|
mu |
double (optional
|
Material shear modulus |
0.0115)
|
volumes |
numpy double array (optional
|
Vector with the volumes (in 3D) or areas (in 2D) of each mesh element (if None, will be computed) |
None)
|
mass |
scipy sparse_csr (optional
|
The mesh's sparse mass matrix (if None, will be computed) |
None)
|
Returns:
Name | Type | Description |
---|---|---|
U |
numpy double array
|
Matrix of new displacements |
sigma_v |
numpy double array
|
Vector of per-element Von Mises stresses |
See Also
linear_elasticity_stiffness.
Notes
This implementation only works for 2D triangle meshes. Tetrahedral meshes will be supported soon.
Examples:
from gpytoolbox import regular_square_mesh, linear_elasticity
# Build very small mesh
V, F = regular_square_mesh(3)
V = (V + 1.)/2.
# Initial conditions
fext = 0*V
Ud0 = 0*V
U0 = V.copy()
U0[:,1] = 0.0
U0[:,0] = U0[:,0] - 0.5
# print(np.reshape(U0,(-1,1),order='F'))
dt = 0.2
U, sigma_v = linear_elasticity(V,F,U0,fext=fext,dt=dt,Ud0=Ud0)
Source code in src/gpytoolbox/linear_elasticity.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|