Aung

65 Reputation

One Badge

1 years, 281 days

MaplePrimes Activity


These are replies submitted by Aung

@mmcdara 
Sir i got it . thank you for your checkpoint...these help me.

@mmcdara sir i check math and get a little simple function but i have to use this function in order to compatiable previous calculation 
can you check please

 

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](-1+exp(-beta[i]*t)),i=1..3))
end proc;

proc (t) local i; options operator, arrow; epsilon[0]*(1+alpha[theta]*add(B[i](-1+exp(-beta[i]*t)), 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[2] >= 0,
    B[3] >= 0
}
);

Warning, no iterations performed as initial point satisfies first-order conditions

 

[.517167063500154400, [B[1] = HFloat(1.0), B[2] = HFloat(1.0), B[3] = HFloat(1.0), beta[1] = HFloat(1.0), beta[2] = HFloat(1.0), beta[3] = HFloat(1.0)]]

(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

@acer 
thank you sir..it's indeed like this..can you give me a fully programmatic form. i can learn myself for the same problem.
because i have another problem multiply by 1/tau  , not tau ...like this
creep_integral_sol.mw

restart:

 

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

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

(1)
 

 

Download creep_integral_sol.mw

@janhardo 
Sir i want symbolic analytic solution for that integration like in pencil and paper using integration by part or whatever method used..i need fully code to get analytic solution.
this expression is  a part of stress-strain constitutive equation under creep loading....if i get symbolic solution of this integral
i can use curve fitting to my modeling.

actually i miss the tau in the expression so ..it doesn't seem like using integration by part is not valid...here is the right expression
can you check me please.
there is tau in the equation.

restart:

 

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

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

(1)

i try to solve using integration by part manually but it is too long?....can you provide me code for that...

Download creep_integral_sol.mw

@dharr 
i would solve this equation using integration by part manully but it gonna be too long...
can you provide me code for that?

@mmcdara SIr! your guide did help my problem.. i am sorry that i was a little hurry.
.....Here is another problem.. i change model equation  and it give again error....i dont' know what error means

my constraints for parameters are 
E[isnt] is between 13*10^9 and 16*10^9
P[i] and lambda[i] values are positive

i dont' know constraints for lambda[90] 

can you check and help? please.


 

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)

true_strain := true_strain[2..-1];
true_stress := true_stress[2..-1];


N := nops(true_strain);

sigma_t := strain -> E[1]/E[inst]*
(1-lambda[90]*
(1-(epsilon_dot/strain)*
(add((P[i]/lambda[i])*(1-exp(-lambda[i]*strain/epsilon_dot), i=1..N)))))
*strain;

[.406915, .710106, .989362, 1.28457, 1.53989, 1.86702, 2.21011, 2.625, 2.99202]

 

[46022700.00, 81818200.00, 109091000.0, 138068000.0, 163636000.0, 194318000.0, 219886000.0, 248864000.0, 267614000.0]

 

9

 

proc (strain) options operator, arrow; E[1]*(1-lambda[90]*(1-epsilon_dot*add(P[i]*(1-exp(-lambda[i]*strain/epsilon_dot), i = 1 .. N)/lambda[i])/strain))*strain/E[inst] end proc

(1)

Digits := 15:
obj := add(
         (
           sigma_t(true_strain[i])
           -
           true_stress[i]
         )^2
         , i=1..N
       );

opt := NLPSolve(obj, {seq(lambda[j] >= -1, j=1..N), seq(lambda[j] <= 0, j=1..N)} );

