simulating a creep experiment of polycrystalline copper ... · lateral relaxation, according the...

18
1 2 2 3 4 5 11 12 12 16 17 Table of Contents Table of Contents Simulating a creep experiment of polycrystalline copper Installing the polycrystal builder plugin Building the polycrystalline cell Analyzing the grain structure Setting up the creep simulation Strain vs. time Running the simulation Analyzing the results Outlook References

Upload: others

Post on 14-Aug-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Simulating a creep experiment of polycrystalline copper ... · lateral relaxation, according the the poisson ratio of the material. For the actual creep stress, which is specified

122345

11

12121617

Table of Contents

Table of ContentsSimulating a creep experiment of polycrystalline copper

Installing the polycrystal builder pluginBuilding the polycrystalline cellAnalyzing the grain structureSetting up the creep simulation

Strain vs. time

Running the simulationAnalyzing the resultsOutlookReferences

Page 2: Simulating a creep experiment of polycrystalline copper ... · lateral relaxation, according the the poisson ratio of the material. For the actual creep stress, which is specified

Downloads & LinksDownloads & Links

PDF version run_ polycrystal.py

Docs » Tutorials » Molecular dynamics » Simulat ing a creep experiment of polycrystalline copper

Simulat ing a creep experiment of polycrystallineSimulat ing a creep experiment of polycrystallinecoppercopperVersion:Version: 2016.3

This tutorial will show how to set up, run, and analyze a molecular dynamics (MD) simulat ion of amicroscopic creep experiment using polycrystalline copper, i.e. the st rain response to an externallyimposed uniaxial st ress [WIO12]. You will get to know the Polycryst al BuilderPolycryst al Builder and the Local St ruct ureLocal St ruct ureanalysis tool, and you will learn how to run advanced MD simulat ionsadvanced MD simulat ions at constant external st ress.

Although the construct ion of realist ic grain sizes of several nanometers is in principal possible, thecomputat ional cost of such simulat ions is relat ively large, as the required system size can easily exceed amillion atoms. Such calculat ions are certainly possible with QuantumATK, but for demonstrat ion purposesyou will here simulate only a small model system, to reduce the calculat ion t ime. St ill, the presentedmethodology can be t ransferred in a st raight forward manner to larger systems.

Inst al l ing t he polycryst al bu i lder p luginInst al l ing t he polycryst al bu i lder p lugin

First , make sure that the Polycrystal plugin is installed and available in the BuilderBuilder – it should appear in theBuilder panel under Builders ‣ Polycrystal (Voronoi). If the plugin is not listed, you have to install it via Help ‣AddOn Manager. Select the SCAIT oolsSCAIT ools package and install it .

You may have to restart QuantumATK to act ivate the plugin in the Builder.

Quant umAT KQuant umAT K

Try it !

QuantumATK

Contact

Page 3: Simulating a creep experiment of polycrystalline copper ... · lateral relaxation, according the the poisson ratio of the material. For the actual creep stress, which is specified

Build ing t he polycryst al l ine cel lBu i ld ing t he polycryst al l ine cel l

Create a new project in QuantumATK, call it for instance “Polycrystalline Copper”.

Open the BuilderBuilder and add the fcc copper single crystal material to the St ashSt ash using Add ‣ FromDatabase.

To start building the polycrystalline st ructure, select Bulk Tools ‣ Polycrystal (Voronoi). Set the crystalsize to 50, 50, 50 Å to obtain an cubic supercell. Set the gap between grains to a small value, like 0.1 Å, toallow for a compact packing of the grains. Drag and drop the cubic copper cell from the Stash to theMat erialsMat erials f ield. Make sure the Generate grain based tags opt ion is unt icked. As an advanced analysisfeature, this opt ion allows you to mark the atoms within each grain by different tags, so that thet ransformat ion of the grains during the simulat ion can be monitored. We will not use this feature in thistutorial.

You can choose how the seeds for the grains are created. Select Generat e f rom superlat t iceGenerat e f rom superlat t ice and setthe number of grid points to 4. Select FaceCenteredCubic as the superlat t ice of the grain st ructure, andset the value of Jit ter to 8 Å. These set t ings will create four init ial grains on a distorted fcc lat t ice, with adistort ion variance of 8 Å.

You can preview the grain st ructure by clicking Build PreviewBuild Preview. Now, the 3D-window will show the only theseeds of the grains. You can addit ionally switch on the visualizat ion of the grain boundaries by checkingShow 3D previewShow 3D preview box.

