How To: Simulation Scenarios

Simulation Setup

  • Scenario Setup using ScenarioDescriptor

    • Linear Elasticity scenario is created using LinearElasticScenarioDescriptor. It takes the following inputs:

      • boundary_conditions, a list of boundary conditions

      • internal_conditions, a list of internal conditions (body loads)

    • Scenario Metadata, metadata, a set of solver parameters to control the accuracy and speed of the simulation:

      • resolution is the target number of finite elements. An iterative process determines a cell_size that achieves approximately the specified number of elements. You can directly specify the cell_size instead of resolution. Note that decreasing cell_size can quickly result in large numbers of finite elements and long solve times. resolution is recommended for most cases.

      • units sets the unit of the scenario (geometry and results will be in this unit) for example, a geometry in ‘MKS’ that is 6 m long would be 6 mm long when set to ‘MMS’

      • basis_order is the type of finite element used. The default is 1, which would be linear elements. 2 is for quadratic elements.

      • solver_type is the solver type used in the simulation with the following options:

        • MKL_PardisoLDLT (default) is the direct solver and is typically faster for lower resolution (< 200K cells on 32 GB memory), but gets slower and consumes more memory at higher resolutions

        • AMGCL_amg_rigid_body is the iterative solver which is typically faster at high resolution.

      Intact::LinearElasticScenarioDescriptor scenario;
      scenario.materials = {{"Aluminum 6061-T6": material}};
      scenario.boundary_conditions = {fixed_boundary, vector_load, torque_load};
      scenario.internal_conditions = {body_load};
      
      scenario.metadata.resolution = 10000;
      scenario.metadata.units = Intact::UnitSystem::MeterKilogramSecond;
      
      // Optional settings
      scenario.metadata.basis_order = 2; // 2 = quadratic elements
      scenario.metadata.solver_override = Intact::SolverType::AMGCL_amg_rigid_body; // iterative solver
      
    • Similarly, Modal scenario is created using ModalScenarioDescriptor which takes boundary_conditions, a list of boundary conditions, as input.

      • The metadata is the same as for the linear elastic scenario except there is necessary input metadata.desired_eigenvalues that takes in an integer for the number of eigenvalues.

      // Setup the modal simulation scenario
      Intact::ModalScenarioDescriptor modal_scenario;
      modal_scenario.materials = {{"Aluminum 6061-T6": material}};
      modal_scenario.boundary_conditions = {fixed_boundary};
      
      modal_scenario.metadata.resolution = 10000;
      modal_scenario.modal_metadata.desired_eigenvalues = 10;
      
      // Optional settings
      modal_scenario.metadata.basis_order = 2; // 2 = quadratic elements
      modal_scenario.metadata.solver_override = Intact::SolverType::AMGCL_amg_rigid_body; // iterative solver
      
    • Similarly, Linear Buckling scenario is created using LinearBucklingScenarioDescriptor which takes boundary_conditions, a list of boundary conditions, as input.

      • The metadata is the same as for the linear elastic scenario except there is necessary input buckling_metadata.desired_eigenvalues that takes in an integer for the number of eigenvalues. Typically, the number of desired eigenvalues is small, less than 5. A linear buckling scenario first performs a linear elasticity simulation, and then solves a generalized eigenvalue problem to determine the critical load factors.

      // Setup the linear buckling simulation scenario
      Intact::LinearBucklingScenarioDescriptor buckling_scenario;
      buckling_scenario.materials = {{"Aluminum 6061-T6": material}};
      buckling_scenario.boundary_conditions = {fixed_boundary, vector_load};
      
      buckling_scenario.metadata.resolution = 10000;
      buckling_scenario.buckling_metadata.desired_eigenvalues = 10;
      
      // Optional settings
      buckling_scenario.metadata.basis_order = 1; // linear elements
      buckling_scenario.metadata.solver_override = Intact::SolverType::AMGCL_amg_rigid_body; // iterative solver
      
    • Similarly, a thermal scenario is created using StaticThermalScenarioDescriptor which takes a list of boundary_conditions and a list of internal_conditions as input. Note that the material must be a thermal material for this scenario type.

      • The metadata is the same as for the linear elastic scenario with additional input metadata.environment_temperature which specifies the temperature of the environment.

      // Setup the thermal simulation scenario
      StaticThermalScenarioDescriptor thermal_scenario;
      thermal_scenario.materials = {{"Aluminum 6061-T6": material}};
      thermal_scenario.boundary_conditions = {fixed_temp, convection};
      thermal_scenario.internal_conditions = {constant_heat};
      thermal_scenario.thermal_metadata.environment_temperature = 300.0;
      
      thermal_scenario.metadata.resolution = 10000;
      
      // Optional settings
      thermal_scenario.metadata.basis_order = 2; // 2 = quadratic elements
      thermal_scenario.metadata.solver_override = Intact::SolverType::AMGCL_amg; // iterative solver for thermal scenarios.
      
    • A thermoelasticity scenario is created by creating a StaticThermalScenarioDescriptor, solving the static thermal scenario using a StaticThermalSimulator, then creating a LinearElasticScenarioDescriptor and solving the thermoelasticity scenario using a StressSimulator that takes a StaticThermalSimulator argument, as shown in the following snippet:

        static const int RESOLUTION = 10000;
        // Setup the thermal simulation scenario
        StaticThermalScenarioDescriptor thermal_scenario;
        thermal_scenario.materials = {{"Aluminum 6061-T6": material}};
        thermal_scenario.boundary_conditions = {fixed_temp, convection};
        thermal_scenario.internal_conditions = {constant_heat};
        thermal_scenario.thermal_metadata.environment_temperature = 300.0;
    
        thermal_scenario.metadata.resolution = RESOLUTION;
    
        // Solve the static thermal scenario
        Intact::StaticThermalSimulator thermal_simulator = StaticThermalSimulator(assembly, thermal_scenario);
        thermal_simulator.solve();
    
        // Set up the elastic scenario
        Intact::LinearElasticScenarioDescriptor scenario;
        scenario.materials = {{"Aluminum 6061-T6": material}};
        scenario.boundary_conditions = {fixed_boundary, vector_load, torque_load};
        scenario.internal_conditions = {body_load};
    
        scenario.metadata.resolution = RESOLUTION;
    
        // Solve the thermoelasticity scenario
        Intact::StressSimulator simulator = StressSimulator(assembly, scenario, thermal_simulator);
        simulator.solve();
    

    For best results, the thermal scenario resolution should be the same or less than the stress scenario resolution. Using the same resolution ensures that the thermal fields are defined every where the stress simulation will be performed.