(51271290000.0000*(1-lambda[90]*(1-0.245751569738152e-3*P[1]-0.245751569738152e-3/lambda[1]+(-0.245751569738152e-3+0.245751569738152e-3*exp(-4069.150000*lambda[1]), -0.245751569738152e-3*(1 = 1 .. 9))))/E[inst]-46022700.00)^2+(89473356000.0000*(1-lambda[90]*(1-0.140824045987500e-3*P[2]-0.140824045987500e-3/lambda[2]+(-0.140824045987500e-3+0.140824045987500e-3*exp(-7101.060000*lambda[2]), -0.140824045987500e-3*(2 = 1 .. 9))))/E[inst]-81818200.00)^2+(124659612000.000*(1-lambda[90]*(1-0.101075238385950e-3*P[3]-0.101075238385950e-3/lambda[3]+(-0.101075238385950e-3+0.101075238385950e-3*exp(-9893.620000*lambda[3]), -0.101075238385950e-3*(3 = 1 .. 9))))/E[inst]-109091000.0)^2+(161855820000.000*(1-lambda[90]*(1-0.778470616626575e-4*P[4]-0.778470616626575e-4/lambda[4]+(-0.778470616626575e-4+0.778470616626575e-4*exp(-12845.70000*lambda[4]), -0.778470616626575e-4*(4 = 1 .. 9))))/E[inst]-138068000.0)^2+(194026140000.000*(1-lambda[90]*(1-0.649397034853139e-4*P[5]-0.649397034853139e-4/lambda[5]+(-0.649397034853139e-4+0.649397034853139e-4*exp(-15398.90000*lambda[5]), -0.649397034853139e-4*(5 = 1 .. 9))))/E[inst]-163636000.0)^2+(235244520000.000*(1-lambda[90]*(1-0.535612901843580e-4*P[6]-0.535612901843580e-4/lambda[6]+(-0.535612901843580e-4+0.535612901843580e-4*exp(-18670.20000*lambda[6]), -0.535612901843580e-4*(6 = 1 .. 9))))/E[inst]-194318000.0)^2+(278473860000.000*(1-lambda[90]*(1-0.452466166842374e-4*P[7]-0.452466166842374e-4/lambda[7]+(-0.452466166842374e-4+0.452466166842374e-4*exp(-22101.10000*lambda[7]), -0.452466166842374e-4*(7 = 1 .. 9))))/E[inst]-219886000.0)^2+(330750000000.000*(1-lambda[90]*(1-0.380952380952381e-4*P[8]-0.380952380952381e-4/lambda[8]+(-0.380952380952381e-4+0.380952380952381e-4*exp(-26250.000*lambda[8]), -0.380952380952381e-4*(8 = 1 .. 9))))/E[inst]-248864000.0)^2+(376994520000.000*(1-lambda[90]*(1-0.334222364823765e-4*P[9]-0.334222364823765e-4/lambda[9]+(-0.334222364823765e-4+0.334222364823765e-4*exp(-29920.20000*lambda[9]), -0.334222364823765e-4*(9 = 1 .. 9))))/E[inst]-267614000.0)^2

 

Error, (in simpl/reloprod) invalid terms in product: 1 .. 9

 

indets(obj, name)

Error, (in simpl/reloprod) invalid terms in product: 1 .. 9

 

display(
  ScatterPlot(true_strain, true_stress, symbol=circle, color=blue),
  pointplot([[0.001$2]], symbol=circle, color=blue),
  plot(eval(sigma_t(Sigma), opt[2]), Sigma=0.001..max(true_strain), color=red)
)

Error, invalid input: eval received opt[2], which is not valid for its 2nd argument, eqns

 

display(
  ScatterPlot(true_strain, true_stress, symbol=circle, color=blue),
  pointplot([[0.001$2]], symbol=circle, color=blue),
  plot(eval(sigma_t(Sigma), opt[2]), Sigma=0.001..max(true_strain), color=red),
  axis[2]=[mode=log]
)

Error, invalid input: eval received opt[2], which is not valid for its 2nd argument, eqns

 

opt := NLPSolve(
         obj,
         {
           seq(P[j] >= 10, j=1..N),
           seq(lambda[j] >= -1, j=1..N),
           seq(lambda[j] <= 0, j=1..N)
         }
       );

display(
  ScatterPlot(true_strain, true_stress, symbol=circle, color=blue),
  pointplot([[0.001$2]], symbol=circle, color=blue),
  plot(eval(sigma_t(Sigma), opt[2]), Sigma=0.001..max(true_strain), color=red)
)

Error, (in simpl/reloprod) invalid terms in product: 1 .. 9

 

Error, invalid input: eval received opt[2], which is not valid for its 2nd argument, eqns

 

 


 

Download 90As4_mmcdara.mw