Click Build Polycryst alBuild Polycryst al to init iate the st ructure generat ion.

After a few seconds the f inal polycrystalline cell will appear on the Stash.

Page 4: Simulating a creep experiment of polycrystalline copper ... · lateral relaxation, according the the poisson ratio of the material. For the actual creep stress, which is specified

Analyzing t he grain st ruct ureAnalyzing t he grain st ruct ure

By rotat ing the cell in the Builder window, you can already see part of the grain st ructure. A bet tervisualizat ion in terms of the local crystal st ructure can be performed by using the LocalSt ruct ureLocalSt ruct ureanalyzer.

For this, send the polycrystalline cell to Script erScript er, and just left double-click AnalysisAnalysis and add theLocalSt ruct ureLocalSt ruct ure (do not add any New Calculator, as you may be used to – we are not going to run anysimulat ion, only analyze the real-space geometry). Change the output f ilename to something suitable, e.g.local_structure_init.hdf5 .

Send the script to the Job ManagerJob Manager and run it .

After a few seconds, the results will appear on the LabFloorLabFloor. Select the LocalSt ructure item and click the ViewerViewer. You can now use the Local St ruct ureLocal St ruct ure plugin in the Viewer to analyze the crystal st ructure.

You will there f ind a list of the crystal st ructure types which have been detected in the polycrystalline cell.

In this example, the cell contains atoms in a local “FCC”, as well as “HCP”, or “Undefined” environment . Sincethe underlying basic copper crystal forms a fcc st rucure, the grains will be of such st ruture, too. Toident ify the grain boundaries, click to select all Undefined and HCP atoms (the lat ter will be only a t inyfract ion). Then open the Propert iesPropert ies plugin and change the color of the selected atoms to e.g. white.Grains as well as grain boundaries will now be clearly visible, as illust rated above.

T ipT ip

Alternat ively, you could uncheck the Visible box to hide the selected grain-boundary atoms, or performany other customized graphical modif icat ion of the scene.

Not eNot e

The exact grain st ructure has been generated randomly and might be different from case to case.

Page 5: Simulating a creep experiment of polycrystalline copper ... · lateral relaxation, according the the poisson ratio of the material. For the actual creep stress, which is specified

Set t ing up t he creep sim ulat ionSet t ing up t he creep sim ulat ion

You will now set up the MD simulat ions; f irst equilibrat ion and then the actual creep simulat ion. Send thebulk configurat ion from the BuilderBuilder to the Script erScript er.

Add a New Calculat orNew Calculat or and open it (double-click). Select AT K- ForceFieldAT K- ForceField in the left panel; thesuggested Embedded Atom Model (EAM) potent ial named EAM_Cu_2001b [MMP+01] is a suitable choice.Set the f ilename to poly_initial.hdf5 to save the init ial supercell in a separate HDF5 f ile – using separatedata f iles can help organize the data. Uncheck the Print t ick box at the bot tom to not clut ter the log f iletoo much. Click OK to close the Calculator dialog.

Not eNot e

For QuantumATK-versions older than 2017, the AT K- ForceFieldAT K- ForceField calculator can be found under thename AT K- ClassicalAT K- Classical.

Next , add the Opt imiz eGeomet ryOpt imiz eGeomet ry block (click Opt imize ‣ Opt imizeGeometry). This step will removepossibly large inter-atomic forces due to the building procedure, before running the actual MD simulat ion.Double-click to open its set t ings. As we do not require a perfect ly force-free st ructure, the forcetolerance can be increased to 0.5 eV/Å, in order to speed up the calculat ion. The remaining parameterscan be kept at their default values, although you could remove the checkmarks for Save and Print .

Page 6: Simulating a creep experiment of polycrystalline copper ... · lateral relaxation, according the the poisson ratio of the material. For the actual creep stress, which is specified

After the geometry opt imizat ion, you will want to run two short NVT (constant volume) and NPT (constantpressure) molecular dynamics simulat ions to get an equilibrated configurat ion. Therefore, add two MolecularDynamicsMolecularDynamics blocks (click Opt imize ‣ MolecularDynamics). Later on, you will add one more MDblock for the creep simulat ion.

