how to add a 10000 pa pressure on an stl file

조회 수: 2 (최근 30일)
Marina Ghobrial
Marina Ghobrial 2022년 2월 1일
답변: Cris LaPierre 2022년 2월 1일
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.

답변 (1개)

Cris LaPierre
Cris LaPierre 2022년 2월 1일
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

카테고리

Help CenterFile Exchange에서 STL (STereoLithography)에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by