1. from fipy import *
   2. nx = 20
   3. ny = nx
   4. dx = 1.
   5. dy = 1.
   6. L = nx * dx
   7. mesh = Grid2D(dx=dx, dy=dy, nx=nx, ny=ny)
   8. phi = CellVariable(name = 'flux',
   9. mesh = mesh,
   10. value = 0.)
   11. D=1.
   12. eq = TransientTerm() == DiffusionTerm(coeff=D)
   13. valueBottom = 1.
   14. BCs = FixedValue(faces=mesh.getFacesBottom(), value=valueBottom)
   15. if __name__ == '__main__':
   16.     viewer=Viewer(vars=phi, datamin=0., datamax=1.)
   17.     viewer.plot()
   18.     viewer.plotMesh()                     # Not Showing the mesh
   19.
   20. timeStepDuration = 0.1
   21. steps = 100
   22. for step in range(steps):
   23.     print step
   24.     eq.solve(var=phi,
   25.     boundaryConditions=BCs,
   26.     dt=timeStepDuration)
   27.     if __name__ =='__main__':
   28.         viewer.plot()
   29.         TSVViewer(vars=phi).plot("./flux2D")
   30. raw_input("press <return>...")

 on line 18 the command not showing the mesh

changed the line18 to Matplotlib2DGridViewer(vars=phi)
still no mesh is seen
-- 
Ajay Rawat
Kalpakkam, IGCAR

-------------------------------------------------------------------------
Save Himalayas....
-------------------------------------------------------------------------

Reply via email to