how to add a 10000 pa pressure on an stl file

2 views (last 30 days)
Hey,
I found this code online and I was wondering how would it change to show a 10000 Pa pressure on it. I wanted to create a finite element method but I keep getting the following error:
Warning: Error creating or updating Patch
Error in value of property FaceVertexCData
Number of colors must equal number of vertices
%code
model = createpde;
importGeometry(model,'cube.stl');
pdegplot(model,'FaceLabel','off', 'FaceAlpha',0)
p1= 10000
Rs = solve(smodel);
pdeplot3D(smodel, 'ColorMapData', Rs.VonMisesStress,'Deformation', Rs.Displacement, 'DeformationScaleFactor' )
I wanted to be something like the attached image but for this problem but all is printed is the STL file.

Answers (1)

Cris LaPierre
Cris LaPierre on 1 Feb 2022
Take a look at some of the examples here. I would think the simplest one that is somewhat similar is the Defelection Analysis of Bracket.
I'm no expert here, but I think you need to specify model using createpde('structural','static-solid')
You then likely need to
  • define your material properties
  • Set your boundary conditions
  • specify where the load is applied
  • create your FEA mesh
  • then solve

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!