wave_boundary

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > Arrays+Matrices >

wave_boundary

Previous pageReturn to chapter overviewNext page

{ WAVE_BOUNDARY.PDE

 

 This problem demonstrates the use of data ARRAYS in boundary definition.

 Coordinate arrays are constructed by functional array definition

 and joined in a spline fit to form the system boundary.

}

 

title 'wave boundary'

 

definitions

 base=2

 ysine = array for p(0 by 0.1 to 10): sin(2*p)+base

 xsine = array for p(0 by 0.1 to 10): p

 

 

boundaries

Region 1

  start(0,0)

  line to (0,base)

  spline list(xsine,ysine)

  line to (10,0) to close

 

plots

grid(x,y)

 

end