Filter löschen
Filter löschen

Fitting constants of a matrix to experimental data

3 Ansichten (letzte 30 Tage)
Oisín Conway
Oisín Conway am 7 Okt. 2022
Bearbeitet: Oisín Conway am 7 Okt. 2022
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 Kommentare
Torsten
Torsten am 7 Okt. 2022
Bearbeitet: Torsten am 7 Okt. 2022
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 am 7 Okt. 2022
Bearbeitet: Oisín Conway am 7 Okt. 2022
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])

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Gamma Functions finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by