Solution of the wave equation

Please choose:
case 1 nonsmooth solution
u(x,0)=max(x,1-x)
case2 Initial value
u0(x) = x(1-x)
case3 Initial value
u0(x) = sin((x-0.25d0)*pi/0.5d0)**4 in [0.25,0.75]
u0(x) = 0 otherwise
A problem of your own
Please specify a title text for the plot:

Specify here the initial value function by a piece of FORTRAN code.
Please type the evaluation program of your function here using FORTRAN rules. Your final statement must be
      fu= some expression you computed before or just here depending on x
You may use the constants pi, e(=exp(1)), sqrt2(=1.414...), the integer variables i,j,k, the logicals bool1,bool2,bool3 and the double precision variables sum,h1,h2,h3,h4,y(100),z(100),a(100,100) which are all intialized with zero resp. .false. . The routine has the parameters x (double, input) and fu (double out). never change x!. first is a local integer and set 0 before calling the function the first time. You may use this in order to initialize some local data and set it 1 afterwards to avoid multiple such initialization. Your settings of the local variables are preserved during program execution.

 

Specify the travelling speed c:
c = Important: c > 0 !

Please specify the number n of grid points in x-direction, giving Δx=1/(n-1)

n = Important: 3<=n<=2000 !

Specify the desired endtime:
tend = Important: tend > 0 !

Specify the number of time steps here, leading to Δt=tend/m. Important: 3 <= m <= 2000
m =

Please specify the number of grid lines you want to see on the plot: n/eachx must be in [3,100]

eachx = Important: n/eachx must be in [3,100] !
eacht = Important: m/eacht must be in [3,100] !

Specify the rotation angles which result in your view point:
Important: 0 <= xang <= 180, 0 <= uang <= 360 !
For xang = 0 the x-axis is horizontally on the screen, the t-axis vertically on the screen and for uang=0 the u=axis is vertically to the screen, that is you look vertically down on the surface (x,t,u)
xang=
uang=

Click on "evaluate", in order to submit your input.

back to the theory page

 Back to the top!

26.09.2016