How to implement numerical solvers

Sorry! It turned out I just needed to focus on it more myself, a little too niche! Thank you all for the help.

댓글 수: 7

John D'Errico
John D'Errico 2022년 1월 29일
Confusing. I assume from the notation, this probably lives in some engineering context, but that is not clear.
Regardless, you don't say what the equation has to do with the plot, which is seemingly unrelated, as that equation is not directly going to generate that plot or anything like it. You do not indicate what you want to optimize, or what form of data you are trying to fit.
If you want help, then you need to make it possible to get help. And that means asking a clear question.
Kevin Hanekom
Kevin Hanekom 2022년 1월 29일
Thank you for your input, I did not want to make my question too dense. But I agree, I will change the question to make it more clear right now.
Star Strider
Star Strider 2022년 1월 29일
What are the σ values ( to )?
Are they constants or do they change between (or within) the function calls? If they change, how are they calculated? Are they matrix elements?
Kevin Hanekom
Kevin Hanekom 2022년 1월 29일
Please let me know if the changes I just finished making provided sufficent information. I am sorry for the confusion.
Kevin Hanekom
Kevin Hanekom 2022년 1월 29일
@Star Strider, Yes they do change within the function walls, sorry for not clarifying that. So a seperate function will be running at a selected ZZ and psi, continously iterating, and increasing "max" (the test value) untill the first refrenced equation has been satisfied, dectiating that whatever is being sampled has reached its yielding value. So that SS matrix embeded in the function will be different for every orientation, depending on the maximum stress a selected material can endure before yielding.
Kevin Hanekom
Kevin Hanekom 2022년 1월 29일
Thats anouther source of the confussion I am having when trying to optimize my parameter values, becuase the "max" value is different for every oriention. One way I may be able to solve this is to average the maximum stress, to make that highest stress value you see equal to 1, and then use the same "max" value to show the differing stress per orientation.
Image Analyst
Image Analyst 2022년 4월 19일
@Kevin Hanekom, so did Star's answer below solve it???

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

답변 (1개)

Star Strider
Star Strider 2022년 1월 29일

0 개 추천

The function needs to be changed so that it accepts one vector of parameters (‘b’ here) and produces a scalar value for ‘S’. Just now, it does not, and returns ‘S’ as a matrix:
b = rand(3,1)
b = 3×1
0.4067 0.4213 0.0238
[S] = YieldCriteriaOptimization(b)
S = 3×3
0.0238 -0.0002 0.0002 -0.0002 0.0000 -0.0000 0.0002 -0.0000 0.0000
function [S] = YieldCriteriaOptimization(b)
ZZ = b(1);
psi = b(2);
max = b(3);
Ry = [ cosd(ZZ) 0 sind(ZZ) ; 0 1 0; -sind(ZZ) 0 cosd(ZZ)];
Rz = [cosd(psi) -sind(psi) 0 ; sind(psi) cosd(psi) 0; 0 0 1];
R = Ry*Rz;
SigmaPrime = [[max 0 0];[0 0 0];[0 0 0];]; %unidirectional test applied in x'
S = R\SigmaPrime*R;
end
I have no idea what ‘S’ represents, so I have no idea how to transform it into a scalar. One option might be the calculate its determinant with the det function or its norm with norm, however I have no idea if either of those are even close to being appropriate.
It just somehow magickally needs to be come a scalar.
.

카테고리

도움말 센터File Exchange에서 Surrogate Optimization에 대해 자세히 알아보기

제품

릴리스

R2021a

질문:

2022년 1월 29일

댓글:

2022년 4월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by