stress of frames

Stress can be obtained by stress-strain script,but how to calculate the stress by frame files

Answers 3
CM
CM 2021-09-06

Below is an example which does this.

Basically, copy-and-paste from the Using scripting to calculate the interaction energy between two layers tutorial to loop over the frames and the stress property of a 3D Model Document.

#!perl

use strict;
use Getopt::Long;
use MaterialsScript qw(:all);

#
# set inoput trajectory
#
my $InDoc = $Documents{"polyethylene.xtd"}; # <- change the input trajectory here
my $numFrames = $InDoc->Trajectory->NumFrames;

#
# Loop over all frames
#
for (my $counter = 1; $counter <= $numFrames; ++$counter) {

print $counter."\n";

$InDoc->Trajectory->CurrentFrame = $counter;

my $symmetrysystem = $InDoc->SymmetrySystem;
my $stress = $symmetrysystem->Stress;

my $stressXX = $stress->Eij(1,1);
my $stressYY = $stress->Eij(2,2);
my $stressZZ = $stress->Eij(3,3);
my $stressXY = $stress->Eij(1,2);
my $stressXZ = $stress->Eij(1,3);
my $stressYZ = $stress->Eij(2,3);

print $stressXX, " ", $stressXY, " ", $stressXZ, "\n";
print $stressXY, " ", $stressYY, " ", $stressYZ, "\n";
print $stressXZ, " ", $stressYZ, " ", $stressZZ, "\n";


}

YY
YY 2021-12-14

Dear Carsten, may I ask what is the unit of stress obtained here? GPa?

CM
CM 2021-12-14

Yes. It is in GPa.

Materials Studio has has a very nice help where this can be found:
1. Select StressXX in the script
2. Hit F1
3.Follow the StressXX Settings as it applies to Forcite Dynamics task link
4. The help page which opens now says: Component of the applied stress (in GPa).