deflection analysis of bracket -凯发k8网页登录
this example shows how to analyze a 3-d mechanical part under an applied load using finite element analysis (fea) and determine the maximal deflection.
create structural analysis model
the first step in solving a linear elasticity problem is to create a structural analysis model. this model is a container that holds the geometry, structural material properties, damping parameters, body loads, boundary loads, boundary constraints, superelement interfaces, initial displacement and velocity, and mesh.
model = createpde("structural","static-solid");
import geometry
import an stl file of a simple bracket model using the importgeometry
function. this function reconstructs the faces, edges, and vertices of the model. it can merge some faces and edges, so the numbers can differ from those of the parent cad model.
importgeometry(model,"bracketwithhole.stl");
plot the geometry, displaying face labels.
figure pdegplot(model,"facelabels","on") view(30,30); title("bracket with face labels")
figure pdegplot(model,"facelabels","on") view(-134,-32) title("bracket with face labels, rear view")
specify structural properties of material
specify young's modulus and poisson's ratio of the material.
structuralproperties(model,"youngsmodulus",200e9, ... "poissonsratio",0.3);
apply boundary conditions and loads
the problem has two boundary conditions: the back face (face 4) is fixed, and the front face (face 8) has an applied load. all other boundary conditions, by default, are free boundaries.
structuralbc(model,"face",4,"constraint","fixed");
apply a distributed load in the negative -direction to the front face.
structuralboundaryload(model,"face",8,"surfacetraction",[0;0;-1e4]);
generate mesh
generate and plot a mesh.
generatemesh(model);
figure
pdeplot3d(model)
title("mesh with quadratic tetrahedral elements");
calculate solution
use the solve
function to calculate the solution.
result = solve(model)
result = staticstructuralresults with properties: displacement: [1x1 festruct] strain: [1x1 festruct] stress: [1x1 festruct] vonmisesstress: [5993x1 double] mesh: [1x1 femesh]
examine solution
find the maximal deflection of the bracket in the -direction.
minuz = min(result.displacement.uz);
fprintf("maximal deflection in the z-direction is %g meters.", minuz)
maximal deflection in the z-direction is -4.43075e-05 meters.
plot results using visualize pde results live editor task
visualize the displacement components and the von mises stress by using the visualize pde results live editor task. the maximal deflections are in the -direction. because the bracket and the load are symmetric, the x-displacement and z-displacement are symmetric, and the y-displacement is antisymmetric with respect to the center line.
first, create a new live script by clicking the new live script button in the file section on the home tab.
on the live editor tab, select task > visualize pde results. this action inserts the task into your script.
to plot the z-displacement, follow these steps. to plot the x- and y-displacements, follow the same steps, but set component to x and y, respectively.
in the select results section of the task, select
result
from the drop-down list.in the specify data parameters section of the task, set type to displacement and component to z.
in the specify visualization parameters section of the task, clear the deformation check box.
here, the blue color represents the lowest displacement value, and the red color represents the highest displacement value. the bracket load causes face 8 to dip down, so the maximum z-displacement appears blue.
to plot the von mises stress, in the specify data parameters section of the task, set type to stress and component to von mises.
plot results at the command line
you also can plot the results, such as the displacement components and the von mises stress, at the matlab® command line by using the pdeplot3d
function.
figure pdeplot3d(model,"colormapdata",result.displacement.ux) title("x-displacement") colormap("jet")
figure pdeplot3d(model,"colormapdata",result.displacement.uy) title("y-displacement") colormap("jet")
figure pdeplot3d(model,"colormapdata",result.displacement.uz) title("z-displacement") colormap("jet")
figure pdeplot3d(model,"colormapdata",result.vonmisesstress) title("von mises stress") colormap("jet")