Is it possible to apply mutiple different pressure values on a single surface?
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi, I am using PDE toolbox for static simulation. I have a pressure data csv tabel which comes from pressure distribution sensor, I can only find how to apply Boundary loads on faces, edges, vertices, so how to apply different values on surface.
For example, how to apply nine different pressure value on a square flat plate which is divided into nine pieces?
댓글 수: 1
William Rose
2023년 9월 23일
I would loook at this: https://www.mathworks.com/matlabcentral/fileexchange/34870-deflection-of-a-square-plate-calculated-with-pde-toolbox
It does not directly answer your question, but it gets you going. Good luck.
답변 (1개)
Shivansh
2023년 11월 20일
편집: Shivansh
2023년 11월 20일
Hi Kuan!
I understand that you want to apply different pressure values on different divisions of a surface.
I am attaching steps along with code snippets for the square plate example. You can extend it to modify for your example.
1. Import the pressure data from the CSV table into MATLAB using the “readmatrix” function. Assuming the pressure values are stored in a column vector, you can use the following code:
pressureData = readmatrix('pressure_data.csv');
2. Create a PDE model using the “createpde” function:
model = createpde();
Create a geometry for the square flat “plate”:
geometryFromEdges(model, plate);
3. Divide the square plate into subdivisions using the “generateMesh” function:
subdivisions = 3;
generateMesh(model, 'Hmax', 1/subdivisions);
4. Define the boundary conditions for each subdivision. Assuming the pressure values are stored in the pressureData vector, you can use the following code:
for i = 1:subdivisions
pressure = pressureData(i); % Get the pressure value for the current subdivision
applyBoundaryCondition(model, 'neumann', 'Edge', i, 'g', pressure);
end
5. Solve the PDE using the “solvepde” function:
results = solvepde(model);
You can refer to the following documentations for more information about the following functions:
- readmatrix: https://www.mathworks.com/help/matlab/ref/readmatrix.html
- createpde: https://www.mathworks.com/help/pde/ug/createpde.html
- geometryFromEdges: https://www.mathworks.com/help/pde/ug/pde.pdemodel.geometryfromedges.htmlgenerateMesh.
- applyBoundaryCondition: https://www.mathworks.com/help/pde/ug/pde.pdemodel.applyboundarycondition.html
- solvepde: https://www.mathworks.com/help/pde/ug/pde.pdemodel.solvepde.html
I hope it helps!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Geometry and Mesh에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!