The microstructure.py
module#
Summary#
Provides input parameters for microstructure simulation. |
|
|
Provides column names for the circle equivalence data frame. |
|
Provides the summary of a microstructure simulation. |
Description#
Provides input and result summary containers for microstructure simulations.
Module detail#
- class microstructure.MicrostructureInput(id: str = '', *, sample_min_x: float = DEFAULT_POSITION_COORDINATE, sample_min_y: float = DEFAULT_POSITION_COORDINATE, sample_min_z: float = DEFAULT_POSITION_COORDINATE, sample_size_x: float = DEFAULT_SAMPLE_SIZE, sample_size_y: float = DEFAULT_SAMPLE_SIZE, sample_size_z: float = DEFAULT_SAMPLE_SIZE, sensor_dimension: float = DEFAULT_SENSOR_DIMENSION, use_provided_thermal_parameters: bool = DEFAULT_USE_PROVIDED_THERMAL_PARAMETERS, cooling_rate: float = DEFAULT_COOLING_RATE, thermal_gradient: float = DEFAULT_THERMAL_GRADIENT, melt_pool_width: float = DEFAULT_MELT_POOL_WIDTH, melt_pool_depth: float = DEFAULT_MELT_POOL_DEPTH, random_seed: int = DEFAULT_RANDOM_SEED, machine: ansys.additive.core.machine.AdditiveMachine = AdditiveMachine(), material: ansys.additive.core.material.AdditiveMaterial = AdditiveMaterial())#
Provides input parameters for microstructure simulation.
Units are SI (m, kg, s, K) unless otherwise noted.
Overview#
User-provided ID for this simulation. |
|
Machine-related parameters. |
|
Material used during simulation. |
|
Minimum x coordinate of the geometry sample (m). |
|
Minimum y coordinate of the geometry sample (m). |
|
Minimum z coordinate of the geometry sample (m). |
|
Size of the geometry sample in the x direction (m). |
|
Size of the geometry sample in the y direction (m). |
|
Size of the geometry sample in the z direction (m). |
|
Dimension of the sensor (m). |
|
Flag indicating if the |
|
Material cooling rate (K/s). |
|
Material thermal gradient (K/m). |
|
Melt pool width (m). |
|
Melt pool depth (m). |
|
Random seed for the simulation. |
Default X, Y, Z, position coordinate (m). |
|
Minimum X, Y, Z, position coordinate (m). |
|
Maximum X, Y, Z, position coordinate (m). |
|
Default sample size in each dimension (m). |
|
Minimum sample size in each dimension (m). |
|
Maximum sample size in each dimension (m). |
|
Default sensor dimension (m). |
|
Minimum sensor dimension (m). |
|
Maximum sensor dimension (m). |
|
Minimum cushion between sensor dimension and sample size in the X and Y dimensions (m). |
|
Minimum cushion between sensor dimension and sample size in the Z dimension (m). |
|
Default flag value indicating whether to use user-provided thermal parameters. |
|
Default cooling rate (K/s). |
|
Minimum cooling rate (K/s). |
|
Maximum cooling rate (K/s). |
|
Default thermal gradient (K/m). |
|
Minimum thermal gradient (K/m). |
|
Maximum thermal gradient (K/m). |
|
Default melt pool width (m). |
|
Minimum melt pool width (m). |
|
Maximum melt pool width (m). |
|
Default melt pool depth (m). |
|
Minimum melt pool depth (m). |
|
Maximum melt pool depth (m). |
|
The default random seed, which indicates that a random seed was not provided. |
|
Minimum random seed. |
|
Maximum random seed. |
Import detail#
from ansys.additive.core.microstructure import MicrostructureInput
Property detail#
- property MicrostructureInput.machine#
Machine-related parameters.
- property MicrostructureInput.material#
Material used during simulation.
- property MicrostructureInput.sample_min_x: float#
Minimum x coordinate of the geometry sample (m).
Valid values are from the
MIN_POSITION_COORDINATE
value to theMAX_POSITION_COORDINATE
value.
- property MicrostructureInput.sample_min_y: float#
Minimum y coordinate of the geometry sample (m).
Valid values are from the
MIN_POSITION_COORDINATE
value to theMAX_POSITION_COORDINATE
value.
- property MicrostructureInput.sample_min_z: float#
Minimum z coordinate of the geometry sample (m).
Valid values are from the
MIN_POSITION_COORDINATE
value to theMAX_POSITION_COORDINATE
value.
- property MicrostructureInput.sample_size_x: float#
Size of the geometry sample in the x direction (m).
Valid values are from the
MIN_SAMPLE_SIZE
value to theMAX_SAMPLE_SIZE
value. When setting the```sample_size_x`` parameter, the value must be greater than thesensor_dimension
value plus theMIN_XY_SIZE_CUSHION
value.
- property MicrostructureInput.sample_size_y: float#
Size of the geometry sample in the y direction (m).
Valid values are from the
MIN_SAMPLE_SIZE
value to theMAX_SAMPLE_SIZE
value. When setting thesample_size_y
parameter, the value must be greater than thesensor_dimension
value plus theMIN_XY_SIZE_CUSHION
value.
- property MicrostructureInput.sample_size_z: float#
Size of the geometry sample in the z direction (m).
Valid values are from the
MIN_SAMPLE_SIZE
value to theMAX_SAMPLE_SIZE
value. When setting thesample_size_y
parameter, the value must be greater than thesensor_dimension
value plus theMIN_XY_SIZE_CUSHION
value.
- property MicrostructureInput.sensor_dimension: float#
Dimension of the sensor (m).
Valid values are from the
MIN_SENSOR_DIMENSION
value to theMAX_SENSOR_DIMENSION
value.
- property MicrostructureInput.use_provided_thermal_parameters: bool#
Flag indicating if the
cooling_rate
,thermal_gradient
,melt_pool_depth
, andmelt_pool_width
parameters have been provided by the user.If the value is
False
, these values will be calculated. Default isFalse
.
- property MicrostructureInput.cooling_rate: float#
Material cooling rate (K/s).
Valid values are from the
MIN_COOLING_RATE
value to theMAX_COOLING_RATE
value.
- property MicrostructureInput.thermal_gradient: float#
Material thermal gradient (K/m).
Valid values are from the
MIN_THERMAL_GRADIENT
value to theMAX_THERMAL_GRADIENT
value.
- property MicrostructureInput.melt_pool_width: float#
Melt pool width (m).
This is the width of the melt pool measured at the top of the powder layer.
Valid values are from the
MIN_MELT_POOL_WIDTH
value to theMAX_MELT_POOL_WIDTH
value.
- property MicrostructureInput.melt_pool_depth: float#
Melt pool depth (m).
This is the depth of the melt pool as measured from the top of the powder layer.
Valid values are from the
MIN_MELT_POOL_DEPTH
value to theMAX_MELT_POOL_DEPTH
value.
- property MicrostructureInput.random_seed: int#
Random seed for the simulation.
Valid values are from the
MIN_RANDOM_SEED
value to theMAX_RANDOM_SEED
value.
Attribute detail#
- MicrostructureInput.DEFAULT_POSITION_COORDINATE = 0#
Default X, Y, Z, position coordinate (m).
- MicrostructureInput.MIN_POSITION_COORDINATE = 0#
Minimum X, Y, Z, position coordinate (m).
- MicrostructureInput.MAX_POSITION_COORDINATE = 10#
Maximum X, Y, Z, position coordinate (m).
- MicrostructureInput.DEFAULT_SAMPLE_SIZE = 0.0015#
Default sample size in each dimension (m).
- MicrostructureInput.MIN_SAMPLE_SIZE = 0.001#
Minimum sample size in each dimension (m).
- MicrostructureInput.MAX_SAMPLE_SIZE = 0.01#
Maximum sample size in each dimension (m).
- MicrostructureInput.DEFAULT_SENSOR_DIMENSION = 0.0005#
Default sensor dimension (m).
- MicrostructureInput.MIN_SENSOR_DIMENSION = 0.0001#
Minimum sensor dimension (m).
- MicrostructureInput.MAX_SENSOR_DIMENSION = 0.001#
Maximum sensor dimension (m).
- MicrostructureInput.MIN_XY_SIZE_CUSHION = 0.0005#
Minimum cushion between sensor dimension and sample size in the X and Y dimensions (m).
- MicrostructureInput.MIN_Z_SIZE_CUSHION = 0.001#
Minimum cushion between sensor dimension and sample size in the Z dimension (m).
- MicrostructureInput.DEFAULT_USE_PROVIDED_THERMAL_PARAMETERS = False#
Default flag value indicating whether to use user-provided thermal parameters.
- MicrostructureInput.DEFAULT_COOLING_RATE = 1000000.0#
Default cooling rate (K/s).
- MicrostructureInput.MIN_COOLING_RATE = 100000.0#
Minimum cooling rate (K/s).
- MicrostructureInput.MAX_COOLING_RATE = 10000000.0#
Maximum cooling rate (K/s).
- MicrostructureInput.DEFAULT_THERMAL_GRADIENT = 10000000.0#
Default thermal gradient (K/m).
- MicrostructureInput.MIN_THERMAL_GRADIENT = 100000.0#
Minimum thermal gradient (K/m).
- MicrostructureInput.MAX_THERMAL_GRADIENT = 100000000.0#
Maximum thermal gradient (K/m).
- MicrostructureInput.DEFAULT_MELT_POOL_WIDTH = 0.00015#
Default melt pool width (m).
- MicrostructureInput.MIN_MELT_POOL_WIDTH = 7.5e-05#
Minimum melt pool width (m).
- MicrostructureInput.MAX_MELT_POOL_WIDTH = 0.0008#
Maximum melt pool width (m).
- MicrostructureInput.DEFAULT_MELT_POOL_DEPTH = 0.0001#
Default melt pool depth (m).
- MicrostructureInput.MIN_MELT_POOL_DEPTH = 1.5e-05#
Minimum melt pool depth (m).
- MicrostructureInput.MAX_MELT_POOL_DEPTH = 0.0008#
Maximum melt pool depth (m).
- MicrostructureInput.DEFAULT_RANDOM_SEED = 0#
The default random seed, which indicates that a random seed was not provided.
- MicrostructureInput.MIN_RANDOM_SEED = 1#
Minimum random seed.
- MicrostructureInput.MAX_RANDOM_SEED#
Maximum random seed.
- class MicrostructureInput.CircleEquivalenceColumnNames#
Provides column names for the circle equivalence data frame.
Overview#
Grain number. |
|
Area fraction for grain. |
|
Grain diameter (ยตm). |
|
Orientation angle (degrees). |
Import detail#
from ansys.additive.core.microstructure import CircleEquivalenceColumnNames
Attribute detail#
- CircleEquivalenceColumnNames.GRAIN_NUMBER = 'grain_number'#
Grain number.
- CircleEquivalenceColumnNames.AREA_FRACTION = 'area_fraction'#
Area fraction for grain.
- CircleEquivalenceColumnNames.DIAMETER = 'diameter_um'#
Grain diameter (ยตm).
- CircleEquivalenceColumnNames.ORIENTATION_ANGLE = 'orientation_angle'#
Orientation angle (degrees).
- class CircleEquivalenceColumnNames.MicrostructureSummary(input: MicrostructureInput, result: ansys.api.additive.v0.additive_domain_pb2.MicrostructureResult, user_data_path: str)#
Provides the summary of a microstructure simulation.
Overview#
Simulation input. |
|
Path to the VTK file containing the 2D grain structure data in the XY plane. |
|
Path to the VTK file containing the 2D grain structure data in the XZ plane. |
|
Path to the VTK file containing the 2D grain structure data in the YZ plane. |
|
Circle equivalence data for the XY plane. |
|
Circle equivalence data for the XZ plane. |
|
Circle equivalence data for the YZ plane. |
|
Average grain size (ยตm) for the XY plane. |
|
Average grain size (ยตm) for the XZ plane. |
|
Average grain size (ยตm) for the YZ plane. |
Import detail#
from ansys.additive.core.microstructure import MicrostructureSummary
Property detail#
- property MicrostructureSummary.input#
Simulation input.
For more information, see the
MicrostructureInput
class.
- property MicrostructureSummary.xy_vtk: str#
Path to the VTK file containing the 2D grain structure data in the XY plane.
The VTK file contains these scalar data sets:
GrainBoundaries
,Orientation_(deg)
, andGrainNumber
.
- property MicrostructureSummary.xz_vtk: str#
Path to the VTK file containing the 2D grain structure data in the XZ plane.
The VTK file contains these scalar data sets:
GrainBoundaries
,Orientation_(deg)
, andGrainNumber
.
- property MicrostructureSummary.yz_vtk: str#
Path to the VTK file containing the 2D grain structure data in the YZ plane.
The VTK file contains these scalar data sets:
GrainBoundaries
,Orientation_(deg)
, andGrainNumber
.
- property MicrostructureSummary.xy_circle_equivalence: pandas.DataFrame#
Circle equivalence data for the XY plane.
For data frame column names, see the
CircleEquivalenceColumnNames
class.
- property MicrostructureSummary.xz_circle_equivalence: pandas.DataFrame#
Circle equivalence data for the XZ plane.
For data frame column names, see the
CircleEquivalenceColumnNames
class.
- property MicrostructureSummary.yz_circle_equivalence: pandas.DataFrame#
Circle equivalence data for the YZ plane.
For data frame column names, see the
CircleEquivalenceColumnNames
class.
- property MicrostructureSummary.xy_average_grain_size: float#
Average grain size (ยตm) for the XY plane.