complex+time

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > Variable_Types >

complex+time

Previous pageReturn to chapter overviewNext page

{ COMPLEX+TIME.PDE

 

 This example shows the use of complex variables in time-dependent systems.

 

 The equation that is solved is not intended to represent any real application.

 

}

title 'Complex transient equations'

Variables

   U(0.01) = complex (Ur,Ui)         { creates variables Ur and Ui  }

definitions

   u0 = 1-x^2-y^2

   s = complex(4,x)

equations

  { create two scalar equations, one for Ur and one for Ui }

   U:  del2(U) +s = dt(U)

boundaries

  Region 1

      start(-1,-1)

      natural(Ur)=u0-Ur

        line to (1,-1) to (1,1) to (-1,1) to close

time 0 to 1

plots

for cycle=10

      contour(Ur,Ui)

      contour(Real(u),Imag(U))

      contour(U)

      vector(U)

      elevation(u,s) from(-1,0) to (1,0)

      history(u,s) at (0,0)

end