Skip to content

Conversation

greschd
Copy link
Member

@greschd greschd commented Sep 1, 2025

Context:

In the 'CDB to Mechanical' workflow, using a DAT file (as exported
from Mechanical) can fail when e.g. the layup only covers part of
the mesh (see #826).
This can be fixed by converting the DAT file to a CDB file
using MAPDL. This improves the reliability of loading the model
into Mechanical, and allows re-enabling the 'valid blocked CDB'
check in the import.

Changes:

  • Enable the 'valid blocked CDB' check in the import_acp_mesh_from_cdb
    helper function by default (configurable).
  • Update the 'Create input file' documentation to include the conversion
    from DAT to CDB using (Py)MAPDL.
  • Add a conversion from DAT to CDB to the 'CDB to Mechanical' workflow
    and 'Mechanical to CDB' examples.

Closes #826.

Context:

In the 'CDB to Mechanical' workflow, using a DAT file (as exported
from Mechanical) can fail when e.g. the layup only covers part of
the mesh (see #826).
This can be fixed by converting the DAT file to a CDB file
using MAPDL. This improves the reliability of loading the model
into Mechanical, and allows re-enabling the 'valid blocked CDB'
check in the import.

Changes:

- Enable the 'valid blocked CDB' check in the `import_acp_mesh_from_cdb`
  helper function.
- Update the 'Create input file' documentation to include the conversion
  from DAT to CDB using (Py)MAPDL.
- Add a conversion from DAT to CDB to the 'CDB to Mechanical' workflow
  example.

Closes #826.
Copy link

codecov bot commented Sep 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.97%. Comparing base (227a2f6) to head (2cd0056).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #896   +/-   ##
=======================================
  Coverage   94.97%   94.97%           
=======================================
  Files         110      110           
  Lines        5773     5773           
  Branches      296      296           
=======================================
  Hits         5483     5483           
  Misses        289      289           
  Partials        1        1           
Flag Coverage Δ
direct-launch 92.20% <100.00%> (ø)
minimum-deps 93.07% <100.00%> (ø)
python-3.10 94.16% <100.00%> (ø)
python-3.11 94.09% <100.00%> (ø)
python-3.12 94.09% <100.00%> (ø)
python-3.13 94.33% <100.00%> (ø)
server-2024R2SP5 90.49% <100.00%> (ø)
server-2025R1SP4 94.12% <100.00%> (ø)
server-2025R2SP2 94.09% <100.00%> (ø)
server-2026R1 94.09% <100.00%> (ø)
server-latest 94.73% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@greschd greschd marked this pull request as ready for review September 1, 2025 14:05
@greschd greschd requested a review from Copilot September 1, 2025 14:52
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the reliability of the 'CDB to Mechanical' workflow by converting DAT files to CDB format using MAPDL before importing into Mechanical. This addresses issues where DAT files fail to import when layups only partially cover the mesh.

  • Enables the 'valid blocked CDB' check by default in the import helper function
  • Adds DAT to CDB conversion using PyMAPDL in workflow examples
  • Updates documentation to include the conversion process and its benefits

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/ansys/acp/core/mechanical_integration_helpers.py Adds configurable parameter to enable valid blocked CDB file checking by default
examples/workflows/06-cdb-to-pymechanical-workflow.py Converts DAT input to CDB format using PyMAPDL before processing
examples/workflows/05-pymechanical-to-cdb-workflow.py Updates workflow to export DAT then convert to CDB format
examples/workflows/04-pymechanical-solid-workflow.py Explicitly disables CDB validation for solid model workflow
doc/source/user_guide/howto/create_input_file.rst Documents the DAT to CDB conversion process and its benefits

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CDB to PyMechanical workflow: partial layup not supported
1 participant