I use the PDE Toolbox to analysis a discrete geometry, and I want to put the force vector on a point. But I can't define a point through the syntax "loadedVertex". Is there any other option to define the point? thank you!

 採用された回答

Ravi Kumar
Ravi Kumar 2019 年 12 月 10 日

0 投票

The function addVertex was introduced in R2019b. You might be running an older version of the MATLAB to get this error.
Regards,
Ravi

1 件のコメント

haoran liu
haoran liu 2019 年 12 月 12 日
Thankk you! But when I use the R2019b, I got another error. I can get the VertexID, But I can't put the force on the points.
2019-12-11 212920.jpg

サインインしてコメントする。

その他の回答 (2 件)

Ravi Kumar
Ravi Kumar 2019 年 12 月 12 日

0 投票

OK, in that case can you number the number of verteices in the model:
>> gm
Do you see the new VertexID in the plot you make?
Regards,
Ravi

1 件のコメント

xl z
xl z 2024 年 6 月 12 日
Addvertex can not add points on cylindrical surface. Is there a solution to this situation? Thank.

サインインしてコメントする。

haoran liu
haoran liu 2019 年 12 月 13 日
編集済み: haoran liu 2019 年 12 月 13 日

0 投票

Thank you for your answer. Yes, I can see the new VertexID in my model. But I can't solve it with force.
Regards,
haoran

6 件のコメント

Ravi Kumar
Ravi Kumar 2019 年 12 月 13 日
Can you share a simplified reproduction code that we can run and see what is going on?
Regards,
Ravi
haoran liu
haoran liu 2019 年 12 月 13 日
%%
clear
clc
%%
model = createpde('structural','static-solid');
%% import geometry
gm = importGeometry(model,'sta_simplified_400um.stl');
pdegplot(gm, 'VertexLabels', 'on','FaceAlpha', 0.5)
view(30, 30);
title('KGT STA - Faces')
drawnow
%% mesh
hMax = 1.8; % [mm]
hMin = 0.8; % [mm]
tic
mesh = generateMesh(model, 'Hmax', hMax, 'Hmin', hMin);
elapsedTimeMesh = toc;
numOfElems = length(model.Mesh.Elements);
numOfNodes = length(model.Mesh.Nodes);
numOfRacewayNodes = length(findNodes(model.Mesh, 'region', 'Face', 6));
q = meshQuality(model.Mesh);
elemIDs = find(q < 0.3);
pdemesh(model.Mesh,'FaceAlpha',1)
hold on
pdemesh(model.Mesh.Nodes, model.Mesh.Elements(:, elemIDs), 'FaceColor', 'blue', 'EdgeColor', 'blue')
drawnow
%% Material Props
structuralProperties(model, 'Cell', 1, 'YoungsModulus', 200e9, 'PoissonsRatio', 0.3);
%% Boundary Conditions BC
structuralBC(model, 'Face', 15, 'Constraint', 'fixed');
structuralBC(model, 'Face', 2, 'Constraint', 'fixed');
%% load condition
VertexID = addVertex(gm,'Coordinates',[26.253327790164672,9.003630213068949,6.587610172703529]);
%%
pdegplot(gm, 'VertexLabels', 'on','FaceAlpha', 0.5)
view(30, 30);
title('KGT STA - Faces')
drawnow
%%
structuralBoundaryLoad(model,'Vertex',VertexID, 'Force', [10;10;10]);
%% solver
tic
try
result = solve(model);
elapsedTimeSolver = toc;
disp(['Solver finished in ' num2str(elapsedTimeSolver) ' [s]'])
catch e
elapsedTimeSolver = -1;
disp(['Solver terminated with error "' e.message '", elapsed time: ' num2str(toc) ' [s]'])
return;
end
Thank you! The model is in the attachment.
Ravi Kumar
Ravi Kumar 2019 年 12 月 13 日
I used the STL in the attachment, sta_simplified_punkt.stl (replace sta_simplified_400um.stl in the reproc code above with sta_simplified_punkt.stl.)
I get the error
Error using pde.DiscreteGeometry/addVertex
Specified point too far from the boundaries.
Error in repro (line 33)
VertexID = addVertex(gm,'Coordinates',[26.253327790164672,9.003630213068949,6.587610172703529]);
This means point is not on the geometric boundary.
Regards,
Ravi
haoran liu
haoran liu 2019 年 12 月 13 日
Sorry, I have given a false model. The correct model is in the attachment now.
Ravi Kumar
Ravi Kumar 2019 年 12 月 13 日
Thank. Now I see the issue. You generated mesh before adding vertex. Do all geometry operation before generating mesh. If you move the addVertex to right below importGeometry, you should not get this error.
Regards,
Ravi
haoran liu
haoran liu 2019 年 12 月 14 日
Thank you! It works
Regards,
haoran

サインインしてコメントする。

カテゴリ

質問済み:

2019 年 12 月 10 日

コメント済み:

2024 年 6 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by