problem with double integral, dblquad and quad2d

4 Ansichten (letzte 30 Tage)
Ozan
Ozan am 25 Mär. 2012
Hi, I have been struggling to solve an double integral problem for the last couple of weeks. I have read wide variety of questions and answers, I have tried everything I know (int, dblqad, quad2d); however no result I got. The simplfied version of my code is below. After I find the way for below problem I believe I can handle the rest.
syms epsilon eta zeta;
ne=1; me=1; K1=76*10^9; K2=150*10^9; G1=26*10^9; G2=78*10^9;
Vs=(((zeta/2)+(1/2))^ne)*((eta/2)^me);
f1=(G1.*(9.*K1+8.*G1))/(6.*(K1+2*G1));
Gasil=G1+(Vs.*(G2-G1))./(1+(1-Vs).*((G2-G1)./(G1+f1)));
Kasil=K1+(Vs.*(K2-K1))./(1+(1-Vs).*((3.*(K2-K1))./(3.*K1+4.*G1)));
Easil=(9.*Kasil.*Gasil)./(3.*Kasil+Gasil);
K11(dongu1)=(int(int(Easil,eta,-1,1),zeta,-1,1))
It is worth to note that "ne" and "me" are not constant values. I will change them between 0 and 100 to see the effect of "ne" and "me" to K11.
I would really appreciate some help, idea, thought...
Ozan

Akzeptierte Antwort

Mike Hosea
Mike Hosea am 26 Mär. 2012
syms ne me epsilon eta zeta;
K1=76*10^9; K2=150*10^9; G1=26*10^9; G2=78*10^9;
Vs=(((zeta/2)+(1/2))^ne)*((eta/2)^me);
f1=(G1.*(9.*K1+8.*G1))/(6.*(K1+2*G1));
Gasil=G1+(Vs.*(G2-G1))./(1+(1-Vs).*((G2-G1)./(G1+f1)));
Kasil=K1+(Vs.*(K2-K1))./(1+(1-Vs).*((3.*(K2-K1))./(3.*K1+4.*G1)));
Easil=(9.*Kasil.*Gasil)./(3.*Kasil+Gasil);
f = matlabFunction(Easil)
ne = 3;
me = 4;
integrand = @(zeta,eta)f(eta,me,ne,zeta);
% Splitting the integral may not be necessary if ne and me are always
% integers, but it does tend to be necessary otherwise, when the output is
% complex.
Q = quad2d(integrand,-1,0,-1,0) + ...
quad2d(integrand,-1,0,0,1) + ...
quad2d(integrand,0,1,-1,0) + ...
quad2d(integrand,0,1,0,1)

Weitere Antworten (2)

bym
bym am 25 Mär. 2012
Use the matlabFunction() to change the symbolic equation to something dblquad can evaluate:
f = matlabFunction(Easil)
f =
@(eta,zeta)-(((26000000000.*eta.*(zeta./2+1./2))./((192.*eta.*(zeta./2+1./2))./415-799./415)-26000000000).*((333000000000.*eta.*(zeta./2+1./2))./((111.*eta.*(zeta./2+1./2))./332-277./166)-684000000000))./((111000000000.*eta.*(zeta./2+1./2))./((111.*eta.*(zeta./2+1./2))./332-277./166)+(26000000000.*eta.*(zeta./2+1./2))./((192.*eta.*(zeta./2+1./2))./415-799./415)-254000000000)
>> dblquad(f,-1,1,-1,1)
ans =
2.8366e+011

Ozan
Ozan am 27 Mär. 2012
Your answers are realy appreciated. I will try to carry out this method for rest of my code. Thank you so much for your interest.

Kategorien

Mehr zu Mathematics 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