The microstructure_3d.py module#

Summary#

Microstructure3DInput

Provides input parameters for 3D microstructure simulation.

Microstructure3DSummary

Provides the summary of a 3D microstructure simulation.

Description#

Provides input and result summary containers for microstructure 3D simulations.

Module detail#

class microstructure_3d.Microstructure3DInput(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, calculate_initial_microstructure: bool = DEFAULT_RUN_INITIAL_MICROSTRUCTURE, use_transient_bulk_nucleation: bool = DEFAULT_USE_TRANSIENT_BULK_NUCLEATION, max_bulk_nucleation_density: int = DEFAULT_MAX_NUCLEATION_DENSITY_BULK, num_initial_random_nuclei: int = DEFAULT_NUMBER_OF_RANDOM_NUCLEI, machine: ansys.additive.core.machine.AdditiveMachine = AdditiveMachine(), material: ansys.additive.core.material.AdditiveMaterial = AdditiveMaterial())#

Provides input parameters for 3D microstructure simulation.

Units are SI (m, kg, s, K) unless otherwise noted.

Warning

Beta Features Disclaimer

  • 3D microstructure simulation is a beta feature and requires enable_beta_features=True when creating the Additive client.

  • Beta features are considered unreleased and have not been fully tested nor fully validated. The results are not guaranteed by Ansys, Inc. (Ansys) to be correct. You assume the risk of using beta features.

  • At its discretion, Ansys may release, change, or withdraw beta features in future revisions.

  • Beta features are not subject to the Ansys Class 3 error reporting system. Ansys makes no commitment to resolve defects reported against beta features; however, your feedback will help us improve the quality of the product.

  • Ansys does not guarantee that database and/or input files used with beta features will run successfully from version to version of the software, nor with the final released version of the features. You may need to modify the database and/or input files before running them on other versions.

  • Documentation for beta features is called beta documentation, and it may not be written to the same standard as documentation for released features. Beta documentation may not be complete at the time of product release. At its discretion, Ansys may add, change, or delete beta documentation at any time.

Overview#

id

User-provided ID for the simulation.

machine

Machine-related parameters.

material

Material used during simulation.

sample_min_x

Minimum x coordinate of the geometry sample (m).

sample_min_y

Minimum y coordinate of the geometry sample (m).

sample_min_z

Minimum z coordinate of the geometry sample (m).

sample_size_x

Size of the geometry sample in the x direction (m).

sample_size_y

Size of the geometry sample in the y direction (m).

sample_size_z

Size of the geometry sample in the z direction (m).

calculate_initial_microstructure

Flag indicating if the initial microstructure conditions solver is to run.

use_transient_bulk_nucleation

Flag indicating if nucleation is allowed in the bulk region of the meltpool.

max_bulk_nucleation_density

Maximum nucleation density in the bulk (grains/m^3).

num_initial_random_nuclei

Number of random nuclei to use for the microstructure initial conditions.

DEFAULT_POSITION_COORDINATE

Default X, Y, Z, position coordinate (m).

MIN_POSITION_COORDINATE

Minimum X, Y, Z, position coordinate (m).

MAX_POSITION_COORDINATE

Maximum X, Y, Z, position coordinate (m).

DEFAULT_SAMPLE_SIZE

Default sample size in each dimension (m).

MIN_SAMPLE_SIZE

Minimum sample size in each dimension (m).

MAX_SAMPLE_SIZE

Maximum sample size in each dimension (m).

DEFAULT_RUN_INITIAL_MICROSTRUCTURE

Default flag value indicating whether to run the initial microstructure conditions solver.

DEFAULT_USE_TRANSIENT_BULK_NUCLEATION

Default flag value indicating whether to use transient bulk nucleation rather than initial microstructure conditions.

DEFAULT_NUMBER_OF_RANDOM_NUCLEI

Default number of random nuclei to use in the initial microstructure conditions solver.

DEFAULT_MAX_NUCLEATION_DENSITY_BULK

Default maximum nucleation density in the bulk (grains/m^3).

Import detail#

from ansys.additive.core.microstructure_3d import Microstructure3DInput

Property detail#

property Microstructure3DInput.id: str#

User-provided ID for the simulation.

property Microstructure3DInput.machine#

Machine-related parameters.

property Microstructure3DInput.material#

Material used during simulation.

property Microstructure3DInput.sample_min_x: float#

Minimum x coordinate of the geometry sample (m).

Valid values are from the MIN_POSITION_COORDINATE value to the MAX_POSITION_COORDINATE value.

property Microstructure3DInput.sample_min_y: float#

Minimum y coordinate of the geometry sample (m).

Valid values are from the MIN_POSITION_COORDINATE value to the MAX_POSITION_COORDINATE value.

