MathGroup Archive 1995

[Date Index] [Thread Index] [Author Index]

Search the Archive

[Help] Plot complex function.

  • To: mathgroup at christensen.cybernetics.net
  • Subject: [mg1749] [Help] Plot complex function.
  • From: tt57087 at ecc.u-tokyo.ac.jp (Toshitaka IKESHOJI)
  • Date: Mon, 24 Jul 1995 00:44:49 -0400
  • Organization: A&A, Univ.of TOKYO

Hello, everyone.
I'm a beginner to use Mathematica. I tried to solve the stress field 
using Airy's method and plot the stress fields but Mathematica claimed 
that the complex fuction could not display. Following code is what I 
typed in. Does anyone help me with showing how to plot complex function?
(* Displacement, strain and stress expressed in terms of complex 
function: *)
(* Diaplacement, starain and stress expressed in terms lf complex 
functions: *)
(*  Complex funciton*)
Clear[W,Phi,Psi,SigA,SigB,SigC,z];
ComplexExpand[ W[z_] := Conjugate[z]Phi[z] + Integrate[Psi[z],z], 
{W,Phi,Psi,z}];
ComplexExpand[ SigA[z_] := Re[2*(D[Phi[z],z] + Conjugate[D[Phi[z],z]])], 
{Phi,Psi,z} ];
ComplexExpand[ SigB[z_] := Re[2*(Conjugate[z]*D[Phi[z],{z,2}] + 
D[Psi[z],z])], {Phi,Psi,z} ];
ComplexExpand[ SigC[z_] := Im[Conjugate[z]*D[Phi[z],{z,2}] + 
D[Psi[z],z]], {Phi,Psi,z} ];
(* stress field *)
Clear[sigxx,sigyy,sigxy]
ComplexExpand[sigxx[z_] := (SigA[z]-SigB[z])/2, {SigA,SigB,z} ];
ComplexExpand[sigyy[z_] := (SigA[z]+SigB[z])/2, {SigA,SigB,z} ];
ComplexExpand[sigxy[z_] := SigC[z], {SigC,z} ];
(* strain *)
Clear[epsxx,epsyy,epsxy]
ComplexExpand[epsxx[z_] := 1/E*((1-nu^2)*sigxx[z] - nu(1-nu)*sigyy[z]), 
{z,sigxx,sigyy}]
ComplexExpand[epsyy[z_] := 1/E*( -nu(1-nu)*sigxx[z] + (1-nu^2)*sigyy[z]), 
{z,sigxx,sigyy}]
ComplexExpand[epsxy[z_] := 1/E*2*(1-nu)*sigxy[z], {z,sigxy}]
(* displacement *)
ComplexExpand[ u[z_] := 1/(2G)*Re[k*Phi[z] - z Conjugate[D[Phi[z],z]] - 
Conjugate[D[Psi[z],z]]], {Phi,Psi,z} ];
ComplexExpand[ v[z_] := 1/(2G)*Im[k*Phi[z] - z Conjugate[D[Phi[z],z]] - 
Conjugate[D[Psi[z],z]]], {Phi,Psi,z} ];


(* Example *)
Clear[A,B]
ComplexExpand[ Phi[z_] := A*z, {Phi,z} ];
ComplexExpand[ Psi[z_] := B*Log[z], {Psi,z} ];
A = 1; B = 1;
Plot3D[Re[sigxx[x + I y]],{x,-3,3},{y,-3,3},Shading->False]
Plot3D[ComplexExpand[sigyy[x + I 
y],sigyy],{x,-3,3},{y,-3,3},Shading->False]
Plot3D[ComplexExpand[sigxy[x + I 
y],sigxy],{x,-3,3},{y,-3,3},Shading->False]

(*=== ERROR MESSAGES ===*)
General::ivar: -3. - 3. I is not a valid variable.
General::ivar: -3. - 3. I is not a valid variable.
General::ivar: -3. - 3. I is not a valid variable.
General::stop: Further output of General::ivar will be suppressed during 
this calculation.
Plot3D::plnc: Re[sigxx[x + I y]] is neither a machine-size real number at 
{x, y}={-3., -3.}
     nor a list of a real number and a valid color directive.
Plot3D::plnc: Re[sigxx[x + I y]] is neither a machine-size real number at 
{x, y}=
    {-2.57143, -3.} nor a list of a real number and a valid color 
directive.
Plot3D::plnc: Re[sigxx[x + I y]] is neither a machine-size real number at 
{x, y}=
    {-2.14286, -3.} nor a list of a real number and a valid color 
directive.
General::stop: Further output of Plot3D::plnc will be suppressed during 
this calculation.



  • Prev by Date: Re: Download from Mathsource
  • Next by Date: Re: Arbitrary Length Ints
  • Previous by thread: Re: Exponetial Fit
  • Next by thread: RealDigits