In some cases, in part icular if the init ial configurat ion is far from equilibrium, direct ly start ing with aconstant pressure simulat ion can make the system to unstable and lead to unreasonable results. A saferapproach is to equilibrate the system at constant volume f irst , before switching on the pressure coupling.To this aim, select Langevin for NVT simulat ion in the set t ing of the f irst MolecularDynamics block, choosethe Maxwell-Boltzmann init ial velocit ies at a temperature of 500 K. You can use a large t ime step of 5 fsfor copper, as the atoms are quite heavy and thus the vibrat ional frequencies are small enough. Be aware,however, that a t ime step this large might in other cases affect the accuracy of the integrat ionalgorithms, so before simulat ing a new system one should carefully assess the chosen t ime step bymonitoring the energy conservat ion in an NVE simulat ion at the desired temperature.

Set both the reservoir temperature and the f inal temperature to 500 K. We run the simulat ion at a slight lyelevated temperature to accelerate possible thermally act ivated processes, to see at least the onset ofthe creep behaviour in a relat ively short simulat ion t ime.

Save the t rajectory to the f ile polycrystal_equilibrate_nvt.hdf5 . Uncheck the Save and Print boxes at thebottom, as the t rajectory is already being saved.

Page 7: Simulating a creep experiment of polycrystalline copper ... · lateral relaxation, according the the poisson ratio of the material. For the actual creep stress, which is specified

In the next MolecularDynamicsMolecularDynamics block, you will perform another equilibrat ion simulat ion, this t ime atconstant pressure. Therefore, select NPT Martyna Tobias Klein MD type, as this method allows to imposean independent pressure coupling to each component of the st ress tensor. Set the number of steps to10,000 and the log interval to 500. Select an appropriate f ilename for the t rajectory f ile, e.g.polycrystal_equilibrate_npt.hdf5 .

Choose Configurat ion velocit ies as init ial velocit ies.

Choose again a fairly large t ime step of 5 fs and 500 K for the reservoir and f inal temperatures. Moreover,make sure that the reservoir pressure is 1 bar.

Uncheck Isot ropic pressureIsot ropic pressure to couple each cell vector independent ly to the barostat . In the f ield namedPressure coupling you can select which components of the st ress tensor the barostat should couple to.Here, you should st ick to the default set t ings, which act ivate only the hydrostat ic st ress, without anyshear st ress components.

Page 8: Simulating a creep experiment of polycrystalline copper ... · lateral relaxation, according the the poisson ratio of the material. For the actual creep stress, which is specified

Now, for the actual creep simulat ion, add a third MolecularDynamicsMolecularDynamics block. Choose the same set t ingsas in the previous (NPT) MD block, except for the number of steps and the log interval, which should beset to 40,000 and 250, respect ively.

The essent ial point of a creep simulat ion is exposing the system to a large uniaxial st ress and monitoring the st rain response, as illust rated below:σcreep

Page 9: Simulating a creep experiment of polycrystalline copper ... · lateral relaxation, according the the poisson ratio of the material. For the actual creep stress, which is specified

To this aim, you f irst need to uncheck the Isot ropic pressureIsot ropic pressure box, to achieve an independent pressure-coupling of the cell vectors. Then, you need to modfiy the “Reservoir pressure” tensor. The f irst twodiagonal ent ries (xx and yy) define the ambient pressure perpendicular to the creep direct ion to allow forlateral relaxat ion, according the the poisson rat io of the material. For the actual creep st ress, which isspecif ied as the third diagonal ent ry (zz), we set a value of -15,000 bar, corresponding to -1.5 GPa. Note,that negat ive pressure values are interpreted as tensile external st ress.

The off-diagonal ent ries denote the shear st resses (yz, zx, xy), which do not play a role here as we havede-at ivated the coupling to these contribut ions.

Page 10: Simulating a creep experiment of polycrystalline copper ... · lateral relaxation, according the the poisson ratio of the material. For the actual creep stress, which is specified

Finally, add another LocalSt ruct ureLocalSt ruct ure analysis block in order to be able to analyze and visualize the f inalgrain st ructure. Open the block and change the output f ilename to local_structure_final.hdf5 .

The Script Generat orScript Generat or should now look like below. Send the script to the Edit orEdit or by using the bot ton.

Page 11: Simulating a creep experiment of polycrystalline copper ... · lateral relaxation, according the the poisson ratio of the material. For the actual creep stress, which is specified

St rai n vs. t i meSt rai n vs. t i me

A creep simulat ion is commonly analyzed in terms of the st rain as a funct ion of t ime, to measure theresponse to the imposed st ress. To perform a similar analysis for our model simulat ion you have to addsome more lines to bot tom of the script you just produced.

