Author Topic: define constraints for Left direction in graphene sheet  (Read 5264 times)

0 Members and 1 Guest are viewing this topic.

Offline David1986

  • Regular QuantumATK user
  • **
  • Posts: 15
  • Country: au
  • Reputation: 0
    • View Profile
Hi
I want to calculate strain in graphen sheet and I have been done that with use of this tutorial:
http://docs.quantumwise.com/tutorials/youngs_modulus/youngs_modulus.html
As you can see in this tutorial we  use of  flow comments for  calculate strain in Right direction:

constraints = configuration.indicesFromTags("Right")
        for c in constraints:
            xyz = numpy.array(configuration.cartesianCoordinates()[c]) + numpy.array(self.__delta)
            configuration._changeAtoms(indices=[c], positions=[xyz]*Angstrom)

how can define this comment for Left direction?

Online Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5432
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: define constraints for Left direction in graphene sheet
« Reply #1 on: October 29, 2016, 22:54 »
First of all, it's not a "comment"...
Second, why would you need to change the work flow, it will work fine for graphene too (with proper adjustments). It's not "strain in right direction", it's just moving the right-hand side atoms (while keeping the "left" atoms fixed) to strain the structure, but fixing the right and moving the left is completely symmetric and would give the same result.
« Last Edit: October 29, 2016, 22:55 by Anders Blom »

Offline David1986

  • Regular QuantumATK user
  • **
  • Posts: 15
  • Country: au
  • Reputation: 0
    • View Profile
Re: define constraints for Left direction in graphene sheet
« Reply #2 on: October 30, 2016, 11:19 »
thank you for your comment
I want to employ strain to two sides (left,right) in the same time.

Online Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5432
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: define constraints for Left direction in graphene sheet
« Reply #3 on: October 30, 2016, 23:45 »
Why? It will have no effect beyond what is already done. If you look carefully, you will see that the tags (and hence constraints) "left"/"right" only apply to the outermost layers of atoms. The entire structure is stretched, i.e. both the atoms on the left and right of the defect.

Offline David1986

  • Regular QuantumATK user
  • **
  • Posts: 15
  • Country: au
  • Reputation: 0
    • View Profile
Re: define constraints for Left direction in graphene sheet
« Reply #4 on: November 5, 2016, 16:30 »
I want to employ strain to two sides (left,right) in the same time like fig6 in this article:

Pei, Q. X., Y. W. Zhang, and V. B. Shenoy. "A molecular dynamics study of the mechanical properties of hydrogen functionalized graphene." Carbon 48.3 (2010): 898-904.

How can do this?

Online Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5432
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: define constraints for Left direction in graphene sheet
« Reply #5 on: November 6, 2016, 22:19 »
As I said, that is exactly what you do with this script, the structure will be stretched on both left and right side of the defect. The label "right" is arbitrary, it could just as well have been called "label2" in the script. Look instead at how the actual structure changes as the strain is applied and you still see that both sides are moving, relative to the center.

Offline David1986

  • Regular QuantumATK user
  • **
  • Posts: 15
  • Country: au
  • Reputation: 0
    • View Profile
Re: define constraints for Left direction in graphene sheet
« Reply #6 on: November 29, 2016, 10:32 »
at first many thanks for your quid
in continue I want to extract data from  software but as you can see:

import pylab
pylab.figure()
pylab.plot(strain * 100, stresses_factored.inUnitsOf(GPa))
pylab.title('CNT with Stone-Wales defect')
pylab.xlabel('Strain (%)')
pylab.ylabel('Stress (GPa)')
pylab.grid(True)
pylab.savefig("mdtrajectory_cnt_fig.png")

data plot as png format, How can extract data from this figure?

Online Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5432
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: define constraints for Left direction in graphene sheet
« Reply #7 on: November 29, 2016, 15:50 »
The "data" is in the variables "strain" and "stresses_factored"

Offline David1986

  • Regular QuantumATK user
  • **
  • Posts: 15
  • Country: au
  • Reputation: 0
    • View Profile
Re: define constraints for Left direction in graphene sheet
« Reply #8 on: November 30, 2016, 09:15 »
unfortunately, I can not open them, can I define my log file to save data? I need to extract data to file with .doc format

Online Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5432
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: define constraints for Left direction in graphene sheet
« Reply #9 on: November 30, 2016, 09:37 »
Open?
print  strain
print stresses_factored

Offline David1986

  • Regular QuantumATK user
  • **
  • Posts: 15
  • Country: au
  • Reputation: 0
    • View Profile
Re: define constraints for Left direction in graphene sheet
« Reply #10 on: December 5, 2016, 09:06 »
I want to plot "strain" in Orgin,  I need to extract and transfer data from ATK to Orgin,how can I do this?

Offline Petr Khomyakov

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1290
  • Country: dk
  • Reputation: 25
    • View Profile
Re: define constraints for Left direction in graphene sheet
« Reply #11 on: December 5, 2016, 10:08 »
What do you mean by plot "strain"?

Offline Julian Schneider

  • QuantumATK Staff
  • QuantumATK Guru
  • *****
  • Posts: 163
  • Country: dk
  • Reputation: 25
    • View Profile
Re: define constraints for Left direction in graphene sheet
« Reply #12 on: December 5, 2016, 10:27 »
You can save the data to a .txt file by adding the following lines to your python script.
Code
save_array = numpy.array([strain * 100, stresses_factored.inUnitsOf(GPa)]).transpose()
numpy.savetxt('stress_strain.txt', save_array)
I  guess origin should be able to read this file otherwise you copy the content to a doc file.

Offline David1986

  • Regular QuantumATK user
  • **
  • Posts: 15
  • Country: au
  • Reputation: 0
    • View Profile
Re: define constraints for Left direction in graphene sheet
« Reply #13 on: December 19, 2016, 07:29 »
In the above code that gives the graph of stress versus strain. I want to get the graph of pressure versus strain. as you know the relationship between pressure and stress is :
P = 1 / 3 Tr [stress]
How do I enter this formula to in the code and plot the graph of pressure versus strain?

Offline Jess Wellendorff

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 933
  • Country: dk
  • Reputation: 29
    • View Profile
Re: define constraints for Left direction in graphene sheet
« Reply #14 on: December 19, 2016, 11:47 »
The trace is the sum of the diagonal elements in the 3x3 matrix:
P = (S[0,0] + S[1,1] + S[2,2]) / 3
where S is your stress tensor (in appropriate units).