property Microstructure3DInput.sample_min_z: float#

Minimum z coordinate of the geometry sample (m).

Valid values are from the MIN_POSITION_COORDINATE value to the MAX_POSITION_COORDINATE value.

property Microstructure3DInput.sample_size_x: float#

Size of the geometry sample in the x direction (m).

Valid values are from the MIN_SAMPLE_SIZE value to the MAX_SAMPLE_SIZE value.

property Microstructure3DInput.sample_size_y: float#

Size of the geometry sample in the y direction (m).

Valid values are from the MIN_SAMPLE_SIZE value to the MAX_SAMPLE_SIZE value.

property Microstructure3DInput.sample_size_z: float#

Size of the geometry sample in the z direction (m).

Valid values are from the MIN_SAMPLE_SIZE value to the MAX_SAMPLE_SIZE value.

property Microstructure3DInput.calculate_initial_microstructure: bool#

Flag indicating if the initial microstructure conditions solver is to run.

If True, initial condition grain identifiers and Euler angles are calculated. If False, the initial microstructure conditions solver is not be run.

property Microstructure3DInput.use_transient_bulk_nucleation: bool#

Flag indicating if nucleation is allowed in the bulk region of the meltpool.

Nucleation rate is controlled by bulk nucleation density. If True, bulk nucleation is enabled. if False, bulk nucleation is disabled.

property Microstructure3DInput.max_bulk_nucleation_density: int#

Maximum nucleation density in the bulk (grains/m^3).

If use_transient_bulk_nucleation=False, this value is ignored.

property Microstructure3DInput.num_initial_random_nuclei: int#

Number of random nuclei to use for the microstructure initial conditions.

This value is used by the initial microstructure conditions solver. If use_transient_bulk_nucleation=True, this value is ignored.

Attribute detail#

Microstructure3DInput.DEFAULT_POSITION_COORDINATE = 0#

Default X, Y, Z, position coordinate (m).

Microstructure3DInput.MIN_POSITION_COORDINATE = 0#

Minimum X, Y, Z, position coordinate (m).

Microstructure3DInput.MAX_POSITION_COORDINATE = 10#

Maximum X, Y, Z, position coordinate (m).

Microstructure3DInput.DEFAULT_SAMPLE_SIZE = 0.0001#

Default sample size in each dimension (m).

Microstructure3DInput.MIN_SAMPLE_SIZE = 1.5e-05#

Minimum sample size in each dimension (m).

Microstructure3DInput.MAX_SAMPLE_SIZE = 0.0005#

Maximum sample size in each dimension (m).

Microstructure3DInput.DEFAULT_RUN_INITIAL_MICROSTRUCTURE = True#

Default flag value indicating whether to run the initial microstructure conditions solver.

Microstructure3DInput.DEFAULT_USE_TRANSIENT_BULK_NUCLEATION = True#

Default flag value indicating whether to use transient bulk nucleation rather than initial microstructure conditions.

Microstructure3DInput.DEFAULT_NUMBER_OF_RANDOM_NUCLEI = 8000#

Default number of random nuclei to use in the initial microstructure conditions solver.

Microstructure3DInput.DEFAULT_MAX_NUCLEATION_DENSITY_BULK#

Default maximum nucleation density in the bulk (grains/m^3).

class Microstructure3DInput.Microstructure3DSummary(input: Microstructure3DInput, result: ansys.api.additive.v0.additive_domain_pb2.Microstructure3DResult, user_data_path: str)#

Provides the summary of a 3D microstructure simulation.

Overview#

input

Simulation input.

grain_3d_vtk

Path to the VTK file containing the 3D grain structure data.

xy_average_grain_size

Average grain size (ยตm) for the XY plane.

xz_average_grain_size

Average grain size (ยตm) for the XZ plane.

yz_average_grain_size

Average grain size (ยตm) for the YZ plane.

Import detail#

from ansys.additive.core.microstructure_3d import Microstructure3DSummary

Property detail#

property Microstructure3DSummary.input#

Simulation input.

For more information, see the Microstructure3DInput class.

property Microstructure3DSummary.grain_3d_vtk: str#

Path to the VTK file containing the 3D grain structure data.

The VTK file contains these scalar data setsโ€ GrainNumber, Phi0_(deg), Phi1_(deg), Phi2_(deg), and Temperatures.

property Microstructure3DSummary.xy_average_grain_size: float#

Average grain size (ยตm) for the XY plane.

property Microstructure3DSummary.xz_average_grain_size: float#

Average grain size (ยตm) for the XZ plane.

property Microstructure3DSummary.yz_average_grain_size: float#

Average grain size (ยตm) for the YZ plane.