Aung

65 Reputation

One Badge

1 years, 281 days

MaplePrimes Activity


These are questions asked by Aung

 hello
 how to get curve fitting parameters right?  is that any stragey to get a good estimate.

restart;

with(Statistics):with(plots):with(Optimization):with(LinearAlgebra):


# given data from strain rate curve
E_0[theta] := 7.883352314*10^9;
alpha[theta]:= 0.982

7883352314.

 

.982

(1)


# experimental creep data under 44 at 100 degree celcius
c_strain := Vector ([<<0>,<0.0284698>,<0.0533808>,<0.0782918>,<0.0996441>,<0.124555>,<0.142349>,<0.156584>,<0.16726>,<0.177936>,<0.181495>,<0.188612>,<0.192171>,<0.19573>,<0.19573>,<0.202847>,<0.206406>,<0.206406>,<0.209964>,<0.209964>,<0.209964>,<0.206406>,<0.209964>>]):

c_time := Vector ([<<0>,<0>,<0.048>,<0.192>,<0.352>,<0.544>,<0.704>,<0.896>,<1.088>,<1.312>,<1.52>,<1.76>,<1.984>,<2.208>,<2.464>,<2.736>,<3.088>,<3.392>,<3.664>,<4.016>,<4.352>,<4.592>,<4.832>>]):
sigma[0] := 44*10^6;
epsilon[0] := sigma[0]/E_0[theta];

44000000

 

0.5581381911e-2

(2)


# change vector to list
c_strain := convert(c_strain,list):
c_time := convert(c_time,list):

# extract zero from list
c_strain := c_strain [2..-1];
c_time := c_time [2..-1];

[0.284698e-1, 0.533808e-1, 0.782918e-1, 0.996441e-1, .124555, .142349, .156584, .16726, .177936, .181495, .188612, .192171, .19573, .19573, .202847, .206406, .206406, .209964, .209964, .209964, .206406, .209964]

 

[0, 0.48e-1, .192, .352, .544, .704, .896, 1.088, 1.312, 1.52, 1.76, 1.984, 2.208, 2.464, 2.736, 3.088, 3.392, 3.664, 4.016, 4.352, 4.592, 4.832]

(3)


# for further calculation need to know how many elements are in the list
M := nops(c_strain);
N := nops(c_time);

22

 

22

(4)


# constitutive equation
creep_strain := proc(t)
local i;
options operator, arrow;
epsilon[0]*(1 + alpha[theta]*add(-(B[i]*(-beta[i]*t + exp(-beta[i] *t) -1))/beta[i],i=1..3))
end proc;

proc (t) local i; options operator, arrow; epsilon[0]*(1+alpha[theta]*add(-B[i]*(-beta[i]*t+exp(-beta[i]*t)-1)/beta[i], i = 1 .. 3)) end proc

(5)


#define objective function

Digits := 9:
obj := add(
         (
           creep_strain(c_time[j])
           -
           c_strain[j]
         )^2
         , j=1..N
       ):


# curve fitting
opt := NLPSolve(obj,
{
  beta[1] >= 0,
    beta[2] >= 0,
    beta[3] >= 0,
    B[1] >= 0, B[1]<= 0.2,
    B[2] >= 0, B[2] <= 0.3,
    B[3] >= 0, B[3] <= 0.4
}
);

[.467521159408790410, [B[1] = HFloat(0.19999999999999996), B[2] = HFloat(0.30000000000000004), B[3] = HFloat(0.4), beta[1] = HFloat(1.2600715880722035e-9), beta[2] = HFloat(5.152129055134073e-9), beta[3] = HFloat(5.057870561183067e-9)]]

(6)

# plot the result
display(
   ScatterPlot(c_time, c_strain, symbol=circle, color=blue),
 
  plot(eval(creep_strain(t), opt[2]), t=0.00..max(c_time), color=black)
)

Download at_44_Mpa_at_100C.mw

restart:

 

