필터 지우기
필터 지우기

Fitting constants of a matrix to experimental data

조회 수: 3 (최근 30일)
Oisín Conway
Oisín Conway 2022년 10월 7일
편집: Oisín Conway 2022년 10월 7일
Hello, I am dealing with matrices where the initial matrix is [lam1, 0, 0; 0, lam2, 0; 0, 0, lam3]
The function is as follows:
I have experimental data and i would like to fit parameters G, K, k1, k2, gamma, to the data but solve lam2 and lam3 such that sigma_cauchy(2,2) and sigma_cauchy(3,3) are set to zero and just vary lam1. Any ideas how to set this up would be greatly appreciated thank you?
D_1 = 2/K
function sigma_cauchy_fun_nom = sigma_cauchy_fun(G, K, k1, k2, gamma, lam2, lam3, lam1)
F = [lam1, 0, 0; 0 lam2, 0; 0, 0, lam3];
J = det(F); %determinant of deformation gradient
C = transpose(F)*F; %right cauchy green tensor
B = F*transpose(F); %left cauchy green tensor
I_1 = trace(B); %Inveriant
sigma_iso = (G/(J^(5/3))) * (B - ((I_1/3)*I)) + (K*(J-1)*I)
sigma_vol = (2/D_1) * (J - 1) * I;
sigma_iso_vol = sigma_iso + sigma_vol;
m_4 = [cosd(gamma); sind(gamma); 0];
m_6 = [cosd(-gamma); sind(-gamma); 0];
I_4 = transpose(m_4) * C * m_4;
I_6 = transpose(m_6) * C * m_6;
a_4 = F*m_4;
a_6 = F*m_6;
sigma_aniso = (2*k1*(I_4 - 1)*exp(k2*((I_4 - 1)^2))*(a_4*transpose(a_4))) + (2*k1*(I_6 - 1)*exp(k2*((I_6 - 1)^2))*(a_6*transpose(a_6)));
sigma_cauchy = sigma_iso_vol + sigma_aniso;
P11 = J * sigma_cauchy * inv(transpose(F));
P_nom_stress(i) = P11(1,1);
end
  댓글 수: 14
Torsten
Torsten 2022년 10월 7일
편집: Torsten 2022년 10월 7일
The input of fit to "sigma_cauchy_fun" will be a column vector of values for lam1 (which you must supply in the call to fit) and expects a vector of the same size as output (P_nom_stress) .
So your call to "fit" as
f = fit(strain_axial_exp_nom, stress_axial_exp_nom, ft, 'StartPoint', [0 0 0 0 0])
makes no sense - the first argument must be lam1 and the second argument the data vector you want to fit with the function generating the vector "P_nom_stress" (usually a measurement vector).
Oisín Conway
Oisín Conway 2022년 10월 7일
편집: Oisín Conway 2022년 10월 7일
I see, so should it be the following then
lam1 = linspace(1, 1 + 0.6, 1212)
lam1 = transpose(lam1)
f = fit(lam1 - 1, stress_axial_exp_nom, ft, 'StartPoint', [0 0 0 0 0])

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Gamma Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by