/[escript]/trunk/doc/user/examples/diffusion.py
ViewVC logotype

Diff of /trunk/doc/user/examples/diffusion.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 574 by gross, Tue Feb 28 05:34:37 2006 UTC revision 575 by lkettle, Fri Mar 3 03:33:07 2006 UTC
# Line 23  mypde.setSymmetryOn() Line 23  mypde.setSymmetryOn()
23  mypde.setValue(A=kappa*kronecker(mydomain),D=rhocp/h,d=eta,y=eta*Tref)  mypde.setValue(A=kappa*kronecker(mydomain),D=rhocp/h,d=eta,y=eta*Tref)
24  # ... set heat source: ....  # ... set heat source: ....
25  x=mydomain.getX()  x=mydomain.getX()
26  q=qc*whereNegative(length(x-xc)-r)  qH=qc*whereNegative(length(x-xc)-r)
27  # ... set initial temperature ....  # ... set initial temperature ....
28  T=Tref  T=Tref
29  # ... start iteration:  # ... start iteration:
# Line 31  while t<tend: Line 31  while t<tend:
31        i+=1        i+=1
32        t+=h        t+=h
33        print "time step :",t        print "time step :",t
34        mypde.setValue(Y=q+rhocp/h*T)        mypde.setValue(Y=qH+rhocp/h*T)
35        T=mypde.getSolution()        T=mypde.getSolution()
36        saveVTK("T.%d.xml"%i,temp=T)        saveVTK("T.%d.xml"%i,temp=T)

Legend:
Removed from v.574  
changed lines
  Added in v.575

  ViewVC Help
Powered by ViewVC 1.1.26