inte_eq := int(-(sum(B[i]*beta[i]* exp(-beta[i] * (t-tau)),i=1..n)),tau=0..t);

int(-(sum(B[i]*beta[i]*exp(-beta[i]*(t-tau)), i = 1 .. n)), tau = 0 .. t)

(1)

how to solve this ?

Download creep_integral_sol.mw

can someone help me curve fitting these parameeters...i only got 1 for all of this 90As4.mw

restart

with(Statistics)with(plots)with(Optimization)with(LinearAlgebra)

E[1] := 126*10^9E[2] := 11*10^9G[12] := 6.6*10^9G_0__12 := 10.1*10^9nu[12] := .28E_0__2 := 15.5*10^9

true_strain := [0, .406915, .710106, .989362, 1.28457, 1.53989, 1.86702, 2.21011, 2.625, 2.99202]; true_stress := [0, 46.0227*10^6, 81.8182*10^6, 109.091*10^6, 138.068*10^6, 163.636*10^6, 194.318*10^6, 219.886*10^6, 248.864*10^6, 267.614*10^6]; epsilon_dot := 10^(-4)

sigma_t := map(proc (epsilon) options operator, arrow; E[instantaneous]*(1-lambda[90*deg]*epsilon*(sum(P[i], i = 1 .. 10)-(sum(P[i]*exp(lambda[i]*epsilon/epsilon_dot), i = 1 .. 10)))/epsilon_dot)*epsilon end proc, true_strain)

``

obj := sum((sigma_t[i]-true_stress[i])^2, i = 1 .. 10)

indets(obj, name)

{E[instantaneous], P[1], P[2], P[3], P[4], P[5], P[6], P[7], P[8], P[9], P[10], lambda[1], lambda[2], lambda[3], lambda[4], lambda[5], lambda[6], lambda[7], lambda[8], lambda[9], lambda[10], lambda[90*deg]}

(1)

Optimization[Interactive](obj)

The solution was obtained with the following warning:
  no iterations performed as initial point satisfies first-order conditions

 

[Float(infinity), [E[instantaneous] = HFloat(1.0), P[1] = HFloat(1.0), P[2] = HFloat(1.0), P[3] = HFloat(1.0), P[4] = HFloat(1.0), P[5] = HFloat(1.0), P[6] = HFloat(1.0), P[7] = HFloat(1.0), P[8] = HFloat(1.0), P[9] = HFloat(1.0), P[10] = HFloat(1.0), lambda[1] = HFloat(1.0), lambda[2] = HFloat(1.0), lambda[3] = HFloat(1.0), lambda[4] = HFloat(1.0), lambda[5] = HFloat(1.0), lambda[6] = HFloat(1.0), lambda[7] = HFloat(1.0), lambda[8] = HFloat(1.0), lambda[9] = HFloat(1.0), lambda[10] = HFloat(1.0), lambda[90*deg] = HFloat(1.0)]]

(2)
 

NULL

Download 90As4.mw

using diff command to find  partial dervative of function g give zero in maple...it shouldn't be zero...how to fix itpartial_dervative.mw

restart:

 

sigma_t:= map(epsilon-> E_0[90]*epsilon_dot*((epsilon/epsilon_dot)-(sum(p[i], i = 1 .. 3)*(epsilon/epsilon_dot))+(sum(p[i]*tau[i],i=1..3))-(sum(p[i]*tau[i]*exp(-(epsilon/(epsilon_dot*tau[i]))),i=1..3))),true_strain):

 g:= sum(( sigma[j]-sigma_t[j])^2,j=1..10):

diff(g,p[1]);

0

(1)
 

 

Download partial_dervative.mw

if i want to solve non linear least square problem ..maple optimazation Interactive box show ..many option...but when it comes to least square default....what kind of algothrim does it used....and in maple ..NonLinear fit commad use what kind of algothrim?..Levenberg-Marquardt algorithm?

1 2 3 Page 1 of 3