Simulation Solution

  • Stress Simulation is created using StressSimulator. It takes the following inputs:

    • An assembly or the list of MaterialDomains

    • LinearElasticScenarioDescriptor that describes the simulation scenario

    // Initialize and run the linear elastic scenario
    Intact::StressSimulator simulator = StressSimulator(assembly, scenario);
    simulator.solve();
    
  • Modal Simulation is created using ModalSimulator. It takes the following inputs:

    • An assembly or the list of MaterialDomains

    • ModalScenarioDescriptor that describes the simulation scenario

    // Initialize and run the modal scenario
    Intact::ModalSimulator modal_simulator = ModalSimulator(assembly, modal_scenario);
    modal_simulator.solve();
    
  • Linear Buckling Simulation is created using LinearBucklingSimulator. It takes the following inputs:

    • An assembly or the list of MaterialDomains

    • LinearBucklingScenarioDescriptor that describes the simulation scenario

    // Initialize and run the linear buckling scenario
    Intact::LinearBucklingSimulator buckling_simulator = LinearBucklingSimulator(assembly, buckling_scenario);
    buckling_simulator.solve();
    
  • Static Thermal Simulation is created using StaticThermalSimulator. It takes the following inputs:

    • An assembly or the list of MaterialDomains

    • StaticThermalScenarioDescriptor that describes the simulation scenario

    // Initialize and run the static thermal scenario
    Intact::StaticThermalSimulator thermal_simulator = StaticThermalSimulator(assembly, thermal_scenario);
    thermal_simulator.solve();