theneq

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > Sequenced_Equations >

theneq

Previous pageReturn to chapter overviewNext page

{ THENEQ.PDE

 

   This example demonstrates the use of sequenced equations in a steady-state problem.

   The equations are not coupled, and are solved individually.

 

}

title 'Sequenced Equations'

select

  errlim=1e-5

  ngrid=50

Variables

  u,v,w

definitions

  k1 = 1

  k2 = 2

  k3 = 3

  u0 = 1-x^2-y^2

  v0 = 2-x^2-y^2

  w0 = 3-x^2-y^2

  su = 4*k1

  sv = 4*k2

  sw = 4*k3

equations

  u:     div(K1*grad(u)) +su = 0

then

  v:     div(K2*grad(v)) +sv = 0

then

  w:     div(K3*grad(w)) +sw = 0

boundaries

  Region 1

    start(-1,-1)

    value(u)=u0         value(v)=v0         value(w)=w0

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

  plots

    surface(u)  paint

    surface(v)  paint

    surface(w)  paint

    elevation(u,v,w,su,sv,sw) from (-1,0) to (1,0)

end