Commits

Mike Graham committed cb0eeab

Minor changes.

Comments (0)

Files changed (3)

nanocontact/_visco.f

 C     Solve the viscoelastic contact problem using Attard's continuum 
 C     finite-distance interaction formulation. 
 C
+C     Status code:
+C       (Output)
+C         ist - 0 for success
 C     Input parameters:
-C       Status code
-C         ist - 0 for success, other values as needed
 C       Viscoelastic material properties
 C         E_0 - instantaneous viscoelastic modulus
 C         E_inf - long-term elastic modulus

nanocontact/visco.py

             filename = "%s.%s" % (name, format)
             pp.savefig(filename, format=format)
 
+    def plot_F_indentation(self, name, formats=['pdf', 'png']):
+        pp.figure()
+        halfway = len(self.h0) // 2
+
+        pp.plot(-self.u[0, :halfway], 10e6 * self.F[:halfway], 'r') #<XXX>
+        pp.plot(-self.u[0, halfway - 1:], 10e6 * self.F[halfway - 1:], 'b:')
+        pp.xlabel("Indentation Depth (nm)")
+        pp.ylabel("Force (nN)") # XXX Hardcoding units.
+        for format in formats:
+            filename = "%s.%s" % (name, format)
+            pp.savefig(filename, format=format)        
+
     def dissipated_energy(self):
         return nanocontact.post.dissipated_energy(
                    self.u, self.h, self.P_r, self.k_r, self.radius, self.time)

scripts/example.py

 except RuntimeError as e:
     print e
 
+print sim.dissipated_energy()
 sim.make_movie("video")
-sim.plot_F_delta("plots")
-print sim.dissipated_energy()
+sim.plot_F_delta("fdelta")
+sim.plot_F_indentation("findent")
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.