These ext ra QuantumATK Python script lines are shown below and can be downloaded as a separatescript : analysis.py. The relevant data (i.e. cell vectors, st ress, potent ial energy) are ext racted from themd_ t raject orymd_ t raject ory object by using the corresponding class methods. Plots of st rain, st ress and potent ialenergy are then plot ted using the pylab module, and saved as PNG files. This analysis can also be carriedout separately, after loading a saved HDF5 t rajectory using the nlread()nlread() funct ion.

In the Edit orEdit or, copy the analysis script lines into the bot tom on the simulat ion script .

Page 12: Simulating a creep experiment of polycrystalline copper ... · lateral relaxation, according the the poisson ratio of the material. For the actual creep stress, which is specified

# -------------------------------------------------------------# Custom Analysis# -------------------------------------------------------------md_trajectory = nlread('polycrystal_creep.nc')[-1]# Extract the times, cell vectors, potential energies, and pressure tensorstimes = md_trajectory.times().inUnitsOf(picoSecond)cell_vectors = md_trajectory.cells()e_pot = md_trajectory.potentialEnergies().inUnitsOf(eV)pressure = md_trajectory.pressureTensors().inUnitsOf(GPa)# Convert the tensor elements into listsstrain_xx = cell_vectors[:, 0, 0]/cell_vectors[0, 0, 0] - 1.0strain_zz = cell_vectors[:, 2, 2]/cell_vectors[0, 2, 2] - 1.0pressure_zz = pressure[:, 2, 2]# Plot the data usig pylabimport pylab# Plot the strainpylab.figure()pylab.plot(times,strain_zz,'b')pylab.plot(times,strain_xx,'g')pylab.title('Creep strain in Copper Polycrystal at 500K and a load of 1.5 GPa')pylab.xlabel('MD time (ps)')pylab.ylabel('Strain')pylab.grid(True)pylab.savefig("CreepStrain.png")# Plot the pressurepylab.figure()pylab.plot(times,pressure_zz,'b')pylab.title('Stress in Copper Polycrystal')pylab.xlabel('MD time (ps)')pylab.ylabel('Stress (GPa,bar)')pylab.grid(True)pylab.savefig("CreepStress.png")# Plot the potential energypylab.figure()pylab.plot(times,e_pot)pylab.title('Potential energy during creep in copper polycrystal')pylab.xlabel('MD time (ps)')pylab.ylabel('Potential energy (eV)')pylab.grid(True)pylab.savefig("CreepEPot.png" )

Runn ing t he sim ulat ionRunn ing t he sim ulat ion

After edit ing the simulat ion script as desribed above, use the but ton to t ransfer the script to the Job ManagerJob Manager, then save the script as run_polycrystal.py and run it . The whole simulat ion takesapproximately an hour, depending on your comput ing infrast ructure, since the system is quite large (andyet small compared to the geometries studied in [WIO12]).

Analyzing t he resu lt sAnalyzing t he resu lt s

After the simulat ion has f inished, let us at f irst take a look at the t rajectory. Select the t rajectory namedpolycrystal_creep on the LabFloorLabFloor and open it using the Movie T oolMovie T ool. Start the movie by clicking the Play

but ton.

You will immediately see an elongat ion of the simulat ion cell in the z-direct ion, accompanied by a slightcompression in the perpendicular direct ions. The elongat ion proceeds as the simulat ion cont inues, butslows down. By rotat ing the cell with the right mouse but ton, you can ident ify the lat t ice planes of thegrains – this allows you to get a visual impression of the grain dynamics.

The f inal grain st ructure can be be analyzed in a more quant itat ive manner by using the ViewerViewer tovisualize the LocalSt ruct ureLocalSt ruct ure analysis item saved in the local_structure_final.hdf5 f ile. Edit the coloringscheme just like you did in the beginning of the tutorial. Probably (although it may depend on the init ial

Page 13: Simulating a creep experiment of polycrystalline copper ... · lateral relaxation, according the the poisson ratio of the material. For the actual creep stress, which is specified

st ructure) the major part of the cell has t ransformed into a planar grain, which extends across the periodicboundaries.

By rotat ing the cell, you will st ill see some grey regions, which are the remainders of the grain boundaries.The fast sliding and merging of the grains must be at t ributed to the small init ial grain size, as this reducesthe energy barrier upon changing their st ructure. The f inal st ructure appears locked by the periodicboundary condit ions of the small cell, and lit t le addit ional sliding to release energy is possible.

