How To: Units, Geometry, & Materials¶
Units¶
The default Unit System is MKS or MeterKilogramSecond. We allow the following customizations:
Specify custom unit for geometry through the
Scenariounit (default MKS)Specify custom unit for loads (default MKS)
Specify custom unit for materials (default MKS)
Unit System Keywords |
Mass |
Force |
Stress |
Length |
Temperature |
Energy |
|---|---|---|---|---|---|---|
MeterKilogramSecond |
kg |
N |
Pa |
m |
K |
J |
CentimeterGramSecond |
g |
dyne |
dyne/cm² |
cm |
K |
dyne·cm |
MillimeterMegagramSecond |
Mg |
N |
MPa |
mm |
K |
mJ |
FootPoundSecond |
slug |
lbf |
lbf/ft² |
ft |
Ra |
lbf·ft |
InchPoundSecond |
lbf s²/in (slinch) |
lbf |
psi |
in |
Ra |
lbf·in |
Geometry¶
Geometry is specified through a Model object.
MeshModel created from a surface mesh can be defined in two ways:
By specifying a
filenameto define mesh from a file (STL, PLY)
auto mesh_geometry = Intact::MeshModel("beam.stl");
mesh_geometry.instance_id = "beam";
By constructing mesh face-by-face
// define an empty mesh
auto mesh_geometry = Intact::MeshModel();
mesh_geometry.instance_id = "fixed_boundary";
// add vertices to the mesh and get the vertex id as output
auto v0 = mesh_geometry.addVertex({0.0, 0.0, 0.0});
auto v1 = mesh_geometry.addVertex({1.0, 0.0, 0.0});
auto v2 = mesh_geometry.addVertex({0.0, 1.0, 0.0});
// add faces defined by the vertex id
mesh_geometry.addFacet(v0, v1, v2);
Meshes can be refined, usually for finer interpolation of results during
visualization, using the MeshModel::refine method with refinement_level
argument. refinement_level is the largest allowed triangle edge as a
ratio of the bounding box diagonal.
// mesh geometry created above is further refined
mesh_geometry.refine(0.02);
Structural Material Properties¶
IsotropicMaterialDescriptorto create an Isotropic material. (Unit system isMeterKilogramSecond)densityis the material densityyoungs_modulusis the elastic moduluspoisson_ratiois the Poisson ratio
auto steel_structural = std::make_shared<Intact::IsotropicMaterialDescriptor>(); // Set the density to 7845 kg/m^3, modulus to 200 GPa and poison ratio to 0.29 steel_structural->density = 7845 steel_structural->youngs_modulus = 200e9 steel_structural->poisson_ratio = 0.29
OrthotropicMaterialDescriptorto create an Orthotropic material. Orthotropic materials are often used to represent composites and wood, where the material properties along one axis are significantly different from the properties along the other axes. (Unit system isMeterKilogramSecond)densityis the material densityExis the elastic modulus in the material’s x-directionEyis the elastic modulus in the material’s y-directionEzis the elastic modulus in the material’s z-directionGxyis the shear modulus in the xy planeGxzis the shear modulus in the xz planeGyzis the shear modulus in the yz planevxyis the poisson ratio in the xy planevxzis the poisson ratio in the xx planevyzis the poisson ratio in the yz planetransformis the optional material transform to arbitrarily rotate the axes along which the material properties are defined. Specified as a list of 9 floating point numbers corresponding to a 3x3 matrix. Note the first 3 floating point numbers corresponds to the first row.
// Create an orthotropic material (Red Pine) auto material = std::make_shared<Intact::OrthotropicMaterialDescriptor>(); material->density = 460.0; // kg/m³ material->Ex = 11.2e9; // Pa material->Ey = 492.8e6; // Pa material->Ez = 985.6e6; // Pa material->Gxy = 907.2e6; // Pa material->Gxz = 1.08e9; // Pa material->Gyz = 123.2e6; // Pa material->vxy = 0.315; material->vxz = 0.347; material->vyz = 0.308; material->transform = {1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0} // transform is optional
Thermal Material Properties¶
ThermalMaterialDescriptorto create a thermal material. (Unit system isMeterKilogramSecond)densityis the material densityconductivityis the conductivity of the materialspecific_heatis the specific heat of the material
auto thermal_material = std::make_shared<Intact::ThermalMaterialDescriptor>(); // Set the density, conductivity, and specific heat of the material thermal_material->density = 2700.0; // kg/m^3 thermal_material->conductivity = 170; // W/(m·K) thermal_material->specific_heat = 500; // J/(kg·K)
Component and Assembly¶
A Component is created as a
MaterialDomainand takes three inputsA
Modelobject (MeshModelspecifically)A material name
A
ScenarioDescriptorobject (see Simulation Setup)
auto bar1_structural = Intact::MaterialDomain(mesh_geometry, "Steel", structural_scenario); auto bar2_structural = Intact::MaterialDomain(mesh_geometry, "Red Pine", structural_scenario);
Assembly is a
std::vectorof components that are bonded togetherIntact::Assembly structural_assembly = {bar1_structural, bar2_structural};