problem with integrand and quad2d
Show older comments
I had struggled with the double integral problem last month. Then I posted my question to mathworks and got very useful answer from Mr.Mike Hosea.
Up to now I have solved my problems with using integer inputs for "ne" and "me".
When I use decimal numbers (for example: 0.1 or 1.3) as an input for "ne", I get consistent outputs as well.
However, when I use decimal numbers as an input for "me", the output becomes complex, even though I use splitting integral.
Here is my code.
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 = .2;
integrand = @(zeta,eta)f(eta,me,ne,zeta);
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)
I would appreciate some help, idea, thought...
Ozan
Accepted Answer
More Answers (1)
Ozan
on 3 May 2012
0 votes
Categories
Find more on Common Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!