@mmcdara 
Sir....it not give symbolically answer....it should need to define n terms...
is there any way can i get general answer...i don't want to define n  at this step..here is my mfile..
it is ok no matter what ...i just want the symbolic final answer...may be my calculation process is not right...so it give back with integration term


 

restart:

with(IntegrationTools):

``


eq1 := int(sum(A[i]*lambda[i]*exp(-lambda[i]*(t - tau)), i = 1 .. n)*tau, tau = 0 .. t);

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

(1)

eq2 := IntegrationTools:-Expand(eq1);

int((sum(A[i]*lambda[i]*exp(lambda[i]*tau)/exp(lambda[i]*t), i = 1 .. n))*tau, tau = 0 .. t)

(2)

eq2 := subsindets(eq2, specfunc({specfunc(sum),name=range},int),
                   u->Sum(Int(op([1,1],u),op(2,u)),op([1,2],u)));

int((sum(A[i]*lambda[i]*exp(lambda[i]*tau)/exp(lambda[i]*t), i = 1 .. n))*tau, tau = 0 .. t)

(3)

simplify(eq2);

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

(4)

value(%);

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

(5)

simplify(combine(%));

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

(6)

 

NULL

NULL

NULL


 

Download solution_of_integral.mw

@mmcdara 
sir...i still make a mistake....i think..model...
here is my integration....
i try normally it gives zero...but i try watching from maple Help 
it can't solve...please check this and then i can recaculate the model 

 

restart:

with(IntegrationTools):

``


eq1 := int(sum(A[i]*lambda[i]*exp(-lambda[i]*(t - tau)), i = 1 .. n)*tau, tau = 0 .. t);

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

(1)

eq2 := IntegrationTools:-Expand(eq1);

int((sum(A[i]*lambda[i]*exp(lambda[i]*tau)/exp(lambda[i]*t), i = 1 .. n))*tau, tau = 0 .. t)

(2)

eq2 := subsindets(eq2, specfunc({specfunc(sum),name=range},int),
                   u->Sum(Int(op([1,1],u),op(2,u)),op([1,2],u)));

int((sum(A[i]*lambda[i]*exp(lambda[i]*tau)/exp(lambda[i]*t), i = 1 .. n))*tau, tau = 0 .. t)

(3)

simplify(eq2);

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

(4)

value(%);

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

(5)

simplify(combine(%));

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

(6)

 

NULL

NULL

NULL


 

Download solution_of_integral.mw
it is only integration part....

@mmcdara Yes sir ..it is an indeed viscoelastic problem. thank you i have experimental data and i'm gonna try like the guidelines you described. actually..i already fit the data using NonLinearFit command but i'm a little bit not faimliar with numberical calculation or optimization problem behind the sense..so i try to get this..thank u Sir.

@acer Sir, i have the same solution to this..this is right...but can you use a little simpler command..i mean i don't understand behind the idea of this line
temp := subsindets(temp, specfunc({specfunc(sum),name=range},int),
                   u->Sum(Int(op([1,1],u),op(2,u)),op([1,2],u)));

@Preben Alsholm Sir ..what you mean is that ..it can be used directly in the model and without changing to standard function we can get the values of k from curve fitting?..right?

@Preben Alsholm thank u Sir
i just want k as symbolic parameters..is there any other way k is as symbolic k?

@dharr thank u Sir.

 i don't know k , k is a material constant and i actually think k can be get from curve fitting .(may be i'm wrong)...and can we get standard functinos ..with k symbolic...

@Scot Gould Sir.... actually...the equation is like this......this is the governing equation for damage accumulation model of composite under fatigue loading...i consider with sinusodial loading case
  i have some derivation...dD/dt = some function and....finally we get   

D(t) = 1-(1-C(1+k) integral 0 to N (sigma_a * sin(omega*t))^k dt........

if i can get closed form solution..i can plot damage accumlation vs number of load cylce ...
and and loading parttern is a choice .. ....i can get closed form with different type of loading history..for eaxmple ( constant trapezodial pattern)..but sinusoidal loading are actually easy and cheap to set up  experiment and ...the problem is i don't get closed form solution for integral term.

1 2 3 Page 1 of 3