upxo.dclasses.features module

Created on Thu Jun 27 08:06:19 2024

@author: Dr. Sunil Anandatheertha

class upxo.dclasses.features.twingen(vf: float, tmin: float, tmean: float, tmax: float, tdis: str, tvalues: list, allow_partial: bool, partial_prob: float)[source]

Bases: object

Twin-generation specification (volume fraction and thickness stats).

Dataclass of target twin volume fraction and thickness distribution controls used by 2D/3D twinning workflows. Thickness may follow a named distribution (tdis) or an explicit user list (tvalues).

Example

>>> from upxo.dclasses.features import twingen
>>> tg = twingen(vf=0.2, tmin=0.2, tmean=0.5, tmax=1.0,
...              tdis='user', tvalues=[0.2, 0.5, 1.0, 0.75],
...              allow_partial=True, partial_prob=0.2)
vf

Target twin volume fraction.

Type:

float

tmin, tmean, tmax

Thickness bounds / mean for the twin lamella distribution.

Type:

float

tdis

Distribution name, or 'user' to use tvalues.

Type:

str

tvalues

Explicit thickness samples when tdis='user'.

Type:

list

allow_partial

Whether partial twins (truncated at grain bounds) are allowed.

Type:

bool

partial_prob

Probability of partial-twin placement when allowed.

Type:

float

vf: float
tmin: float
tmean: float
tmax: float
tdis: str
tvalues: list
allow_partial: bool
partial_prob: float