Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - lx_pico

Pages: [1]
Support Forum / Output the shear strain increment
« on: August 04, 2019, 01:38:37 PM »
Hi, everyone.
   I try to output the shear strain increment for the whole sample by codes
Code: [Select]
node = import_file("../MGfilm-R100401/simple.MG*.tensile")

modifier = AtomicStrainModifier(cutoff = 10.0,
affine_mapping = CalculateDisplacementsModifier.AffineMapping.ToReference,
output_rotations = True,
use_frame_offset = True)

modifier = SelectExpressionModifier(expression = ' ParticleType!=0  ') #select all

def compute_delta_yita(frame, data):
per_yita = data.particles["Shear Strain"]
selection = data.particles["Selection"]
output.attributes["yita_per_frame"] = np.mean(per_yita[selection == 1])

export_file(node, "delta_yita.txt", "txt/attr",
    columns=["strain", "yita_per_frame"],

But it end up with an error: RuntimeError: Data pipeline evaluation failed: Modifier 'Atomic strain' reported: Requested reference frame -1 is out of
 range. Cannot perform calculation at the current animation time.
How can i avoid this?
I'm using Ovito3.00


Support Forum / Averaging the strain tensor
« on: June 22, 2019, 10:45:29 AM »
Hi, Ovito users,
    I'm trying to average the strain tersor of each atom in a certain selected region. Since i want tracing this region through every frames, BinAndReduce is not what i want. So, i used FreezePropertyModifier to keep traking the selected atoms. But when i try to average the strain tensor, i'm getting a error: "The DataCollection does not contain a particle property with the name 'Strain Tensor.XX'

Code: [Select]
modifier = AtomicStrainModifier(cutoff = 10.0,
output_strain_tensors = True)
modifier.reference.load("reference file")

#select all atoms for test
mod = SelectExpressionModifier(expression = ' ParticleType!=0  ')
modifier = FreezePropertyModifier(source_property = 'Selection',
  destination_property = 'Selection')
dataset.anim.current_frame = 0

def averaging_strain_tensors(frame, input, output):
StrainTensor_XX = input.particle_properties['Strain Tensor.XX'].array
StrainTensor_YY = input.particle_properties['Strain Tensor.YY'].array
StrainTensor_ZZ = input.particle_properties['Strain Tensor.ZZ'].array
StrainTensor_XY = input.particle_properties['Strain Tensor.XY'].array
StrainTensor_XZ = input.particle_properties['Strain Tensor.XZ'].array
StrainTensor_YZ = input.particle_properties['Strain Tensor.YZ'].array
selection = input.particle_properties['Selection'].array
output.attributes["strain"] = frame /5.0
output.attributes['XX_mean'] = numpy.mean(StrainTensor_XX[selection != 0])
output.attributes['YY_mean'] = numpy.mean(StrainTensor_YY[selection != 0])
output.attributes['ZZ_mean'] = numpy.mean(StrainTensor_ZZ[selection != 0])
output.attributes['XY_mean'] = numpy.mean(StrainTensor_XY[selection != 0])
output.attributes['XZ_mean'] = numpy.mean(StrainTensor_XZ[selection != 0])
output.attributes['YZ_mean'] = numpy.mean(StrainTensor_YZ[selection != 0])

Isn't 'Strain Tensor.XX' a particle_properties? But i can find  'Strain Tensor.XX'  in the properties list in the SelectExpressionModifier under graphic mode.

Support Forum / About the quaternion R in atomic strain modifiers.
« on: June 04, 2019, 10:16:12 AM »
Hi, Alex and OVITO users,
     I don't understand how the quaternion R(X, Y, Z, W)  in atomic strain modifiers is obtained from the rotation matrix, specifically, what are the physical meanings of the value of Rotation.X-W respectively? can you guys give me some imformation?


Support Forum / The DXA misjudges the burgers vector
« on: April 17, 2019, 05:18:59 AM »
Dear Alex and OVITO users,

i found the DXA sometimes misjudges the burgers vectors of dislocation segments. There is an edge dislocation line with a double super-jog in the first attached figure. This segment is painted in light green since its burgers vector is judged as 1/2[111] by DXA, right along the X-direction.

In the next scene,  this dislocation just glided forwards a little bit and without any dislocation interaction, however, the DXA judged it as a 1/2[11-1] line and painted it in brown (see the second attached figure)

The OVITO version i used is 3.0.0-dev372, but i also encountered this error with 2.9.0. By checking the information in "dislocation" table, i believe this misjudgement is due to some numerical errors: the spatial burgers vector is [2.4739,0.00,0.00] in the first figure and [2.4739,0.00,-0.00] in the next.

How can i fix this to judge the burgers vector correctly by DXA?

best regards,

Support Forum / About the FreezePropertyModifier
« on: April 11, 2019, 10:04:38 AM »
    I'm trying to do analysis on a layer of atoms, which is selectd from the 12th frame of a animation sequence
   i wrote a python script like:
node = import_file("R100401.*collisions.dat")

#select atomic layer
mod5 = SelectExpressionModifier(expression = 'Position.Y>265 || Position.Y<195 ')

modifier = FreezePropertyModifier(source_property = 'Selection',
                                  destination_property = 'Selection')

it went well but when i change the last line to "modifier.take_snapshot(12)", an error massage appears:
AttributeError: 'PyScriptAnimation.AnimationSettings' object has no attribute 'frameToTime'

what the correct syntax is?  :-[

Support Forum / Reading data file without x y z in ITEM line.
« on: November 22, 2017, 12:36:03 PM »
Hi Alex,
    I averaged the atom positions by 'fix ave/atom' command in LAMMPS to eliminate the dynamic fluctuation, and got output files with ITEM line like:
ITEM: ATOMS id type f_ave[1] f_ave[2] f_ave[3] c_eng

where f_ave[1 2 3] are the averaged atoms position in three dimensions. But Ovito can't read this because it seems only 'x y z' can be mapped to the atoms position.  Of course i can use a script to rewrite this line for all files, but that's not so convenient. It's there any more simple way to make Ovito read this kind of files?

Best regards,

Pages: [1]