~fluidity-core/fluidity/sea-ice-branch

« back to all changes in this revision

Viewing changes to examples/stokes_square_convection/Plot_RMS.py

  • Committer: Simon Mouradian
  • Date: 2012-10-19 10:35:59 UTC
  • mfrom: (3520.32.371 fluidity)
  • Revision ID: simon.mouradian06@imperial.ac.uk-20121019103559-y36qa47phc69q8sc
mergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
 
 
3
# This sript plots up the RMS velocity for both the 24x24 and 48x48 case
 
4
import pylab
 
5
from fluidity_tools import stat_parser as stat
 
6
 
 
7
# Stafiles:
 
8
statfile24="stokes-sc-Ra1e5-24.stat"
 
9
statfile48="stokes-sc-Ra1e5-48.stat"
 
10
 
 
11
# First plot 24x24 case:
 
12
pylab.plot(stat(statfile24)["CoordinateMesh"]["nodes"][-1],
 
13
      stat(statfile24)["Fluid"]["Velocity%magnitude"]["l2norm"][-1],
 
14
      linestyle='None', marker='o', markerfacecolor='1.0')
 
15
 
 
16
# Next plot 48x48 case:
 
17
pylab.plot(stat(statfile48)["CoordinateMesh"]["nodes"][-1],
 
18
      stat(statfile48)["Fluid"]["Velocity%magnitude"]["l2norm"][-1],
 
19
      linestyle='None', marker='o', markerfacecolor='1.0')
 
20
 
 
21
# Plot benchmark value as line for comparison:
 
22
pylab.plot([100,8e4],[193.214,193.214],'k--',lw=0.4)
 
23
 
 
24
pylab.xlabel(r"Vertices")
 
25
pylab.ylabel(r"RMS Velocity")
 
26
pylab.xlim(100,5e3)
 
27
pylab.ylim(192.0,195.0)
 
28
 
 
29
pylab.savefig("RMS_1e5.pdf")
 
30