pyintact API¶
class Geometry(self: Geometry, value: int)
Members:
VDB
Mesh
property name
class Model
property instance_idThe instance ID of the model. We enforce that this must be unique per run.
mass(self: Model) -> float
Returns the mass of the model
property model_nameThis is used for debugging purposes. It need not be filled out in general.
projectField(self: Model, field: Callable[[Annotated[list[float], FixedSize(3)]], Intact::Tensor]) -> None
Sets tensors according to a user-provided callback
- Parameter
field:The field
setDensities(self: Model, densities: list[float]) -> None
Sets tensors as 1x1-dimensional data, AKA densities. This is a convenience wrapper around setTensors.
- Parameter
densities:The densities
setTensors(self: Model, tensors: list[Intact::Tensor]) -> None
Set the tensors for all voxels.
- Parameter
tensors:The tensors for all voxels.
tensor(self: Model, id: int) -> Intact::Tensor
Returns the tensor at the given index
- Parameter
id:The id (typically point ID) for the tensor
class MeshModel(*args, **kwargs)
Bases: Model
Overloaded function.
__init__(self: MeshModel) -> None
Construct an empty MeshModel.
__init__(self: MeshModel, other: MeshModel) -> None
Construct a MeshModel from an existing MeshModel.
- Parameter
other:A MeshModel.
__init__(self: MeshModel, filename: str) -> None
Load MeshModel from file.
- Parameter
filename:File must be a VTU, PLY, or STL file.
addFacet(self: 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.
addVertex(self: 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.
facet(self: MeshModel, facet_index: int) -> Annotated[list[int], FixedSize(3)]
Get a specific facet.
- Parameter
facet_index:The facet identifier.
- Returns:
The facet.
facetCount(self: MeshModel) -> int
Get the number of facets in the MeshModel.
refine(*args, **kwargs)
Overloaded function.
refine(self: 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: MeshModel) -> None
Refine the input mesh, by splitting every facet edge that is larger than 2% of bounding box size of mesh.
vertex(self: MeshModel, vertex_index: int) -> Annotated[list[float], FixedSize(3)]
Get a specific vertex.
- Parameter
vertex_index:The vertex identifier.
- Returns:
The vertex.
vertexCount(self: MeshModel) -> int
Get the number of vertices in the MeshModel.
writePLY(self: MeshModel, output_filename: str) -> None
Write the MeshModel to file in PLY format.
- Parameter
output_filename:The output filename.
writeVTU(self: MeshModel, output_filename: str) -> None
Write the MeshModel to file in VTU (VTK unstructured grid) format.
- Parameter
output_filename:The output filename.
class Tensor(self: Tensor, arg0: list[float], arg1: int, arg2: int)
cols(self: Tensor) -> int
raw_data(self: Tensor) -> list[float]
rows(self: Tensor) -> int
class VDBModel(*args, **kwargs)
Bases: Model
Represents a model based on an openVDB volume.
Overloaded function.
__init__(self: VDBModel, filename: str) -> None
Load a VDBModel from a file.
- Parameter
filename:The VDB file.
__init__(self: 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: VDBModel) -> `MeshModel <#MeshModel>`_
Create a mesh from the VDBModel, using the OpenVDB volumeToMesh method.
- Returns:
A
MeshModel.
class MaterialDomain(self: MaterialDomain, model: Model, material_name: str, scenario_descriptor: Intact::AbstractScenarioDescriptor)
Construct a MaterialDomain from a model, material name, and scenario descriptor. This constructor ensures the material units are consistent with scenario units and should be used.
- Parameter
model:The model
- Parameter
material_name:The material name
- Parameter
scenario_descriptor:The scenario descriptor
class Field(self: Field, value: int)
Members:
Displacement
Strain
Stress
TopologicalSensitivity
StrainEnergyDensity
VonMisesStress
Temperature
HeatFlux
BoundaryVelocity
BoundarySensitivity
property name
class GlobalQueryType(self: GlobalQueryType, value: int)
Members:
Frequency
Compliance
ThermalCompliance
CriticalLoadFactor
VolumeFraction
TotalReactionForce
ReactionForce
TotalReactionMoment
TotalAppliedForce
TotalAppliedMoment
property name
class StatisticalQueryType(self: StatisticalQueryType, value: int)
Members:
Maximum
Minimum
Mean
property name
class Query
class FieldQuery(*args, **kwargs)
Bases: Query
This 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: FieldQuery, *, f: Field, norm: bool = False) -> None
- Parameter
f:The field to sample
- Parameter
norm:Whether to compute the norm of the field.
__init__(self: FieldQuery, *, f: Field, scheme: Intact::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: FieldQuery, *, f: Field, component: int) -> None
- Parameter
f:The field to sample
- Parameter
component:The field component to sample
__init__(self: FieldQuery, *, f: Field, component: int, scheme: Intact::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: Query
A GlobalQuery represents a query for a quantity that is valid over the simulation domain.
Overloaded function.
__init__(self: GlobalQuery, arg0: GlobalQueryType) -> None
- Parameter
f:The global quantity to sample
__init__(self: GlobalQuery, arg0: GlobalQueryType, arg1: Intact::IndexScheme) -> None
- Parameter
f:The global quantity to sample
- Parameter
scheme:The indexing scheme for the query
class StatisticalQuery(*args, **kwargs)
Bases: Query
This 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: StatisticalQuery, *, f: Field, s: 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: StatisticalQuery, *, f: Field, component: int, s: StatisticalQueryType) -> None
- Parameter
f:The field to sample.
- Parameter
component:The field component to sample.
- Parameter
s:The statistic to query for.
__init__(self: StatisticalQuery, *, f: Field, s: StatisticalQueryType, scheme: Intact::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: StatisticalQuery, *, f: Field, component: int, s: StatisticalQueryType, scheme: Intact::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: DiscreteIndex, i: int)
Bases: IndexScheme
An 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.
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: VectorArray) -> None
__init__(self: VectorArray, arg0: int, arg1: int) -> None
__init__(self: VectorArray, arg0: list[float], arg1: int) -> None
dimension(self: VectorArray) -> int
get(self: 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.
n_tuples(self: 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: 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: QueryResult, model: 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: QueryResult, assembly: list[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: QueryResult, query: Query, data: 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.
getData(self: QueryResult, query: Query) -> `VectorArray <#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.
hasData(self: QueryResult, query: 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.
writeVTK(self: QueryResult, filename: str, unit_system: Intact::UnitSystemType) -> 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.
class UnitSystem(self: UnitSystem, value: int)
Members:
MeterKilogramSecond
CentimeterGramSecond
MillimeterMegagramSecond
FootPoundSecond
InchPoundSecond
property name
class Metadata
property basis_orderThe order of basis function approximation to use. We support linear (= 1) and quadratic (= 2).
property cell_sizeThe exact simulation cell size to use.
Warning: Setting the cell_size overrides the resolution.
property integrator_overrideFor some physics types, there may be multiple integrator implementations available. This field allows you to override the default solver.
property max_iterations_multipliermax_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_ordermoment_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 resolutionresolution 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_overrideFor 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 toleranceThe 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 ThermalMetadata
property environment_temperatureThe temperature of the environment.
class ModalMetadata
property desired_eigenvaluesThe number of eigenvalues or natural frequencies to calculate.
class BucklingMetadata
property desired_eigenvaluesThe number of eigenvalues or critical load factors to calculate.
class LevelOptMetadata
property enable_fixed_interfacesMake interfaces between components a fixed part of the design domain when true, or allow these interfaces to be optimized away when false.
property fix_thicknessThe thickness of material that must be retained around a boundary condition or interface between components.
property move_limitMove limit for level set.
property num_load_casesThe number of load cases that apply to this topology optimization scenario.
property opt_max_iterMaximum number of iterations.
property output_directoryDirectory for per-iteration optimization output.
property smooth_iterSmooth output after this number of iterations.
property vol_frac_consTarget volume fraction.
property voxelSizeCell size for topology optimization level set.
class Solver(self: 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.
property name
class Integrator(self: Integrator, value: int)
Members:
IntactModal
IntactLinearElasticity
MPCLinearElasticity
MFEMMPCLinearElasticity
MPCStaticThermal
MFEMMPCStaticThermal
LinearBuckling
property name
class AbstractBoundaryConditionDescriptor
property boundaryThe boundary where the boundary condition is applied.
property load_case_idThe load case to which this boundary condition belongs.
property unitsThe unit system. If not set, then the default value is
MeterKilogramSecond.
class TractionDescriptor
class VectorForceDescriptor(self: VectorForceDescriptor)
Bases: TractionDescriptor
Describes a vector force applied uniformly over the specified boundary.
property directionThe direction of the force.
property magnitudeThe magnitude of the force.
class HydrostaticForceDescriptor(self: HydrostaticForceDescriptor)
Bases: TractionDescriptor
Simulates a body submerged in liquid.
property densityThe density of the liquid in which the body is submerged.
property heightThe height the liquid rises above the
z=0plane.
class PressureForceDescriptor(self: PressureForceDescriptor)
Bases: TractionDescriptor
Describes a pressure load (force per unit area) applied normal to the boundary.
property magnitudeThe magnitude of the pressure load.
class TorqueForceDescriptor(self: TorqueForceDescriptor)
Bases: TractionDescriptor
Describes a torque load applied to the boundary.
property axisThe axis of rotation of the torque load.
property magnitudeThe magnitude of the torque load.
property originThe origin of the axis of rotation of the torque.
class BearingForceDescriptor(self: BearingForceDescriptor)
Bases: TractionDescriptor
Describes 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 directionThe direction of the force.
property magnitudeThe magnitude is the total force applied over the entire surface.
class FixedBoundaryDescriptor(self: FixedBoundaryDescriptor)
Bases: AbstractBoundaryConditionDescriptor
This 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 valueThe value of the boundary condition.
class FixedVectorDescriptor(self: FixedVectorDescriptor)
Bases: AbstractBoundaryConditionDescriptor
Describes 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_valueThe value of the boundary condition in the x-direction.
property y_valueThe value of the boundary condition in the y-direction.
property z_valueThe value of the boundary condition in the z-direction.
class SlidingBoundaryDescriptor(self: SlidingBoundaryDescriptor)
Bases: AbstractBoundaryConditionDescriptor
Describes 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: FlexibleRemoteLoadDescriptor)
Bases: AbstractBoundaryConditionDescriptor
Describes a remote force and moment applied at a remote point.
property axisThe axis of rotation of the moment load.
property directionThe direction of the force.
property forceThe magnitude of the force
property momentThe magnitude of the moment load.
property remote_pointThe location where force and moment are applied.
class ConvectionDescriptor(self: ConvectionDescriptor)
Bases: AbstractBoundaryConditionDescriptor
Describes the convective transfer of heat from a surrounding medium.
property coefficientThe coefficient of convection.
property environment_temperatureThe temperature of the surrounding medium.
class ConstantFluxDescriptor(self: ConstantFluxDescriptor)
Bases: AbstractBoundaryConditionDescriptor
Describes a constant flux per unit surface area.
property magnitudeThe magnitude of the flux.
class AbstractInternalConditionDescriptor
property instance_idThe 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_idThe load case to which this internal condition belongs.
property unitsThe unit system. If not set, then the default value is
MeterKilogramSecond.
class BodyLoadDescriptor(self: BodyLoadDescriptor)
Bases: AbstractInternalConditionDescriptor
Describes body load caused by linear acceleration.
property directionThe direction of the acceleration.
property magnitudeThe magnitude of the acceleration.
class RotationalLoadDescriptor(self: RotationalLoadDescriptor)
Bases: AbstractInternalConditionDescriptor
Describes a rotational load on a body.
property angular_accelerationThe angular acceleration.
property angular_velocityThe angular velocity.
property axisThe axis of rotation of the rotational load.
property originThe origin of the axis of rotation of the rotational load.
class ConstantHeatDescriptor(self: ConstantHeatDescriptor)
Bases: AbstractInternalConditionDescriptor
Describes the uniform generation of heat within a body.
property magnitudeThe magnitude of the body heat flux.
class AbstractMaterialDescriptor
An abstract description of a material.
property densityThe material density.
property unitsThe unit system. If not set, then the default value is
MeterKilogramSecond.
class IsotropicMaterialDescriptor(self: IsotropicMaterialDescriptor)
Bases: AbstractMaterialDescriptor
Describes an isotropic material, which has the same behavior no matter the direction of the forces applied.
property compressive_strengthThe ultimate strength in compression of the material.
property poisson_ratioThe Poisson ratio of the material.
property tensile_strengthThe ultimate strength in tension of the material.
property yield_strengthThe yield strength of the material.
property youngs_modulusThe Young’s modulus of the material.
class OrthotropicMaterialDescriptor(self: OrthotropicMaterialDescriptor)
Bases: AbstractMaterialDescriptor
property ExThe elastic modulus in the x-direction
property EyThe elastic modulus in the y-direction
property EzThe elastic modulus in the z-direction
property GxyThe shear modulus in the xy plane.
property GxzThe shear modulus in the xz plane.
property GyzThe shear modulus in the yz plane.
property transformA transformation matrix to change the material orientation.
property vxyThe poisson ratio in the xy plane.
property vxzThe poisson ratio in the xz plane.
property vyzThe poisson ratio in the yz plane.
class ThermalMaterialDescriptor(self: ThermalMaterialDescriptor)
Bases: AbstractMaterialDescriptor
Describes the thermal properties of an isotropic material.
property conductivityThe thermal conductivity.
property expansion_coefficientThe coefficient of thermal expansion (optional).
property specific_heatThe specific heat of the material.
class AbstractScenarioDescriptor
property boundary_conditionsThe collection of boundary conditions to be applied.
property materialsThe mapping of a material identifier, usually the material name, to the material.
property metadataMetadata about the simulation to be performed.
class LinearElasticScenarioDescriptor(self: LinearElasticScenarioDescriptor)
Bases: AbstractScenarioDescriptor
Describes a linear elastic scenario to be simulated.
property internal_conditionsThe collection of the internal conditions, such as a gravity load, to be applied.
class ModalScenarioDescriptor(self: ModalScenarioDescriptor)
Bases: AbstractScenarioDescriptor
class LinearBucklingScenarioDescriptor(self: LinearBucklingScenarioDescriptor)
Bases: AbstractScenarioDescriptor
Describes a linear buckling scenario to be simulated.
property internal_conditionsThe collection of the internal conditions, such as a gravity load, to be applied.
class StaticThermalScenarioDescriptor(self: StaticThermalScenarioDescriptor)
Bases: AbstractScenarioDescriptor
class LevelOptScenarioDescriptor(self: LevelOptScenarioDescriptor)
Bases: AbstractScenarioDescriptor
Describes a level set optimization.
property internal_conditionsThe collection of the internal conditions, such as a gravity load, to be applied.
class Simulator
Generic Simulation Manager
cellComplex(self: 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: Simulator) -> int
Get the number of cells in the simulation grid.
cellSize(self: Simulator) -> float
Get the size of each cell in the simulation grid.
sample(*args, **kwargs)
Overloaded function.
sample(self: Simulator, query: Query, result: QueryResult) -> 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: Simulator, sample_points: list[Annotated[list[float], FixedSize(3)]], material_name: str, field_queries: list[FieldQuery]) -> list[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: Simulator) -> SolutionStats
Solve the simulation that has been constructed.
- Returns:
The number of iterations performed by the solver and the error.
class StressSimulator(*args, **kwargs)
Bases: Simulator
Simulation Manager for Stress Scenarios
Overloaded function.
__init__(self: StressSimulator, assembly: list[MaterialDomain], descriptor: LinearElasticScenarioDescriptor) -> None
Construct a linear elastic scenario
- Parameter
assembly:A collection of MaterialDomains.
- Parameter
descriptor:A LinearElasticScenarioDescriptor that describes the simulation.
__init__(self: StressSimulator, assembly: list[MaterialDomain], descriptor: LinearElasticScenarioDescriptor, thermal_simulator: Intact::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.
class ModalSimulator(self: ModalSimulator, assembly: list[MaterialDomain], descriptor: ModalScenarioDescriptor)
Bases: Simulator
Simulation Manager for Modal Scenarios
Construct a modal elastic scenario.
- Parameter
assembly:A collection of MaterialDomains.
- Parameter
descriptor:A ModalScenarioDescriptor that describes the simulation.
class LinearBucklingSimulator(self: LinearBucklingSimulator, assembly: list[MaterialDomain], descriptor: LinearBucklingScenarioDescriptor)
Bases: Simulator
Simulation Manager for linear buckling scenarios
Construct a linear buckling scenario.
- Parameter
assembly:A collection of MaterialDomains.
- Parameter
descriptor:A LinearBucklingScenarioDescriptor that describes the simulation.
class StaticThermalSimulator(self: StaticThermalSimulator, assembly: list[MaterialDomain], descriptor: StaticThermalScenarioDescriptor)
Bases: Simulator
Simulation Manager for Static Thermal Scenarios
Construct a static thermal scenario
- Parameter
assembly:A collection of MaterialDomains.
- Parameter
descriptor:A StaticThermalScenarioDescriptor that describes the simulation.
class LevelOpt(self: LevelOpt, design_domain: MaterialDomain, assembly: list[MaterialDomain], descriptor: LevelOptScenarioDescriptor, initial_design: 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: LevelOpt) -> list[`MeshModel <#MeshModel>`_]
Get the designs from this
LevelOpt.
- Returns:
A vector of
MeshModel, one each representing a design.optimize(*args, **kwargs)
Overloaded function.
optimize(self: LevelOpt) -> SolutionStats
Perform the level set optimization.
optimize(self: LevelOpt, iteration_cb: Callable[[list[LevelOptIterationInfo], MeshModel], None]) -> SolutionStats
Perform the level set optimization.
- Parameter
iteration_cb:A callback function
sample(self: LevelOpt, query: Query) -> `VectorArray <#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.
class LevelOptIterationInfo
property complianceThe compliance calculated for the current load case and design iteration
property iterationThe iteration number
property load_caseThe load case number
property max_displacementThe maximum displacement magnitude calculated for the current load case and design iteration
property max_von_mises_stressThe maximum von Mises stress calculated for the current load case and design iteration
property volume_fractionThe volume fraction of the original design for the current design
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.
addLogFile(arg0: str, arg1: int) -> None
Adds a log file. Note: you must call setupLogging before calling this function
- Parameter
filename:The (relative) filename.
- Parameter
log_level:The max log level: 0 is info, -1 is warning, -2 is errors