pyintact API¶
- class Geometry(self: pyintact.Geometry, value: int)¶
Members:
VDB
Mesh
- Geometry.name -> str
- class Model¶
- property instance_id¶
The instance ID of the model. We enforce that this must be unique per run.
- property model_name¶
This is used for debugging purposes. It need not be filled out in general.
- projectField(self: pyintact.Model, field: Callable[[Annotated[list[float], FixedSize(3)]], pyintact.Tensor]) None¶
Sets tensors according to a user-provided callback
- Parameter
field: The field
- Parameter
- setDensities(self: pyintact.Model, densities: list[float]) None¶
Sets tensors as 1x1-dimensional data, AKA densities. This is a convenience wrapper around setTensors.
- Parameter
densities: The densities
- Parameter
- setTensors(self: pyintact.Model, tensors: list[pyintact.Tensor]) None¶
Set the tensors for all voxels.
- Parameter
tensors: The tensors for all voxels.
- Parameter
- tensor(self: pyintact.Model, id: int) pyintact.Tensor¶
Returns the tensor at the given index
- Parameter
id: The id (typically point ID) for the tensor
- Parameter
- volume(self: pyintact.Model) float¶
Returns the volume of the model
- class MeshModel(*args, **kwargs)¶
Bases:
ModelOverloaded function.
__init__(self:
pyintact.MeshModel) -> None
Construct an empty MeshModel.
__init__(self:
pyintact.MeshModel, filename: str) -> None
Load MeshModel from file.
- Parameter
filename: File must be a VTU, PLY, or STL file.
__init__(self:
pyintact.MeshModel, x: list[float], y: list[float], z: list[float], facets: list[Annotated[list[int], FixedSize(3)]]) -> None
@ brief Construct a MeshModel from vertex positions and facets
- Parameter
x: The x positions of each vertex.
- Parameter
y: The y positions of each vertex.
- Parameter
z: The z positions of each vertex.
- Parameter
facets: The facets of the mesh.
__init__(self:
pyintact.MeshModel, other:pyintact.MeshModel) -> None
Construct a MeshModel from an existing MeshModel.
- Parameter
other: A MeshModel.
- addFacet(self: pyintact.MeshModel, vertex_1: int, vertex_2: int, vertex_3: int) int¶
Add a new facet to the MeshModel.
- Parameter
vertex_1: Index of the first vertex in the facet.
- Parameter
vertex_2: Index of the second vertex in the facet.
- Parameter
vertex_3: Index of the third vertex in the facet.
- Returns:
The index of the new facet.
- Parameter
- addVertex(self: pyintact.MeshModel, vertex: Annotated[list[float], FixedSize(3)]) int¶
Add new vertex to the MeshModel.
- Parameter
vertex: The position of the vertex.
- Returns:
The index of the new vertex for use with facets.
- Parameter
- facet(self: pyintact.MeshModel, facet_index: int) Annotated[list[int], FixedSize(3)]¶
Get a specific facet.
- Parameter
facet_index: The facet identifier.
- Returns:
The facet.
- Parameter
- facetCount(self: pyintact.MeshModel) int¶
Get the number of facets in the MeshModel.
- refine(*args, **kwargs)¶
Overloaded function.
refine(self:
pyintact.MeshModel, threshold: float) -> None
Refine the input mesh, by splitting every facet edge that is larger than (threshold) * (bounding box size of mesh). Refining the input mesh increases sampling density.
- Parameter
threshold: The fraction of the bounding box size of the mesh.
refine(self:
pyintact.MeshModel) -> None
Refine the input mesh, by splitting every facet edge that is larger than 2% of bounding box size of mesh.
- vertex(self: pyintact.MeshModel, vertex_index: int) Annotated[list[float], FixedSize(3)]¶
Get a specific vertex.
- Parameter
vertex_index: The vertex identifier.
- Returns:
The vertex.
- Parameter
- vertexCount(self: pyintact.MeshModel) int¶
Get the number of vertices in the MeshModel.
- writePLY(self: pyintact.MeshModel, output_filename: str) None¶
Write the MeshModel to file in PLY format.
- Parameter
output_filename: The output filename.
- Parameter
- writeVTU(self: pyintact.MeshModel, output_filename: str) None¶
Write the MeshModel to file in VTU (VTK unstructured grid) format.
- Parameter
output_filename: The output filename.
- Parameter
- class Tensor(self: pyintact.Tensor, arg0: list[float], arg1: int, arg2: int)¶
- cols(self: pyintact.Tensor) int¶
- raw_data(self: pyintact.Tensor) list[float]¶
- rows(self: pyintact.Tensor) int¶
- class VDBModel(*args, **kwargs)¶
Bases:
ModelRepresents a model based on an openVDB volume.
Overloaded function.
__init__(self:
pyintact.VDBModel, filename: str) -> None
Load a VDBModel from a file.
- Parameter
filename: The VDB file.
__init__(self:
pyintact.VDBModel, grid: openvdb::v11_0::Grid<openvdb::v11_0::tree::Tree<openvdb::v11_0::tree::RootNode<openvdb::v11_0::tree::InternalNode<openvdb::v11_0::tree::InternalNode<openvdb::v11_0::tree::LeafNode<double, 3u>, 4u>, 5u> > > >) -> None
Construct a VDBModel an existing DoubleGrid.
- Parameter
grid: The existing DoubleGrid.
- tessellate(self: pyintact.VDBModel) pyintact.MeshModel¶
Create a mesh from the VDBModel, using the OpenVDB volumeToMesh method.
- Returns:
A
MeshModel.
- writeVDB(self: pyintact.VDBModel, filename: str) None¶
Write the VDBModel as a DoubleGrid to a VDB file.
- class MaterialDomain(*args, **kwargs)¶
Overloaded function.
__init__(self:
pyintact.MaterialDomain, model:pyintact.Model, material:pyintact.AbstractMaterialDescriptor) -> None
Construct a MaterialDomain from model and material descriptor.
- Parameter
model: The model
- Parameter
material: The material descriptor
__init__(self:
pyintact.MaterialDomain, model:pyintact.Model, material_name: str, scenario_descriptor:pyintact.AbstractScenarioDescriptor) -> None
Construct a MaterialDomain from a model, material name, and scenario descriptor.
- Parameter
model: The model
- Parameter
material_name: The material name
- Parameter
scenario_descriptor: The scenario descriptor
- class Field(self: pyintact.Field, value: int)¶
Members:
Displacement
Strain
Stress
PlasticStrain
EquivalentPlasticStrain
TopologicalSensitivity
StrainEnergyDensity
VonMisesStress
Temperature
HeatFlux
BoundaryVelocity
BoundarySensitivity
- Field.name -> str
- class GlobalQueryType(self: pyintact.GlobalQueryType, value: int)¶
Members:
Frequency
Compliance
ThermalCompliance
CriticalLoadFactor
VolumeFraction
TotalReactionForce
ReactionForce
TotalReactionMoment
TotalAppliedForce
TotalAppliedMoment
- GlobalQueryType.name -> str
- class StatisticalQueryType(self: pyintact.StatisticalQueryType, value: int)¶
Members:
Maximum
Minimum
Mean
- StatisticalQueryType.name -> str
- class Query¶
- class FieldQuery(*args, **kwargs)¶
Bases:
QueryThis class describes a query over a field. This query can be for a specific field component, or the norm of the field.
Overloaded function.
__init__(self:
pyintact.FieldQuery, *, f:pyintact.Field, norm: bool = False) -> None
- Parameter
f: The field to sample
- Parameter
norm: Whether to compute the norm of the field.
__init__(self:
pyintact.FieldQuery, *, f:pyintact.Field, scheme:pyintact.IndexScheme, norm: bool = False) -> None
- Parameter
f: The field to sample
- Parameter
scheme: The indexing scheme for the field
- Parameter
norm: Whether to compute the norm of the field.
__init__(self:
pyintact.FieldQuery, *, f:pyintact.Field, component: int) -> None
- Parameter
f: The field to sample
- Parameter
component: The field component to sample
__init__(self:
pyintact.FieldQuery, *, f:pyintact.Field, component: int, scheme:pyintact.IndexScheme) -> None
- Parameter
f: The field to sample
- Parameter
component: The field component to sample
- Parameter
scheme: The indexing scheme for the field
- class GlobalQuery(*args, **kwargs)¶
Bases:
QueryA GlobalQuery represents a query for a quantity that is valid over the simulation domain.
Overloaded function.
__init__(self:
pyintact.GlobalQuery, f:pyintact.GlobalQueryType) -> None
- Parameter
f: The global quantity to sample
__init__(self:
pyintact.GlobalQuery, f:pyintact.GlobalQueryType, scheme:pyintact.IndexScheme) -> None
- Parameter
f: The global quantity to sample
- Parameter
scheme: The indexing scheme for the query
- class StatisticalQuery(*args, **kwargs)¶
Bases:
QueryThis class describes a query for a statistic over a field. This query can be for the minimum, maximum or mean value of the field.
Overloaded function.
__init__(self:
pyintact.StatisticalQuery, *, f:pyintact.Field, s:pyintact.StatisticalQueryType, norm: bool = False) -> None
- Parameter
f: The field to sample.
- Parameter
s: The statistic to query for.
- Parameter
norm: Whether to compute the norm of the field.
__init__(self:
pyintact.StatisticalQuery, *, f:pyintact.Field, component: int, s:pyintact.StatisticalQueryType) -> None
- Parameter
f: The field to sample.
- Parameter
component: The field component to sample.
- Parameter
s: The statistic to query for.
__init__(self:
pyintact.StatisticalQuery, *, f:pyintact.Field, s:pyintact.StatisticalQueryType, scheme:pyintact.IndexScheme, norm: bool) -> None
- Parameter
f: The field to sample.
- Parameter
s: The statistic to query for.
- Parameter
scheme: The indexing scheme for the field
- Parameter
norm: Whether to compute the norm of the field.
__init__(self:
pyintact.StatisticalQuery, *, f:pyintact.Field, component: int, s:pyintact.StatisticalQueryType, scheme:pyintact.IndexScheme) -> None
- Parameter
f: The field to sample.
- Parameter
component: The field component to sample.
- Parameter
s: The statistic to query for.
- Parameter
scheme: The indexing scheme for the field
- class IndexScheme¶
- class DiscreteIndex(self: pyintact.DiscreteIndex, i: int)¶
Bases:
IndexSchemeAn index into a collection of solutions.
A
DiscreteIndexmay represent indexing into a solution that has multiple results. For example, a modal simulation that solved for five eigenvalues will have five sets of results where each result is an eigenvalue, representing the frequency, and an eigenmode, representing displacement characteristic of that vibration mode. ADiscreteIndexwould be used to separately access the first such result, the second, etc.- Parameter
i: The index.
- Parameter
- class NullIndex¶
Bases:
IndexScheme
- class VectorArray(*args, **kwargs)¶
This class represents an array of constant-sized vector data. It wraps a flat std::vector<double> for cache performance, but structures the queries so that indexing errors are unlikely.
Overloaded function.
__init__(self:
pyintact.VectorArray) -> None__init__(self:
pyintact.VectorArray, n_tuples: int, dim: int) -> None__init__(self:
pyintact.VectorArray, data: list[float], dim: int) -> None
- dimension(self: pyintact.VectorArray) int¶
- get(self: pyintact.VectorArray, index: int, component: int) float¶
Get the component at the given index.
- Parameter
index: The index
- Parameter
component: The component
- Returns:
Returns the component at the given index value.
- Parameter
- n_tuples(self: pyintact.VectorArray) int¶
Gives the number of tuples stored in this vector array.
- Returns:
The full size of the raw data divided by the vector m_dimension.
- raw_data(self: pyintact.VectorArray) list[float]¶
- class QueryResult(*args, **kwargs)¶
This class describes a query result. The buffer contains a list of scalar values, however the amount of data depends on the query type that produced it.
Overloaded function.
__init__(self:
pyintact.QueryResult, model:pyintact.MaterialDomain) -> None
Constructs a new query result over the given material domain. Note that if the underlying model is a VoxelModel, the data will be sampled at the centroids of each voxel, and the data will be persisted in the same order as the voxels themselves. Otherwise, the data will be sampled at the points of the model and persisted in the same order as the points.
__init__(self:
pyintact.QueryResult, assembly: list[pyintact.MaterialDomain]) -> None
Constructs a new query result over the given assembly. Note that if the underlying model is a VoxelModel, the data will be sampled at the centroids of each voxel, and the data will be persisted in the same order as the voxels themselves. Otherwise, the data will be sampled at the points of the model and persisted in the same order as the points.
- addData(self: pyintact.QueryResult, query: pyintact.Query, data: pyintact.VectorArray) None¶
Adds the result of computing query to this object.
- Parameter
query: The query being computed.
- Parameter
data: The data result of the query.
- Parameter
- getData(self: pyintact.QueryResult, query: pyintact.Query) pyintact.VectorArray¶
Returns the vector-valued data indexed by the given query. Note that this method can throw an error if the query data has not been precomputed. Use hasData to ensure that such data has been computed.
- Parameter
query: The query whose results are to be returned
- Returns:
The vector-valued output of the query.
- Parameter
- hasData(self: pyintact.QueryResult, query: pyintact.Query) bool¶
Determines if data exists for a given query.
- Parameter
query: The query whose results we are checking on.
- Returns:
True if data has been computed, False otherwise.
- Parameter
- writeVTK(self: pyintact.QueryResult, filename: str, unit_system: pyintact.UnitSystem) None¶
Writes a vtk file containing the results that have been stored on this object.
- Parameter
filename: The filename to write to. If it does not end in “.vtu”, the “.vtu” will be appended to the filename.
- Parameter
unit_system: The Unitsystem to use when attaching units to the sampled data.
- Parameter
- class UnitSystem(self: pyintact.UnitSystem, value: int)¶
Members:
MeterKilogramSecond
CentimeterGramSecond
MillimeterMegagramSecond
FootPoundSecond
InchPoundSecond
- UnitSystem.name -> str
- class Metadata¶
- property amr¶
Optional settings for the error-driven adaptive mesh refinement loop (AdaptiveMFEMLinearElasticity integrator only).
- property basis_order¶
The order of basis function approximation to use. We support linear (= 1) and quadratic (= 2).
- property cell_size¶
The exact simulation cell size to use.
Warning
Setting the cell_size overrides the resolution.
- property integrator_override¶
For some physics types, there may be multiple integrator implementations available. This field allows you to override the default solver.
- property max_iterations_multiplier¶
max_iterations_multiplier is used to control the maximum number of iterations of a solver from the AMG family of solvers. Use a value less than 1 to reduce the maximum number of iterations and reduce the solver runtime.
- property moment_order¶
moment_order is the order of moments computed for integration. Use lower for faster runtime, at an accuracy cost. This number must be at least 2 and can be as high as 6-7. The default is 3.
- property resolution¶
resolution is the number of finite elements to compute over. Note that Intact will only approximate the target number of cells. Either this member or the cell_size must be set, or else Intact will throw an error.
- property solver_override¶
For some integrator types, there are multiple sparse linear solvers available. Please see the user’s manual for information about the available options. The default is AMGCL_amg.
- property tolerance¶
The tolerance of the linear solver. Use a smaller tolerance for more accurate simulations and longer runtime. Use a larger tolerance for less accurate simulations and shorter runtime. Default is 1e-8.
- class ModalMetadata¶
- property desired_eigenvalues¶
The number of eigenvalues or natural frequencies to calculate.
- class BucklingMetadata¶
- property desired_eigenvalues¶
The number of eigenvalues or critical load factors to calculate.
- class LevelOptMetadata¶
- property constraints¶
A collection of optimization constraints.
- property enable_fixed_interfaces¶
Make interfaces between components a fixed part of the design domain when true, or allow these interfaces to be optimized away when false.
- property fix_thickness¶
The thickness of material that must be retained around a boundary condition or interface between components.
- property move_limit¶
Move limit for level set.
- property num_load_cases¶
The number of load cases that apply to this topology optimization scenario.
- property objective_functions¶
A mapping between load_case_id identifying a collection of boundary conditions as a load case, and the objective function used for that load case.
- property opt_max_iter¶
Maximum number of iterations.
- property output_directory¶
Directory for per-iteration optimization output.
- property smooth_iter¶
Smooth output after this number of iterations.
- property vol_frac_cons¶
Deprecated since version 2.0.2: Add an
OptimizationConstraintwith aconstraint_typeofOptimizationConstraintType::MaximumVolumeFractiontoconstraintsinstead.
- property voxelSize¶
Cell size for topology optimization level set.
- property weights¶
A mapping between load_case_id identifying a collection of boundary conditions as a load case, and the weight that load case should be given in the optimization.
- class Solver(self: pyintact.Solver, value: int)¶
Members:
AMGCL_cg : Iterative conjugate gradient solver without preconditioner.
AMGCL_ilu0_cg : Iterative conjugate gradient solver with ilu0 preconditioner.
AMGCL_damped_jacobi_cg : Iterative conjugate gradient solver with damped jacobi preconditioner.
AMGCL_amg : Iterative AMG based solver with smoothed aggregation. This is the default solver for thermal scenarios.
AMGCL_amg_rigid_body : Iterative AMG based solver with rigid body modes based coarsening. This is the default solver for linear elasticity. This solver cannot be used with thermal scenarios.
Eigen_SparseLU : Direct solver that uses LU decomposition.
MKL_PardisoLDLT : PardisoLDLT is proprietary direct solver provided by Intel through MKL. Use Intact::mklPresent() to check whether this feature is available.
MKL_PardisoLLT : PardisoLLT is proprietary direct solver provided by Intel through MKL. Use Intact::mklPresent() to check whether this feature is available.
MKL_PardisoLU : PardisoLU is proprietary direct solver provided by Intel through MKL. Use Intact::mklPresent() to check whether this feature is available.
- Solver.name -> str
- class Integrator(self: pyintact.Integrator, value: int)¶
Members:
IntactModal
IntactLinearElasticity
MPCLinearElasticity
MFEMMPCLinearElasticity
MPCStaticThermal
MFEMMPCStaticThermal
LinearBuckling
AdaptiveMFEMLinearElasticity
- Integrator.name -> str
- class AbstractBoundaryConditionDescriptor¶
- property boundary¶
The boundary where the boundary condition is applied.
- property load_case_id¶
Deprecated since version 1.1.18: Use
load_case_idsinstead, which is the identifiers of all the load cases to which a boundary condition belongs.
- property load_case_ids¶
The identifiers of all the load cases to which this boundary condition belongs.
- property units¶
The unit system. If not set, then the default value is
MeterKilogramSecond.
- class TractionDescriptor¶
- class VectorForceDescriptor(self: pyintact.VectorForceDescriptor)¶
Bases:
TractionDescriptorDescribes a vector force applied uniformly over the specified boundary.
- property direction¶
The direction of the force.
- property magnitude¶
The magnitude of the force.
- class HydrostaticForceDescriptor(self: pyintact.HydrostaticForceDescriptor)¶
Bases:
TractionDescriptorSimulates a body submerged in liquid.
- property density¶
The density of the liquid in which the body is submerged.
- property height¶
The height the liquid rises above the
z=0plane.
- class PressureForceDescriptor(self: pyintact.PressureForceDescriptor)¶
Bases:
TractionDescriptorDescribes a pressure load (force per unit area) applied normal to the boundary.
- property magnitude¶
The magnitude of the pressure load.
- class TorqueForceDescriptor(self: pyintact.TorqueForceDescriptor)¶
Bases:
TractionDescriptorDescribes a torque load applied to the boundary.
- property axis¶
The axis of rotation of the torque load.
- property magnitude¶
The magnitude of the torque load.
- property origin¶
The origin of the axis of rotation of the torque.
- class BearingForceDescriptor(self: pyintact.BearingForceDescriptor)¶
Bases:
TractionDescriptorDescribes a load at the contact between two curved surfaces. The contact pressure is not uniform. It is scaled by the angle of the contact relative to the angle of the force.
- property direction¶
The direction of the force.
- property magnitude¶
The magnitude is the total force applied over the entire surface.
- class FixedBoundaryDescriptor(self: pyintact.FixedBoundaryDescriptor)¶
Bases:
AbstractBoundaryConditionDescriptorThis class describes a fixed solution quantity (also known as a Dirichlet boundary condition). In order to set the value to fix the solution, set the
valuemember. Note that not all scenarios support inhomogeneous Dirichlet conditions.- property value¶
The value of the boundary condition.
- class FixedVectorDescriptor(self: pyintact.FixedVectorDescriptor)¶
Bases:
AbstractBoundaryConditionDescriptorDescribes a fixed vector quantity.
A fixed vector boundary condition can represent fixing displacement at some non-zero value, or it can represent partial restraints, also known as axis-aligned sliding restraints.
Displacement is a three dimensional field, and each displacement component can optionally be specified. Any axis not specified will not be restrained.
- property x_value¶
The value of the boundary condition in the x-direction.
- property y_value¶
The value of the boundary condition in the y-direction.
- property z_value¶
The value of the boundary condition in the z-direction.
- class SlidingBoundaryDescriptor(self: pyintact.SlidingBoundaryDescriptor)¶
Bases:
AbstractBoundaryConditionDescriptorDescribes a sliding boundary condition, which prevents displacement in the direction normal to the specified surface, and permits displacement tangential to the surface.
- class FlexibleRemoteLoadDescriptor(self: pyintact.FlexibleRemoteLoadDescriptor)¶
Bases:
AbstractBoundaryConditionDescriptorDescribes a remote force and moment applied at a remote point.
- property axis¶
The axis of rotation of the moment load.
- property direction¶
The direction of the force.
- property force¶
The magnitude of the force
- property moment¶
The magnitude of the moment load.
- property remote_point¶
The location where force and moment are applied.
- class ConvectionDescriptor(self: pyintact.ConvectionDescriptor)¶
Bases:
AbstractBoundaryConditionDescriptorDescribes the convective transfer of heat from a surrounding medium.
- property coefficient¶
The coefficient of convection.
- property environment_temperature¶
The temperature of the surrounding medium.
- class ConstantFluxDescriptor(self: pyintact.ConstantFluxDescriptor)¶
Bases:
AbstractBoundaryConditionDescriptorDescribes a constant flux per unit surface area.
- property magnitude¶
The magnitude of the flux.
- class AbstractInternalConditionDescriptor¶
- property instance_id¶
The instance id of the
Modelthat this internal condition is applied to. If not set, then this internal condition is applied to every instance.
- property load_case_id¶
Deprecated since version 1.1.18: Use
load_case_idsinstead, which is the identifiers of all the load cases to which an internal condition belongs.
- property load_case_ids¶
The identifiers of all the load cases to which this internal condition belongs.
- property units¶
The unit system. If not set, then the default value is
MeterKilogramSecond.
- class BodyLoadDescriptor(self: pyintact.BodyLoadDescriptor)¶
Bases:
AbstractInternalConditionDescriptorDescribes body load caused by linear acceleration.
- property direction¶
The direction of the acceleration.
- property magnitude¶
The magnitude of the acceleration.
- class RotationalLoadDescriptor(self: pyintact.RotationalLoadDescriptor)¶
Bases:
AbstractInternalConditionDescriptorDescribes a rotational load on a body.
- property angular_acceleration¶
The angular acceleration.
- property angular_velocity¶
The angular velocity.
- property axis¶
The axis of rotation of the rotational load.
- property origin¶
The origin of the axis of rotation of the rotational load.
- class ConstantHeatDescriptor(self: pyintact.ConstantHeatDescriptor)¶
Bases:
AbstractInternalConditionDescriptorDescribes the uniform generation of heat within a body.
- property magnitude¶
The magnitude of the body heat flux.
- class AbstractMaterialDescriptor¶
An abstract description of a material.
- property density¶
The material density.
- property units¶
The unit system. If not set, then the default value is
MeterKilogramSecond.
- class IsotropicMaterialDescriptor(self: pyintact.IsotropicMaterialDescriptor)¶
Bases:
AbstractMaterialDescriptorDescribes an isotropic material, which has the same behavior no matter the direction of the forces applied.
- property compressive_strength¶
The ultimate strength in compression of the material.
- property poisson_ratio¶
The Poisson ratio of the material.
- property tensile_strength¶
The ultimate strength in tension of the material.
- property yield_strength¶
The yield strength of the material.
- property youngs_modulus¶
The Young’s modulus of the material.
- class OrthotropicMaterialDescriptor(self: pyintact.OrthotropicMaterialDescriptor)¶
Bases:
AbstractMaterialDescriptor- property Ex¶
The elastic modulus in the x-direction
- property Ey¶
The elastic modulus in the y-direction
- property Ez¶
The elastic modulus in the z-direction
- property Gxy¶
The shear modulus in the xy plane.
- property Gxz¶
The shear modulus in the xz plane.
- property Gyz¶
The shear modulus in the yz plane.
- property transform¶
A transformation matrix to change the material orientation.
- property vxy¶
The poisson ratio in the xy plane.
- property vxz¶
The poisson ratio in the xz plane.
- property vyz¶
The poisson ratio in the yz plane.
- class ThermalMaterialDescriptor(self: pyintact.ThermalMaterialDescriptor)¶
Bases:
AbstractMaterialDescriptorDescribes the thermal properties of an isotropic material.
- property conductivity¶
The thermal conductivity.
- property expansion_coefficient¶
The coefficient of thermal expansion (optional).
- property specific_heat¶
The specific heat of the material.
- class AbstractScenarioDescriptor¶
- property boundary_conditions¶
The collection of boundary conditions to be applied.
- property materials¶
The mapping of a material identifier, usually the material name, to the material.
- property metadata¶
Metadata about the simulation to be performed.
- class LinearElasticScenarioDescriptor(self: pyintact.LinearElasticScenarioDescriptor)¶
Bases:
AbstractScenarioDescriptorDescribes a linear elastic scenario to be simulated.
- property internal_conditions¶
The collection of the internal conditions, such as a gravity load, to be applied.
- class ModalScenarioDescriptor(self: pyintact.ModalScenarioDescriptor)¶
Bases:
AbstractScenarioDescriptor
- class LinearBucklingScenarioDescriptor(self: pyintact.LinearBucklingScenarioDescriptor)¶
Bases:
AbstractScenarioDescriptorDescribes a linear buckling scenario to be simulated.
- property internal_conditions¶
The collection of the internal conditions, such as a gravity load, to be applied.
- class StaticThermalScenarioDescriptor(self: pyintact.StaticThermalScenarioDescriptor)¶
Bases:
AbstractScenarioDescriptor
- class LevelOptScenarioDescriptor(self: pyintact.LevelOptScenarioDescriptor)¶
Bases:
AbstractScenarioDescriptorDescribes a level set optimization.
- property internal_conditions¶
The collection of the internal conditions, such as a gravity load, to be applied.
- class Simulator¶
Generic Simulation Manager
- cellComplex(self: pyintact.Simulator) list[tuple[Annotated[list[float], FixedSize(3)], Annotated[list[float], FixedSize(3)]]]¶
Get the simulation grid.
- Returns:
A vector of pairs of points that represent the minimum and maximum of the bounding box of each cell in the simulation grid.
- cellCount(self: pyintact.Simulator) int¶
Get the number of cells in the simulation grid.
- cellSize(self: pyintact.Simulator) float¶
Get the size of each cell in the simulation grid.
- sample(*args, **kwargs)¶
Overloaded function.
sample(self:
pyintact.Simulator, query:pyintact.Query, result:pyintact.QueryResult) ->pyintact.VectorArray
Sample the given query over the domain provided.
- Parameter
query: The result to query for.
- Parameter
result: The query result.
- Returns:
The values of the query.
sample(self:
pyintact.Simulator, sample_points: list[Annotated[list[float], FixedSize(3)]], material_name: str, field_queries: list[pyintact.FieldQuery]) -> list[pyintact.VectorArray]
Sample at the given points, producing results for each query
- Parameter
sample_points: The sample points
- Parameter
material_name: Name of the material associated with points
- Parameter
field_queries: The field queries to be answered
- Returns:
The values of the field queries at the query points, in order
- solve(self: pyintact.Simulator) pyintact.SolutionStats¶
Solve the simulation that has been constructed.
- Returns:
The number of iterations performed by the solver and the error.
- writeSolution(self: pyintact.Simulator, directory: str | None = None) None¶
Write raw solution files. By default, the solution files will be written to the current directory, and will be named “solution.vtu”.
- class StressSimulator(*args, **kwargs)¶
Bases:
SimulatorSimulation Manager for Stress Scenarios
Overloaded function.
__init__(self:
pyintact.StressSimulator, assembly: list[pyintact.MaterialDomain], descriptor:pyintact.LinearElasticScenarioDescriptor) -> None
Construct a linear elastic scenario
- Parameter
assembly: A collection of MaterialDomains.
- Parameter
descriptor: A LinearElasticScenarioDescriptor that describes the simulation.
__init__(self:
pyintact.StressSimulator, assembly: list[pyintact.MaterialDomain], descriptor:pyintact.LinearElasticScenarioDescriptor, thermal_simulator:pyintact.StaticThermalSimulator) -> None
Construct a thermo linear elastic scenario
- Parameter
assembly: A collection of MaterialDomains.
- Parameter
descriptor: A LinearElasticScenarioDescriptor that describes the simulation.
- Parameter
thermal_simulator: A StaticThermalSimulator that represents a static thermal scenario.
__init__(self:
pyintact.StressSimulator, assembly: list[pyintact.MaterialDomain], descriptor:pyintact.AbstractScenarioDescriptor, solution_paths: list[str]) -> None
Construct a linear elastic scenario from an existing solution
- Parameter
assembly: A collection of MaterialDomains.
- Parameter
descriptor: A LinearElasticScenarioDescriptor that describes the simulation.
- Parameter
solution_paths: A collection of paths of existing solution files.
- displacement(self: pyintact.StressSimulator, result: pyintact.QueryResult) pyintact.VectorArray¶
Sample the displacement over the domain provided in the query result
- Parameter
result: The query result.
- Returns:
The values of the query.
- Parameter
- strain(self: pyintact.StressSimulator, result: pyintact.QueryResult) pyintact.VectorArray¶
Sample the strain over the domain provided in the query result
- Parameter
result: The query result.
- Returns:
The values of the query.
- Parameter
- stress(self: pyintact.StressSimulator, result: pyintact.QueryResult) pyintact.VectorArray¶
Sample the stress over the domain provided in the query result
- Parameter
result: The query result.
- Returns:
The values of the query.
- Parameter
- von_mises_stress(self: pyintact.StressSimulator, result: pyintact.QueryResult) pyintact.VectorArray¶
Sample the von Mises stress over the domain provided in the query result
- Parameter
result: The query result.
- Returns:
The values of the query.
- Parameter
- class ModalSimulator(*args, **kwargs)¶
Bases:
SimulatorSimulation Manager for Modal Scenarios
Overloaded function.
__init__(self:
pyintact.ModalSimulator, assembly: list[pyintact.MaterialDomain], descriptor:pyintact.ModalScenarioDescriptor) -> None
Construct a modal elastic scenario.
- Parameter
assembly: A collection of MaterialDomains.
- Parameter
descriptor: A ModalScenarioDescriptor that describes the simulation.
__init__(self:
pyintact.ModalSimulator, assembly: list[pyintact.MaterialDomain], descriptor:pyintact.AbstractScenarioDescriptor, solution_paths: list[str]) -> None
Construct a modal scenario from an existing solution
- Parameter
assembly: A collection of MaterialDomains.
- Parameter
descriptor: A ModalSimulator that describes the simulation.
- Parameter
solution_paths: A collection of paths of existing solution files.
- displacement(self: pyintact.ModalSimulator, result: pyintact.QueryResult, mode: int) pyintact.VectorArray¶
Sample the displacement over the domain provided in the query result
- Parameter
result: The query result.
- Parameter
mode: The mode to query for (the first, the second, etc.).
- Returns:
The values of the query.
- Parameter
- frequency(self: pyintact.ModalSimulator, result: pyintact.QueryResult, mode: int) pyintact.VectorArray¶
Sample the frequency for the desired mode.
- Parameter
result: The query result.
- Parameter
mode: The mode to query for (the first, the second, etc.).
- Returns:
The values of the query.
- Parameter
- class LinearBucklingSimulator(*args, **kwargs)¶
Bases:
SimulatorSimulation Manager for linear buckling scenarios
Overloaded function.
__init__(self:
pyintact.LinearBucklingSimulator, assembly: list[pyintact.MaterialDomain], descriptor:pyintact.LinearBucklingScenarioDescriptor) -> None
Construct a linear buckling scenario.
- Parameter
assembly: A collection of MaterialDomains.
- Parameter
descriptor: A LinearBucklingScenarioDescriptor that describes the simulation.
__init__(self:
pyintact.LinearBucklingSimulator, assembly: list[pyintact.MaterialDomain], descriptor:pyintact.AbstractScenarioDescriptor, solution_paths: list[str]) -> None
Construct a linear buckling scenario from an existing solution
- Parameter
assembly: A collection of MaterialDomains.
- Parameter
descriptor: A LinearBucklingSimulator that describes the simulation.
- Parameter
solution_paths: A collection of paths of existing solution files.
- class StaticThermalSimulator(*args, **kwargs)¶
Bases:
SimulatorSimulation Manager for Static Thermal Scenarios
Overloaded function.
__init__(self:
pyintact.StaticThermalSimulator, assembly: list[pyintact.MaterialDomain], descriptor:pyintact.StaticThermalScenarioDescriptor) -> None
Construct a static thermal scenario
- Parameter
assembly: A collection of MaterialDomains.
- Parameter
descriptor: A StaticThermalScenarioDescriptor that describes the simulation.
__init__(self:
pyintact.StaticThermalSimulator, assembly: list[pyintact.MaterialDomain], descriptor:pyintact.AbstractScenarioDescriptor, solution_paths: list[str]) -> None
Construct a static thermal scenario from an existing solution
- Parameter
assembly: A collection of MaterialDomains.
- Parameter
descriptor: A StaticThermalScenarioDescriptor that describes the simulation.
- Parameter
solution_paths: A collection of paths of existing solution files.
- heat_flux(self: pyintact.StaticThermalSimulator, result: pyintact.QueryResult) pyintact.VectorArray¶
Sample the heat flux over the domain provided in the query result
- Parameter
result: The query result.
- Returns:
The values of the query.
- Parameter
- temperature(self: pyintact.StaticThermalSimulator, result: pyintact.QueryResult) pyintact.VectorArray¶
Sample the temperature over the domain provided in the query result
- Parameter
result: The query result.
- Returns:
The values of the query.
- Parameter
- class LevelOpt(self: pyintact.LevelOpt, design_domain: pyintact.MaterialDomain, assembly: list[pyintact.MaterialDomain], descriptor: pyintact.LevelOptScenarioDescriptor, initial_design: pyintact.MeshModel)¶
Construct a level set-based topology optimization scenario
- Parameter
design_domain: The design domain.
- Parameter
assembly: A collection of MaterialDomains.
- Parameter
descriptor: A LevelOptScenarioDescriptor that describes the simulation and optimization.
- Parameter
initial_design: An initial design.
- getDesigns(self: pyintact.LevelOpt) list¶
Get the designs from this
LevelOpt.- Returns:
A vector of
Model, one each representing a design.
- optimize(*args, **kwargs)¶
Overloaded function.
optimize(self:
pyintact.LevelOpt) ->pyintact.SolutionStats
Perform the level set optimization.
optimize(self:
pyintact.LevelOpt, iteration_cb: Callable[[list[pyintact.LevelOptIterationInfo],pyintact.MeshModel], None]) ->pyintact.SolutionStats
Perform the level set optimization.
- Parameter
iteration_cb: A callback function
- sample(self: pyintact.LevelOpt, query: pyintact.Query) pyintact.VectorArray¶
Sample the available fields on the design domain boundary.
A
LevelOptallows sampling the design domain for the boundary velocities and sensitivities, to allow user control of modification of the design domain. The sampling points cannot be specified by the user.- Parameter
query: The query to query for.
- Returns:
The values of the query.
- Parameter
- Parameter
- class LevelOptIterationInfo¶
- property compliance¶
The compliance calculated for the current load case and design iteration
- property iteration¶
The iteration number
- property load_case¶
The load case number
- property max_displacement¶
The maximum displacement magnitude calculated for the current load case and design iteration
- property max_von_mises_stress¶
The maximum von Mises stress calculated for the current load case and design iteration
- property volume_fraction¶
The volume fraction of the original design for the current design
- class OptimizationConstraint(*args, **kwargs)¶
Overloaded function.
__init__(self:
pyintact.OptimizationConstraint) -> None__init__(self:
pyintact.OptimizationConstraint, constraint_type:pyintact.OptimizationConstraintType, target: float) -> None
- class OptimizationConstraintType(self: pyintact.OptimizationConstraintType, value: int)¶
Members:
MaximumVolumeFraction :
MaximumStress :
MinimumFrequency :
- OptimizationConstraintType.name -> str
- setupLogging(log_level: int, catch_sig: bool = True) None¶
Initialize logging
- Parameter
log_level: The max log level: 0 is info, -1 is warning, -2 is errors
- Parameter
catch_sig: Whether Intact should gracefully handle signals. For testing purposes where exit code of the program is important, set to false.
- Parameter