After the st ructural inspect ion you may want to have a look at the output observables, start ing with thest ress in the z-direct ion. The st ress curve has been saved to the f ile CreepStress.png :

Page 14: Simulating a creep experiment of polycrystalline copper ... · lateral relaxation, according the the poisson ratio of the material. For the actual creep stress, which is specified

The graph shows that the st ress oscillates at high frequency and stabilizes around the target value of -1.5GPa. Generally, as long as the oscillat ions remain within reasonable bounds and do not increase inmagnitude you don’t have to worry about this behavior.

The t ime-dependent creep st rain is plot ted in the f ile CreepStrain.png . The curves denote the st rain inthe x (green) and z (blue) direct ions, respect ively:

Page 15: Simulating a creep experiment of polycrystalline copper ... · lateral relaxation, according the the poisson ratio of the material. For the actual creep stress, which is specified

Although your example may look different from the results shown here (due to the random nature of thepolycrystalline supercell building process) it should have some common features. In the beginning of thesimulat ion a rapid increase of z-axis st rain to about 2% is visible. This contribut ion arises from theimmediate elast ic deformat ion of the solid and it should be to a large extent reversible. Following that , acont inuous – but much slower – increase in st rain takes place. Here, the grain st ructure relaxes irreversiblyby sliding and diffusion, or even st ructural t ransformat ion. Note that at around 90 ps a jump in the creepcurve becomes visible, which must be at t ributed to a major (inelast ic) st ructural rearrangement .

Import antImport ant

Be aware that we are considering only the init ial onset of creep behavior in a very small model systemwith very few grains and grain sizes in the order of less than one nanometer! The observed behaviormight thus not be t ransferable in a st raight forward way to real polycrystals with considerably largergrain sizes.

The elongat ion is accompanied by a t ransverse shrinking of the simulat ion box, as visualized by the x-st rain,from which one can calculate the Poisson rat io of the polycrystal.

Finally, take a look at the t ime-dependent potent ial energy:

Page 16: Simulating a creep experiment of polycrystalline copper ... · lateral relaxation, according the the poisson ratio of the material. For the actual creep stress, which is specified

After the init ial elast ic deformat ion, which is of course accompanied by an increase of energy (it can behard to see in the plot , it is very sudden), the creep process leads to a cont inuous decrease of potent ialenergy caused by relaxat ion processes within the grain st ructure. As already observed in the creep st rain,the same pronounced jump at 90 ps appears in the potent ial energy curve as well. From its magnitude, youcan see that the corresponding relaxat ion process is accompanied by a large release of energy.

Out lookOut look

Using the Polycryst al BuilderPolycryst al Builder, you can easily build huge polycrystal systems with a large number of grains.The following example shows a copper polycrystal of 300 x 300 x 300 Å . The system contains around 2.3million atoms.

3

Page 17: Simulating a creep experiment of polycrystalline copper ... · lateral relaxation, according the the poisson ratio of the material. For the actual creep stress, which is specified

Next

Simulat ions of such huge systems are perfect ly possible with the AT K- ClassicalAT K- Classical simulat ion engine, butwill naturally take longer t ime, and one has to be careful with the size of the output f iles. The picture alsonicely demonstrates the great graphical performance of QuantumATK – rotat ing and manipulat ing thiscrystal in 3D can be done completely f luent ly.

ReferencesReferences

[MMP+01] Y. Mishin, M. J. Mehl, D. A. Papaconstantopoulos, A. F. Voter, and J. D. Kress. Structural stability andlatt ice defects in copper: \text it Ab init io , t ight -binding, and embedded-atom calculat ions. Phys. Rev.B, 63:224106, May 2001. doi:10.1103/PhysRevB.63.224106.

[WIO12] (1, 2) Yun-Jiang Wang, Akio Ishii, and Shigenobu Ogata. Grain size dependence of creep innanocrystalline copper by molecular dynamics. MATERIALS TRANSACTIONS, 53(1):156–160, 2012.doi:10.2320/matertrans.MD201122.

Previous

© Copyright 2020 Synopsys, Inc. All Rights Reserved.

Page 18: Simulating a creep experiment of polycrystalline copper ... · lateral relaxation, according the the poisson ratio of the material. For the actual creep stress, which is specified