Annotation of /trunk/doc/examples/usersguide/wave.py

Revision 110 - (hide annotations)
Mon Feb 14 04:14:42 2005 UTC (14 years ago) by jgs
Original Path: trunk/esys2/doc/user/examples/wave.py
File MIME type: text/x-python
File size: 1632 byte(s)
```*** empty log message ***

```
 1 jgs 108 # \$Id\$ 2 from esys.escript import * 3 jgs 110 from esys.linearPDEs import LinearPDE 4 from esys.finley import Brick 5 from numarray import identity 6 ne=10 # number of cells in x_0-direction 7 depth=10000. # length in x_0-direction 8 width=100000. # length in x_1 and x_2 direction 9 lam=3.462e9 10 mu=3.462e9 11 rho=1154. 12 tau=10. 13 umax=2. 14 tend=60 15 h=1./5.*sqrt(rho/(lam+2*mu))*(depth/ne) 16 print "time step size = ",h 17 jgs 108 18 jgs 110 def s_tt(t): return umax/tau**2*(6*t/tau-9*(t/tau)**4)*exp(-(t/tau)**3) 19 20 def wavePropagation(domain,h,tend,lam,mu,rho,s_tt): 21 jgs 108 x=domain.getX() 22 # ... open new PDE ... 23 jgs 110 mypde=LinearPDE(domain) 24 mypde.setLumpingOn() 25 kronecker=identity(mypde.getDim()) 26 mypde.setValue(D=kronecker*rho, \ 27 q=x[0].whereZero()*kronecker[1,:]) 28 # ... set initial values .... 29 jgs 108 n=0 30 jgs 110 u=Vector(0,ContinuousFunction(domain)) 31 u_last=Vector(0,ContinuousFunction(domain)) 32 t=0 33 jgs 108 while t

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision