b = 2*23.5;
nu = 0.3;
Ee = 10^5;
h = 4.5;
z = x + y*I;
G = Ee/(2*(1 + nu));
Zline = (Ee*2*h)/(2*Pi*(1 - nu^2))*ArcSinh[Sqrt[z/b]];
Z = (Ee*2*h)/(2*Pi*(1 - nu^2))*1/Sqrt[z (z + b)];
u = ((1 - 2 nu)*Re[Zline] - y*Im[Z])/(2 G);
v = (2*(1 - nu)*Im[Zline] - y*Re[Z])/(2 G);
Final = D[v, x] - D[u, y]
Plot3D[Final, {x, -b, -b/10}, {y, b/10, b}, AxesLabel -> Automatic]
Plot3D[u, {x, -b, 0}, {y, 0, b}, AxesLabel -> Automatic]
Plot3D[v, {x, -b, 0}, {y, 0, b}, AxesLabel -> Automatic]
As you see, there are complex function Zline and Z. I use real and imaginary parts of these function in “u” and “v”. Then I would like to calculate the derivative and plot it. Unfortunately, it doesn’t work. Please, any suggestions?
And the second problem, when I plot “u” there is a point of discontinuity. According to the problem (this is a displacement field), there should not be such points.
Problem1. If you take a look at your equations, you can see “Im" and "Re”. You are accidentally trying to differentiate these (which you can’t really do). It’s important to look back and see which part of your code behaves unexpectedly.
The problem is that Re[Zline] doesn’t evaluate the way you think it does. It returns:
157406. Re[ArcSinh[0.145865 Sqrt[x + I y]]]
Mathematica doesn’t know what x and y are Real values unless you tell it. One way of doing this is to use the ComplexExpand function.
Problem 2. You cannot plot “Final”. It is a complex valued function. Maybe you didn’t instead it to be? If so, then there’s something wrong with your calculations. In some cases, there are very small imaginary components caused by floating point error. These can be removed with the Chop function as shown:
About problem 1. Thank you for your explanations. If I understand correctly there is a problem also with other Re and Im parts. For example, Im[Z] gives:
qout = ((z (-2 f^2 - 2 f z + L z))/f^2 + (
I ? wd^2 (-1 + ((-2 f + L) z)/f^2))/?)/(-1 + ((-2 f + L) z)/f^2 + (
I (-2 f + L) ? wd^2)/(f^2 ?))
and $Assumptions = {Element [?, Reals], ? > 0, Element [f, Reals], f > 0, Element [Zr, Reals], Zr > 0, Element [wd, Reals], Element [w, Reals], w > 0, Element [L, Reals], L > 0, Element [z, Reals], Element [wr, Reals], wr > 0, Element [Rr, Reals], Rr > 0}
So the Im [1/qout] gives:
(f^2 + 2 f z - L z) ((2 f - L) ?^2 wd^4 +
z (2 f^2 + 2 f z - L z) ?^2) Im[1/(
?^2 wd^4 (f^2 + 2 f z - L z)^2 +
z^2 (2 f^2 + 2 f z - L z)^2 ?^2)] - (
f^4 ? wd^2 Re[1/(
z^2 (2 f^2 + 2 f z - L z)^2 + (?^2 wd^4 (f^2 + 2 f z - L z)^2)/
?^2)])/?
By searching, I found that Mathematica returns 0 if I put Imaginary [z^2 (2 f^2 + 2 f z - L z)^2] but not when it is in the denominator. Imaginary [(z^2 (2 f^2 + 2 f z - L z)^2)^-1] which is relly weird since the inverse of real number is real!