diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 81208842f..d481cdc19 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -73,6 +73,8 @@ jobs: # if other containers must be tested. run: | docker pull ghcr.io/ansys/pydpf-composites:${{ env.CONTAINER_TAG }} + docker pull ghcr.io/ansys/pydpf-composites:2024r1_pre0 + docker pull ghcr.io/ansys/pydpf-composites:2024r1 docker pull ghcr.io/ansys/pydpf-composites:2023r2_pre1 - name: "Checkout the project" diff --git a/examples/008_assembly_example.py b/examples/008_assembly_example.py index 3f67eaf44..7723ee3b0 100644 --- a/examples/008_assembly_example.py +++ b/examples/008_assembly_example.py @@ -22,7 +22,11 @@ from ansys.dpf.composites.constants import FailureOutput from ansys.dpf.composites.example_helper import get_continuous_fiber_example_files from ansys.dpf.composites.failure_criteria import CombinedFailureCriterion, MaxStressCriterion -from ansys.dpf.composites.server_helpers import connect_to_or_start_server, version_older_than +from ansys.dpf.composites.server_helpers import ( + connect_to_or_start_server, + version_equal_or_later, + version_older_than, +) # %% # Start a DPF server and copy the example files into the current working directory. @@ -47,11 +51,22 @@ # %% # Plot IRF # ~~~~~~~~ -# Plot the maximum IRF per element. +# Plot the maximum IRF per (solid) element. output_all_elements = composite_model.evaluate_failure_criteria(combined_criterion=combined_fc) irf_field = output_all_elements.get_field({"failure_label": FailureOutput.FAILURE_VALUE}) irf_field.plot() +# %% +# Plot IRF +# ~~~~~~~~ +# Plot the maximum IRF on the reference surface +if version_equal_or_later(server, "8.0"): + irf_field = output_all_elements.get_field( + {"failure_label": FailureOutput.FAILURE_VALUE_REF_SURFACE} + ) + irf_field.plot() + + # %% # Get element information # ~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/src/ansys/dpf/composites/_composite_model_impl.py b/src/ansys/dpf/composites/_composite_model_impl.py index dc6c0acb0..d7eae2e3e 100644 --- a/src/ansys/dpf/composites/_composite_model_impl.py +++ b/src/ansys/dpf/composites/_composite_model_impl.py @@ -11,6 +11,7 @@ from numpy.typing import NDArray from .composite_scope import CompositeScope +from .constants import FAILURE_LABEL, REF_SURFACE_NAME, TIME_LABEL, FailureOutput from .data_sources import ( CompositeDataSources, ContinuousFiberCompositesFiles, @@ -24,11 +25,18 @@ add_layup_info_to_mesh, get_element_info_provider, ) +from .layup_info._reference_surface import ( + _get_map_to_reference_surface_operator, + _get_reference_surface_and_mapping_field, +) from .layup_info.material_operators import MaterialOperators, get_material_operators from .layup_info.material_properties import MaterialProperty, get_constant_property_dict from .result_definition import FailureMeasureEnum from .sampling_point import SamplingPointNew -from .server_helpers import upload_continuous_fiber_composite_files_to_server +from .server_helpers import ( + upload_continuous_fiber_composite_files_to_server, + version_equal_or_later, +) from .unit_system import get_unit_system @@ -50,6 +58,66 @@ def inner(*args: Sequence[Any], **kwargs: Sequence[Any]) -> Any: return inner +def _merge_containers( + non_ref_surface_container: FieldsContainer, ref_surface_container: FieldsContainer +) -> FieldsContainer: + """ + Merge the results fields container. + + Merges the results fields container of the non-reference surface and the reference surface. + """ + assert sorted(non_ref_surface_container.labels) == sorted(ref_surface_container.labels) + + ref_surface_time_ids = ref_surface_container.get_available_ids_for_label(TIME_LABEL) + non_ref_surface_time_ids = non_ref_surface_container.get_available_ids_for_label(TIME_LABEL) + + assert sorted(ref_surface_time_ids) == sorted(non_ref_surface_time_ids) + + out_container = dpf.FieldsContainer() + out_container.labels = [TIME_LABEL, FAILURE_LABEL] + out_container.time_freq_support = non_ref_surface_container.time_freq_support + + def add_to_output_container(time_id: int, source_container: FieldsContainer) -> None: + fields = source_container.get_fields({TIME_LABEL: time_id}) + for field in fields: + failure_enum = _get_failure_enum_from_name(field.name) + out_container.add_field({TIME_LABEL: time_id, FAILURE_LABEL: failure_enum}, field) + + for current_time_id in ref_surface_time_ids: + add_to_output_container(current_time_id, ref_surface_container) + add_to_output_container(current_time_id, non_ref_surface_container) + + return out_container + + +def _get_failure_enum_from_name(name: str) -> FailureOutput: + if name.startswith("Failure Mode"): + if name.endswith(REF_SURFACE_NAME): + return FailureOutput.FAILURE_MODE_REF_SURFACE + else: + return FailureOutput.FAILURE_MODE + + if name.startswith("IRF") or name.startswith("SF") or name.startswith("SM"): + if name.endswith(REF_SURFACE_NAME): + return FailureOutput.FAILURE_VALUE_REF_SURFACE + else: + return FailureOutput.FAILURE_VALUE + + if name.startswith("Layer Index"): + return FailureOutput.MAX_LAYER_INDEX + + if name.startswith("Global Layer in Stack"): + return FailureOutput.MAX_GLOBAL_LAYER_IN_STACK + + if name.startswith("Local Layer in Element"): + return FailureOutput.MAX_LOCAL_LAYER_IN_ELEMENT + + if name.startswith("Solid Element Id"): + return FailureOutput.MAX_SOLID_ELEMENT_ID + + raise RuntimeError("Could not determine failure output from name: " + name) + + class CompositeModelImpl: """Provides access to the basic composite postprocessing functionality. @@ -108,6 +176,16 @@ def __init__( unit_system=self._unit_system, ) + if version_equal_or_later(self._server, "8.0"): + self._reference_surface_and_mapping_field = _get_reference_surface_and_mapping_field( + data_sources=self.data_sources.composite, unit_system=self._unit_system + ) + + self._map_to_reference_surface_operator = _get_map_to_reference_surface_operator( + reference_surface_and_mapping_field=self._reference_surface_and_mapping_field, + element_layer_indices_field=self.get_mesh().property_field("element_layer_indices"), + ) + self._element_info_provider = get_element_info_provider( mesh=self.get_mesh(), stream_provider_or_data_source=self._get_rst_streams_provider(), @@ -270,7 +348,7 @@ def evaluate_failure_criteria( scope_config_reader_op.inputs.ply_ids(selected_plies_op.outputs.strings) # configure operator to chunk the scope - chunking_data_tree = dpf.DataTree({"max_chunk_size": 50000}) + chunking_data_tree = dpf.DataTree({"max_chunk_size": max_chunk_size}) if ns_in: chunking_data_tree.add({"named_selections": ns_in}) @@ -380,10 +458,29 @@ def evaluate_failure_criteria( "No output is generated! Please check the scope (element and ply ids)." ) - if measure == FailureMeasureEnum.INVERSE_RESERVE_FACTOR: - return max_merger.outputs.merged_fields_container() + if version_equal_or_later(self._server, "8.0"): + self._map_to_reference_surface_operator.inputs.min_container( + min_merger.outputs.merged_fields_container() + ) + self._map_to_reference_surface_operator.inputs.max_container( + max_merger.outputs.merged_fields_container() + ) + + if measure == FailureMeasureEnum.INVERSE_RESERVE_FACTOR: + return _merge_containers( + max_merger.outputs.merged_fields_container(), + self._map_to_reference_surface_operator.outputs.max_container(), + ) + else: + return _merge_containers( + min_merger.outputs.merged_fields_container(), + self._map_to_reference_surface_operator.outputs.min_container(), + ) else: - return min_merger.outputs.merged_fields_container() + if measure == FailureMeasureEnum.INVERSE_RESERVE_FACTOR: + return max_merger.outputs.merged_fields_container() + else: + return min_merger.outputs.merged_fields_container() @_deprecated_composite_definition_label def get_sampling_point( diff --git a/src/ansys/dpf/composites/_composite_model_impl_2023r2.py b/src/ansys/dpf/composites/_composite_model_impl_2023r2.py index 9af9e6db2..aac48f719 100644 --- a/src/ansys/dpf/composites/_composite_model_impl_2023r2.py +++ b/src/ansys/dpf/composites/_composite_model_impl_2023r2.py @@ -225,6 +225,7 @@ def evaluate_failure_criteria( composite_scope: Optional[CompositeScope] = None, measure: FailureMeasureEnum = FailureMeasureEnum.INVERSE_RESERVE_FACTOR, write_data_for_full_element_scope: bool = True, + max_chunk_size: int = 50000, ) -> FieldsContainer: """Get a fields container with the evaluated failure criteria. @@ -249,6 +250,8 @@ def evaluate_failure_criteria( part of ``composite_scope.plies``. If no element scope is specified (``composite_scope.elements``), a (potentially zero) failure value is written for all elements. + max_chunk_size: + A higher value results in more memory consumption, but faster evaluation. .. note:: diff --git a/src/ansys/dpf/composites/composite_model.py b/src/ansys/dpf/composites/composite_model.py index c369601d4..0573e16d3 100644 --- a/src/ansys/dpf/composites/composite_model.py +++ b/src/ansys/dpf/composites/composite_model.py @@ -147,6 +147,7 @@ def evaluate_failure_criteria( composite_scope: Optional[CompositeScope] = None, measure: FailureMeasureEnum = FailureMeasureEnum.INVERSE_RESERVE_FACTOR, write_data_for_full_element_scope: bool = True, + max_chunk_size: int = 50000, ) -> FieldsContainer: """Get a fields container with the evaluated failure criteria. @@ -171,6 +172,8 @@ def evaluate_failure_criteria( part of ``composite_scope.plies``. If no element scope is specified (``composite_scope.elements``), a (potentially zero) failure value is written for all elements. + max_chunk_size: + A higher value results in more memory consumption, but faster evaluation. .. note:: @@ -179,7 +182,11 @@ def evaluate_failure_criteria( """ return self._implementation.evaluate_failure_criteria( - combined_criterion, composite_scope, measure, write_data_for_full_element_scope + combined_criterion, + composite_scope, + measure, + write_data_for_full_element_scope, + max_chunk_size, ) def get_sampling_point( diff --git a/src/ansys/dpf/composites/constants.py b/src/ansys/dpf/composites/constants.py index 11f59abef..e7d8f7205 100644 --- a/src/ansys/dpf/composites/constants.py +++ b/src/ansys/dpf/composites/constants.py @@ -1,8 +1,17 @@ """Collection of constants used across PyDPF Composites.""" - from enum import IntEnum -__all__ = ("Spot", "Sym3x3TensorComponent", "FailureOutput") +__all__ = ( + "Spot", + "Sym3x3TensorComponent", + "FailureOutput", + "REF_SURFACE_NAME", + "FAILURE_LABEL", + "TIME_LABEL", +) + +FAILURE_LABEL = "failure_label" +TIME_LABEL = "time" class Spot(IntEnum): @@ -33,3 +42,11 @@ class FailureOutput(IntEnum): FAILURE_MODE = 0 FAILURE_VALUE = 1 MAX_LAYER_INDEX = 2 + FAILURE_MODE_REF_SURFACE = 3 + FAILURE_VALUE_REF_SURFACE = 4 + MAX_GLOBAL_LAYER_IN_STACK = 5 + MAX_LOCAL_LAYER_IN_ELEMENT = 6 + MAX_SOLID_ELEMENT_ID = 7 + + +REF_SURFACE_NAME = "Reference Surface" diff --git a/src/ansys/dpf/composites/layup_info/_reference_surface.py b/src/ansys/dpf/composites/layup_info/_reference_surface.py new file mode 100644 index 000000000..e0a8eec58 --- /dev/null +++ b/src/ansys/dpf/composites/layup_info/_reference_surface.py @@ -0,0 +1,36 @@ +from dataclasses import dataclass + +from ansys.dpf.core import DataSources, Field, Operator, PropertyField + +from ansys.dpf.composites.unit_system import UnitSystemProvider + + +@dataclass(frozen=True) +class _ReferenceSurfaceMeshAndMappingField: + mesh: Field + mapping_field: Field + + +def _get_reference_surface_and_mapping_field( + data_sources: DataSources, unit_system: UnitSystemProvider +) -> _ReferenceSurfaceMeshAndMappingField: + ref_surface_operator = Operator("composite::reference_surface_operator") + ref_surface_operator.inputs.data_sources.connect(data_sources) + ref_surface_operator.inputs.unit_system.connect(unit_system) + return _ReferenceSurfaceMeshAndMappingField( + mesh=ref_surface_operator.outputs.mesh(), + mapping_field=ref_surface_operator.outputs.mapping_field(), + ) + + +def _get_map_to_reference_surface_operator( + reference_surface_and_mapping_field: _ReferenceSurfaceMeshAndMappingField, + element_layer_indices_field: PropertyField, +) -> Operator: + map_to_reference_surface_operator = Operator("composite::map_to_reference_surface_operator") + map_to_reference_surface_operator.inputs.mapping_field.connect( + reference_surface_and_mapping_field.mapping_field + ) + map_to_reference_surface_operator.inputs.mesh.connect(reference_surface_and_mapping_field.mesh) + map_to_reference_surface_operator.inputs.layers_per_element.connect(element_layer_indices_field) + return map_to_reference_surface_operator diff --git a/src/ansys/dpf/composites/server_helpers/_versions.py b/src/ansys/dpf/composites/server_helpers/_versions.py index 0f5542f6c..79a6d9035 100644 --- a/src/ansys/dpf/composites/server_helpers/_versions.py +++ b/src/ansys/dpf/composites/server_helpers/_versions.py @@ -13,7 +13,9 @@ class _DpfVersionInfo: _DPF_VERSIONS: dict[str, _DpfVersionInfo] = { "5.0": _DpfVersionInfo("5.0", "2023 R1", "Initial release of DPF Composites."), - "7.0": _DpfVersionInfo("7.0", "2024 R1", "DPF Composites plugin with sub-operators."), + "7.0": _DpfVersionInfo("7.0", "2024 R1 pre 0", "DPF Composites plugin with sub-operators."), + "7.1": _DpfVersionInfo("7.1", "2024 R1", "Layer index starts at 1. Material names."), + "8.0": _DpfVersionInfo("8.0", "2024 R2 pre 0", "Reference surface support"), } diff --git a/tests/composite_model_test.py b/tests/composite_model_test.py index 421ba9f5b..329f2972b 100644 --- a/tests/composite_model_test.py +++ b/tests/composite_model_test.py @@ -4,13 +4,17 @@ import pytest from ansys.dpf.composites.composite_model import CompositeModel, CompositeScope -from ansys.dpf.composites.constants import FailureOutput +from ansys.dpf.composites.constants import FAILURE_LABEL, FailureOutput from ansys.dpf.composites.data_sources import ( CompositeDefinitionFiles, ContinuousFiberCompositesFiles, get_composite_files_from_workbench_result_folder, ) -from ansys.dpf.composites.failure_criteria import CombinedFailureCriterion, MaxStressCriterion +from ansys.dpf.composites.failure_criteria import ( + CombinedFailureCriterion, + FailureModeEnum, + MaxStressCriterion, +) from ansys.dpf.composites.layup_info import LayerProperty, get_analysis_ply_index_to_name_map from ansys.dpf.composites.layup_info.material_properties import MaterialProperty from ansys.dpf.composites.result_definition import FailureMeasureEnum @@ -83,7 +87,7 @@ def test_basic_functionality_of_composite_model(dpf_server, data_files, distribu assert [ply["id"] for ply in sampling_point.analysis_plies] == analysis_ply_ids - if version_equal_or_later(dpf_server, "7.0"): + if version_equal_or_later(dpf_server, "7.1"): ref_material_names = [ "Epoxy Carbon UD (230 GPa) Prepreg", "Epoxy Carbon Woven (230 GPa) Wet", @@ -100,6 +104,51 @@ def test_basic_functionality_of_composite_model(dpf_server, data_files, distribu timer.summary() +def test_model_with_multiple_timesteps(dpf_server): + TEST_DATA_ROOT_DIR = ( + pathlib.Path(__file__).parent / "data" / "workflow_example" / "multiple_time_steps" + ) + + data_files = get_composite_files_from_workbench_result_folder(TEST_DATA_ROOT_DIR) + + composite_model = CompositeModel(data_files, server=dpf_server) + + combined_failure_criterion = CombinedFailureCriterion( + "max stress", failure_criteria=[MaxStressCriterion()] + ) + + expected_data_by_time_index = { + 0: {1: 1.47927903, 2: 1.47927903, 3: 1.3673715, 4: 1.3673715}, + 1: {1: 0.09834992, 2: 0.09834992, 3: 0.06173922, 4: 0.06173922}, + } + + for time_index, time in enumerate(composite_model.get_result_times_or_frequencies()): + failure_output = composite_model.evaluate_failure_criteria( + combined_criterion=combined_failure_criterion, + composite_scope=CompositeScope(time=time), + ) + + # Note evaluate_failure_criteria supports only a single time step + irf_field = failure_output.get_field({FAILURE_LABEL: FailureOutput.FAILURE_VALUE}) + + for element_id, expected_value in expected_data_by_time_index[time_index].items(): + assert irf_field.get_entity_data_by_id(element_id) == pytest.approx(expected_value) + + # Just check that the other fields are available + def check_field_size(failure_label: FailureOutput): + field = failure_output.get_field({FAILURE_LABEL: failure_label}) + assert len(field.scoping.ids) == 4 + + check_field_size(FailureOutput.FAILURE_MODE) + check_field_size(FailureOutput.MAX_LAYER_INDEX) + + if version_equal_or_later(dpf_server, "8.0"): + check_field_size(FailureOutput.FAILURE_MODE_REF_SURFACE) + check_field_size(FailureOutput.MAX_GLOBAL_LAYER_IN_STACK) + check_field_size(FailureOutput.MAX_LOCAL_LAYER_IN_ELEMENT) + check_field_size(FailureOutput.MAX_SOLID_ELEMENT_ID) + + def test_assembly_model(dpf_server): """Verify the handling of assemblies.""" @@ -127,6 +176,12 @@ def test_assembly_model(dpf_server): ) timer.add("After get failure output") + + def check_output(failure_label: FailureOutput, expected_output: dict[int, float]): + for element_id, expected_value in expected_output.items(): + failure_field = failure_output.get_field({FAILURE_LABEL: failure_label}) + assert failure_field.get_entity_data_by_id(element_id) == pytest.approx(expected_value) + expected_output = { 1: 1.11311715, 2: 1.11311715, @@ -137,9 +192,72 @@ def test_assembly_model(dpf_server): 9: 0.62122959, 10: 0.62122959, } + check_output(FailureOutput.FAILURE_VALUE, expected_output) + + expected_modes = { + 1: FailureModeEnum.s1t.value, + 2: FailureModeEnum.s1t.value, + 5: FailureModeEnum.s2t.value, + 6: FailureModeEnum.s2t.value, + 7: FailureModeEnum.na.value, + 8: FailureModeEnum.na.value, + 9: FailureModeEnum.s2t.value, + 10: FailureModeEnum.s2t.value, + } + check_output(FailureOutput.FAILURE_MODE, expected_modes) + + expected_layer_index = { + 1: 2, + 2: 2, + 5: 2, + 6: 2, + 7: 1, + 8: 1, + 9: 1, + 10: 1, + } + + if not version_equal_or_later(dpf_server, "7.1"): + for element_id in expected_layer_index: + # Older versions of the server returned a layer index that starts + # at 0 instead of 1 + expected_layer_index[element_id] -= 1 + + check_output(FailureOutput.MAX_LAYER_INDEX, expected_layer_index) + + expected_output_ref_surface = { + 1: 1.85777034, + 2: 1.85777034, + 3: 1.11311715, + 4: 1.11311715, + } - for element_id, expected_value in expected_output.items(): - assert failure_output[1].get_entity_data_by_id(element_id) == pytest.approx(expected_value) + if version_equal_or_later(dpf_server, "8.0"): + check_output(FailureOutput.FAILURE_VALUE_REF_SURFACE, expected_output_ref_surface) + + expected_output_local_layer = { + 1: 2, + 2: 2, + 3: 2, + 4: 2, + } + check_output(FailureOutput.MAX_LOCAL_LAYER_IN_ELEMENT, expected_output_local_layer) + + expected_output_global_layer = { + 1: 2, + 2: 2, + 3: 2, + 4: 2, + } + check_output(FailureOutput.MAX_GLOBAL_LAYER_IN_STACK, expected_output_global_layer) + + expected_output_solid_element = { + 1: 5, + 2: 6, + 3: 1, + 4: 2, + } + check_output(FailureOutput.MAX_SOLID_ELEMENT_ID, expected_output_solid_element) property_dict = composite_model.get_constant_property_dict( [MaterialProperty.Stress_Limits_Xt], composite_definition_label=solid_label diff --git a/tests/data/workflow_example/multiple_time_steps/MatML.xml b/tests/data/workflow_example/multiple_time_steps/MatML.xml new file mode 100644 index 000000000..7af008ea0 --- /dev/null +++ b/tests/data/workflow_example/multiple_time_steps/MatML.xml @@ -0,0 +1,1320 @@ + + + + + + + + + Epoxy Carbon Woven (230 GPa) Wet + + Composite + + + - + Temperature + Density + + Interpolation Options + Linear Multivariate (Qhull) + True + True + Projection to the Bounding Box + AlgorithmType$$Linear Multivariate (CGAL)$$EngineeringData.CGAL + Interpolation Options + + + 1451 + Dependent + Density + + + + - + ACP + Woven + Ply Type + + + - + Orthotropic + Temperature + Orthotropic Elasticity + + Interpolation Options + Linear Multivariate (Qhull) + True + True + Projection to the Bounding Box + AlgorithmType$$Linear Multivariate (CGAL)$$EngineeringData.CGAL + Interpolation Options + + + 59160000000 + Dependent + Young's Modulus X direction + + + 59160000000 + Dependent + Young's Modulus Y direction + + + 7500000000 + Dependent + Young's Modulus Z direction + + + 0.04 + Dependent + Poisson's Ratio XY + + + 0.3 + Dependent + Poisson's Ratio YZ + + + 0.3 + Dependent + Poisson's Ratio XZ + + + 3300000000 + Dependent + Shear Modulus XY + + + 2700000000 + Dependent + Shear Modulus YZ + + + 2700000000 + Dependent + Shear Modulus XZ + + + + - + Orthotropic + Temperature + Orthotropic Strain Limits + + Interpolation Options + Linear Multivariate (Qhull) + True + True + Projection to the Bounding Box + AlgorithmType$$Linear Multivariate (CGAL)$$EngineeringData.CGAL + Interpolation Options + + + 0.0092 + Dependent + Tensile X direction + + + 0.0092 + Dependent + Tensile Y direction + + + 0.0078 + Dependent + Tensile Z direction + + + -0.0084 + Dependent + Compressive X direction + + + -0.0084 + Dependent + Compressive Y direction + + + -0.011 + Dependent + Compressive Z direction + + + 0.02 + Dependent + Shear XY + + + 0.015 + Dependent + Shear YZ + + + 0.015 + Dependent + Shear XZ + + + + - + Orthotropic + Temperature + Orthotropic Stress Limits + + Interpolation Options + Linear Multivariate (Qhull) + True + True + Projection to the Bounding Box + AlgorithmType$$Linear Multivariate (CGAL)$$EngineeringData.CGAL + Interpolation Options + + + 513000000 + Dependent + Tensile X direction + + + 513000000 + Dependent + Tensile Y direction + + + 50000000 + Dependent + Tensile Z direction + + + -437000000 + Dependent + Compressive X direction + + + -437000000 + Dependent + Compressive Y direction + + + -150000000 + Dependent + Compressive Z direction + + + 120000000 + Dependent + Shear XY + + + 55000000 + Dependent + Shear YZ + + + 55000000 + Dependent + Shear XZ + + + + - + Secant + Orthotropic + Temperature + Orthotropic Secant Coefficient of Thermal Expansion + + Interpolation Options + Linear Multivariate (Qhull) + True + True + Projection to the Bounding Box + AlgorithmType$$Linear Multivariate (CGAL)$$EngineeringData.CGAL + Interpolation Options + + + 2.2e-06 + Dependent + Coefficient of Thermal Expansion X direction + + + 2.2e-06 + Dependent + Coefficient of Thermal Expansion Y direction + + + 1e-05 + Dependent + Coefficient of Thermal Expansion Z direction + + + + - + Secant + Orthotropic + Orthotropic Zero-Thermal-Strain Reference Temperature Secant + + 20 + Dependent + Zero-Thermal-Strain Reference Temperature + + + Coefficient of Thermal Expansion + + + + - + Tsai-Wu Constants + + -1 + Dependent + Coupling Coefficient XY + + + -1 + Dependent + Coupling Coefficient YZ + + + -1 + Dependent + Coupling Coefficient XZ + + + 7.88860905221012e-31 + Independent + Temperature + + + + - + 7ab9c060-4547-4561-aab3-d3fd3c4952ed + Material Unique Id + False + + + - + Color + + 170 + Dependent + Red + + + 170 + Dependent + Green + + + 170 + Dependent + Blue + + + Appearance + + + + - + Isotropic + Temperature + Isotropic Thermal Conductivity + + Interpolation Options + Linear Multivariate + True + True + Projection to the Bounding Box + Interpolation Options + + + 2 + Dependent + Thermal Conductivity + + + 7.88860905221012e-31 + Independent + Temperature + Temperature + 22 + Program Controlled + Program Controlled + C + + + + + + + Honeycomb + + Composite + + + - + Temperature + Density + + Interpolation Options + Linear Multivariate (Qhull) + True + True + Projection to the Bounding Box + AlgorithmType$$Linear Multivariate (CGAL)$$EngineeringData.CGAL + Interpolation Options + + + 80 + Dependent + Density + + + + - + ACP + Honeycomb Core + Ply Type + + + - + Orthotropic + Temperature + Orthotropic Elasticity + + Interpolation Options + Linear Multivariate (Qhull) + True + True + Projection to the Bounding Box + AlgorithmType$$Linear Multivariate (CGAL)$$EngineeringData.CGAL + Interpolation Options + + + 1000000 + Dependent + Young's Modulus X direction + + + 1000000 + Dependent + Young's Modulus Y direction + + + 255000000 + Dependent + Young's Modulus Z direction + + + 0.49 + Dependent + Poisson's Ratio XY + + + 0.001 + Dependent + Poisson's Ratio YZ + + + 0.001 + Dependent + Poisson's Ratio XZ + + + 1 + Dependent + Shear Modulus XY + + + 37000000 + Dependent + Shear Modulus YZ + + + 70000000 + Dependent + Shear Modulus XZ + + + + - + Orthotropic + Temperature + Orthotropic Stress Limits + + Interpolation Options + Linear Multivariate (Qhull) + True + True + Projection to the Bounding Box + AlgorithmType$$Linear Multivariate (CGAL)$$EngineeringData.CGAL + Interpolation Options + + + 0 + Dependent + Tensile X direction + + + 0 + Dependent + Tensile Y direction + + + 5310000 + Dependent + Tensile Z direction + + + 0 + Dependent + Compressive X direction + + + 0 + Dependent + Compressive Y direction + + + -5310000 + Dependent + Compressive Z direction + + + 0 + Dependent + Shear XY + + + 1210000 + Dependent + Shear YZ + + + 2240000 + Dependent + Shear XZ + + + + - + 7c43386c-d57e-4169-bf28-1674ece809c5 + Material Unique Id + False + + + - + Color + + 103 + Dependent + Red + + + 192 + Dependent + Green + + + 205 + Dependent + Blue + + + Appearance + + + + - + Isotropic + Temperature + Isotropic Thermal Conductivity + + Interpolation Options + Linear Multivariate + True + True + Projection to the Bounding Box + Interpolation Options + + + 2 + Dependent + Thermal Conductivity + + + 7.88860905221012e-31 + Independent + Temperature + Temperature + 22 + Program Controlled + Program Controlled + C + + + + + + + Epoxy Carbon UD (230 GPa) Prepreg + + Composite + + + - + Temperature + Density + + Interpolation Options + Linear Multivariate (Qhull) + True + True + Projection to the Bounding Box + AlgorithmType$$Linear Multivariate (CGAL)$$EngineeringData.CGAL + Interpolation Options + + + 1490 + Dependent + Density + + + + - + ACP + Regular + Ply Type + + + - + Orthotropic + Temperature + Orthotropic Elasticity + + Interpolation Options + Linear Multivariate (Qhull) + True + True + Projection to the Bounding Box + AlgorithmType$$Linear Multivariate (CGAL)$$EngineeringData.CGAL + Interpolation Options + + + 121000000000 + Dependent + Young's Modulus X direction + + + 8600000000 + Dependent + Young's Modulus Y direction + + + 8600000000 + Dependent + Young's Modulus Z direction + + + 0.27 + Dependent + Poisson's Ratio XY + + + 0.4 + Dependent + Poisson's Ratio YZ + + + 0.27 + Dependent + Poisson's Ratio XZ + + + 4700000000 + Dependent + Shear Modulus XY + + + 3100000000 + Dependent + Shear Modulus YZ + + + 4700000000 + Dependent + Shear Modulus XZ + + + + - + Orthotropic + Temperature + Orthotropic Strain Limits + + Interpolation Options + Linear Multivariate (Qhull) + True + True + Projection to the Bounding Box + AlgorithmType$$Linear Multivariate (CGAL)$$EngineeringData.CGAL + Interpolation Options + + + 0.0167 + Dependent + Tensile X direction + + + 0.0032 + Dependent + Tensile Y direction + + + 0.0032 + Dependent + Tensile Z direction + + + -0.0108 + Dependent + Compressive X direction + + + -0.0192 + Dependent + Compressive Y direction + + + -0.0192 + Dependent + Compressive Z direction + + + 0.012 + Dependent + Shear XY + + + 0.011 + Dependent + Shear YZ + + + 0.012 + Dependent + Shear XZ + + + + - + Orthotropic + Temperature + Orthotropic Stress Limits + + Interpolation Options + Linear Multivariate (Qhull) + True + True + Projection to the Bounding Box + AlgorithmType$$Linear Multivariate (CGAL)$$EngineeringData.CGAL + Interpolation Options + + + 2231000000 + Dependent + Tensile X direction + + + 29000000 + Dependent + Tensile Y direction + + + 29000000 + Dependent + Tensile Z direction + + + -1082000000 + Dependent + Compressive X direction + + + -100000000 + Dependent + Compressive Y direction + + + -100000000 + Dependent + Compressive Z direction + + + 60000000 + Dependent + Shear XY + + + 32000000 + Dependent + Shear YZ + + + 60000000 + Dependent + Shear XZ + + + + - + Secant + Orthotropic + Temperature + Orthotropic Secant Coefficient of Thermal Expansion + + Interpolation Options + Linear Multivariate (Qhull) + True + True + Projection to the Bounding Box + AlgorithmType$$Linear Multivariate (CGAL)$$EngineeringData.CGAL + Interpolation Options + + + -4.7e-07 + Dependent + Coefficient of Thermal Expansion X direction + + + 3e-05 + Dependent + Coefficient of Thermal Expansion Y direction + + + 3e-05 + Dependent + Coefficient of Thermal Expansion Z direction + + + + - + Secant + Orthotropic + Orthotropic Zero-Thermal-Strain Reference Temperature Secant + + 20 + Dependent + Zero-Thermal-Strain Reference Temperature + + + Coefficient of Thermal Expansion + + + + - + Carbon + Temperature + Puck Constants + + Interpolation Options + Linear Multivariate (Qhull) + True + True + Projection to the Bounding Box + AlgorithmType$$Linear Multivariate (CGAL)$$EngineeringData.CGAL + Interpolation Options + + + 0.3 + Dependent + Compressive Inclination XZ + + + 0.25 + Dependent + Compressive Inclination YZ + + + 0.35 + Dependent + Tensile Inclination XZ + + + 0.25 + Dependent + Tensile Inclination YZ + + + + - + Additional Puck Constants + + 0.8 + Dependent + Interface Weakening Factor + + + 0.5 + Dependent + Degradation Parameter s + + + 0.5 + Dependent + Degradation Parameter M + + + + - + Tsai-Wu Constants + + -1 + Dependent + Coupling Coefficient XY + + + -1 + Dependent + Coupling Coefficient YZ + + + -1 + Dependent + Coupling Coefficient XZ + + + 7.88860905221012e-31 + Independent + Temperature + + + + - + e236c55c-e4b2-423c-8262-2cbd5ec4377b + Material Unique Id + False + + + - + Color + + 222 + Dependent + Red + + + 222 + Dependent + Green + + + 222 + Dependent + Blue + + + Appearance + + + + - + Isotropic + Temperature + Isotropic Thermal Conductivity + + Interpolation Options + Linear Multivariate + True + True + Projection to the Bounding Box + Interpolation Options + + + 2 + Dependent + Thermal Conductivity + + + 7.88860905221012e-31 + Independent + Temperature + Temperature + 22 + Program Controlled + Program Controlled + C + + + + + + + Options Variable + + + + Density + + + kg + + + m + + + + + Young's Modulus X direction + + + Pa + + + + + Young's Modulus Y direction + + + Pa + + + + + Young's Modulus Z direction + + + Pa + + + + + Poisson's Ratio XY + + + + Poisson's Ratio YZ + + + + Poisson's Ratio XZ + + + + Shear Modulus XY + + + Pa + + + + + Shear Modulus YZ + + + Pa + + + + + Shear Modulus XZ + + + Pa + + + + + Tensile X direction + + + + Tensile Y direction + + + + Tensile Z direction + + + + Compressive X direction + + + + Compressive Y direction + + + + Compressive Z direction + + + + Shear XY + + + + Shear YZ + + + + Shear XZ + + + + Tensile X direction + + + Pa + + + + + Tensile Y direction + + + Pa + + + + + Tensile Z direction + + + Pa + + + + + Compressive X direction + + + Pa + + + + + Compressive Y direction + + + Pa + + + + + Compressive Z direction + + + Pa + + + + + Shear XY + + + Pa + + + + + Shear YZ + + + Pa + + + + + Shear XZ + + + Pa + + + + + Coefficient of Thermal Expansion X direction + + + C + + + + + Coefficient of Thermal Expansion Y direction + + + C + + + + + Coefficient of Thermal Expansion Z direction + + + C + + + + + Zero-Thermal-Strain Reference Temperature + + + C + + + + + Coupling Coefficient XY + + + + Coupling Coefficient YZ + + + + Coupling Coefficient XZ + + + + Temperature + + + C + + + + + Red + + + + Green + + + + Blue + + + + Material Property + + + + Thermal Conductivity + + + W + + + m + + + C + + + + + Compressive Inclination XZ + + + + Compressive Inclination YZ + + + + Tensile Inclination XZ + + + + Tensile Inclination YZ + + + + Interface Weakening Factor + + + + Degradation Parameter s + + + + Degradation Parameter M + + + + + Density + + + + Ply Type + + + + Elasticity + + + + Strain Limits + + + + Stress Limits + + + + Coefficient of Thermal Expansion + + + + Material Unique Id + + + + Color + + + + Thermal Conductivity + + + + Zero-Thermal-Strain Reference Temperature + + + + Tsai-Wu Constants + + + + Puck Constants + + + + Additional Puck Constants + + + + + + + + Epoxy Carbon Woven (230 GPa) Wet + 14c6ac6f-4e65-4269-9e3a-335446a83ea5 + + + + + Honeycomb + 21084963-4dd6-484f-abe2-d1fe8fef3da3 + + + + + Epoxy Carbon UD (230 GPa) Prepreg + a1f2e775-77fe-4ad6-a822-54d353e0ea0e + + + + + + \ No newline at end of file diff --git a/tests/data/workflow_example/multiple_time_steps/Setup/ACPCompositeDefinitions.h5 b/tests/data/workflow_example/multiple_time_steps/Setup/ACPCompositeDefinitions.h5 new file mode 100644 index 000000000..efc2cb710 Binary files /dev/null and b/tests/data/workflow_example/multiple_time_steps/Setup/ACPCompositeDefinitions.h5 differ diff --git a/tests/data/workflow_example/multiple_time_steps/file.rst b/tests/data/workflow_example/multiple_time_steps/file.rst new file mode 100644 index 000000000..9847237f6 Binary files /dev/null and b/tests/data/workflow_example/multiple_time_steps/file.rst differ diff --git a/tox.ini b/tox.ini index 744ec833d..05002a9ca 100644 --- a/tox.ini +++ b/tox.ini @@ -31,7 +31,9 @@ setenv = PYTEST_COV_APPEND_ARG = --cov-append commands = poetry install -E test - poetry run pytest --reruns 1 --license-server={env:LICENSE_SERVER:} --image-tag=latest {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {posargs:-vv} + poetry run pytest --reruns 1 --license-server={env:LICENSE_SERVER:} --image-tag=latest {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {env:PYTEST_COV_APPEND_ARG:} {posargs:-vv} + poetry run pytest --reruns 1 --license-server={env:LICENSE_SERVER:} --image-tag=2024r1 {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {env:PYTEST_COV_APPEND_ARG:} {posargs:-vv} + poetry run pytest --reruns 1 --license-server={env:LICENSE_SERVER:} --image-tag=2024r1_pre0 {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {env:PYTEST_COV_APPEND_ARG:} {posargs:-vv} poetry run pytest --reruns 1 --license-server={env:LICENSE_SERVER:} --image-tag=2023r2_pre1 {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {env:PYTEST_COV_APPEND_ARG:} {posargs:-vv} [testenv:test-minimal]