What I mean is I am running the following example:
openExample('pde/StressConcentrationInPlateWithCircularHoleExample')
I'll keep it simple: can someone explain how I extract the XY Data?
I am trying to write a function that will receive an XY position to test, and return the relevant values at that position in the solution plot, such as for Von Mises stress at that XY position. However the model doesn't seem to have a readily available vector or matrix of corresponding XY values, and 'XYdata' looks like a special call to model, so not necessarily stored in the format useful to what I am doing.
"At [4.6783, 10.4534], what is the stress in the X-direction?" etc.

 채택된 답변

Ravi Kumar
Ravi Kumar 2021년 5월 11일

2 개 추천

You can use interpolateStress to find values of stress at a given query coordinates (xq,yq,zq),.
Regards,
Ravi

댓글 수: 1

Ah! Yes, I think this is the type of function I was fearful I was going to have to engineer myself. Thank you so much.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2021년 5월 11일

0 개 추천

After the call to
geometryFromEdges(model,g);
then
model.Geometry.Vertices
will give you the initial geometric coordinates as an 8 x 2 array.
After the call to
generateMesh(model,'Hmax',radius/6);
then
model.Mesh.Nodes
will be a 2 x 16048 array of coordinates, and
model.Mesh.Elements
will be a 6 x 7856 array of integers, minimum value 1 and maximum value 16048 -- so we can tell that those are indices into the model.Mesh.Nodes array.

댓글 수: 3

What I'm looking to do is query "what is the stress etc. at [199.9, -49.7] etc."
Node n1 is at 200, -50
Node n5761 is at 200, -48.3 (approx)
Node n5557 is at 198.3, -48.8 (approx)
The three make up 1 element/face with a stress/value gradient on it. It is not accurate enough to approximate to the closest node, or edge, or take the average of the element, and the elements are not made up of node numbers in sequence.
Ah, but what you asked for is to extract the XY Data. Ravi's solution is what you probably really want.
To be fair, I'm probably confused about what I really want :D

댓글을 달려면 로그인하십시오.

질문:

2021년 5월 11일

댓글:

2021년 5월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by