Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Engineering with Python

Engineering with Python

Антон Кавалеров (Siemens, R&D Engineer) @ Moscow Python Meetup 58

"Автоматизация процессов проектирования в машиностроении (CAD/CAE) с использованием Python".

Видео: http://www.moscowpython.ru/meetup/58/engineering-python/

Moscow Python Meetup
PRO

July 20, 2018
Tweet

More Decks by Moscow Python Meetup

Other Decks in Programming

Transcript

  1. Engineering with
    Python
    Anton Kavalerov, Corporate Technology
    Unrestricted © Siemens AG 2018
    Instagram:
    @closius
    ant.kav[email protected]

    View Slide

  2. Unrestricted © Siemens AG
    2018
    Page 2 CT Russia
    Development world
    Enterprise
    Entertainment Science
    • Banks
    • Factories
    • Shopping centers
    • Government
    • Engineering centers
    • Accounting
    • …
    • Games
    • Social networks
    • Mobile entertainment apps
    • …
    • Institutes
    • Research
    • …
    external customer(s)
    external environment
    internal customer(s)
    internal environment

    View Slide

  3. Unrestricted © Siemens AG
    2018
    Page 3 CT Russia
    Dev worlds comparison
    ENTERPRISE ENTERTAINMENT
    Architecture
    Legacy code
    Version control
    Developer requirements
    Users
    Problem resolving
    Documentation
    Testing
    Old, hard to update Fresh, easier to update
    Many, in different languages/styles Normal, style is taken into account
    Closed repositories Open/Closed repos. Open source
    Addition skills, narrow area of expertise Programmer skills only
    Specialists, experienced Ordinary people
    Very few info stackowerflow.com
    Very bad, python doc Perfect
    Specialists, experienced, couple of users Unit tests, special testers

    View Slide

  4. Unrestricted © Siemens AG
    2018
    Page 4 CT Russia
    Task management, development process
    https://everhour.com/blog/best-asana-integrations/
    Scrum dev process:
    Weekly meetings in Circuit (some sort of Skype). Developers and testers.
    • Everybody tells what is done for last week
    • Team-lead gives new tasks for a next week
    • Resolving problems if exist

    View Slide

  5. Unrestricted © Siemens AG
    2018
    Page 5 CT Russia
    Why Python?
    • Simple syntax
    • Rapid prototyping
    • Big community
    • Many frameworks
    • Many integrations, bindings

    View Slide

  6. Unrestricted © Siemens AG
    2018
    Page 6 CT Russia
    Engineering software
    PDM
    CAD
    CAE
    CAM
    Create model
    Analyze model
    Manufacture
    Product Data Management

    View Slide

  7. Unrestricted © Siemens AG
    2018
    Page 7 CT Russia
    Where is help?
    https://community.plm.automation.siemens.com/t5/NX-Programming-Customization-
    Forum/bd-p/NX-Programming-Customization
    Journaling
    Python dock & Documentation & Examples

    View Slide

  8. Unrestricted © Siemens AG
    2018
    Page 8 CT Russia
    Frameworks
    PyQt
    ctypes

    View Slide

  9. Unrestricted © Siemens AG
    2018
    Page 9 CT Russia
    EXAMPLES

    View Slide

  10. Unrestricted © Siemens AG
    2018
    Page 10 CT Russia
    Simple automation
    The algorithm for creation a triangular pattern of holes, limited by the outer and inner circles and the
    tolerance of these circles. For heat exchangers design

    View Slide

  11. Unrestricted © Siemens AG
    2018
    Page 11 CT Russia
    Gas Turbine
    https://energyeducation.ca

    View Slide

  12. Unrestricted © Siemens AG
    2018
    Page 12 CT Russia
    HTC tool for 3D thermal condition
    CAD - CFD part simple model CAE - CFD optimized mesh
    RESULTS - HTC for
    thermal–structural step
    Temperature Field at Steady State

    View Slide

  13. Unrestricted © Siemens AG
    2018
    Page 13 CT Russia
    Design process for sophisticated 3D-models is the step-
    by-step process. During this process some part of model
    has to be changed to other variant of topology. Moreover
    user has to manage all reference names are included to
    the model.
    Almost each complicated 3D-modle can be split by
    simple parts. These parts can be once created, added to
    special library and reused when required.
    Reusable toot helps to manage this process.
    Technical objectives / Focused Area
    • All 3D-models and assemblies have been built in Siemens
    NX
    • Any design process
    Customer benefits
    • Automatic assembling of complicated 3D-model by parts
    from reusable library
    • Easy to change some parts of complicated 3D-model
    • Minimize time of design process
    Highlights and results
    • CAD software Siemens NX
    • Written in Python 3
    Reusable tool and library
    https://aviation.stackexchange.com/questions/34378/wh
    ere-does-turbine-vane-and-blade-cooling-air-come-from

    View Slide

  14. Unrestricted © Siemens AG
    2018
    Page 14 CT Russia
    Parameterized 3D-model is the main input for optimization calculation. One of the
    main problem is to create 3D-model where all combinations of parameters (with
    some limits for each parameter) can be build correct.
    This tool helps to test 3D-model and defined combinations of parameters set.
    Also preliminary calculation (before optimization) allows to reduce the number of
    optimization iterations.
    Technical objectives / Focused Area
    • All 3D-models and assemblies have been built in Siemens NX
    • Any optimization analysis
    Customer benefits
    • Automatic detection which parameters interrupt building process for current
    parameters set
    • Performance optimization
    • Minimize time & costs of design optimization steps
    Highlights and results
    • CAD software Siemens NX
    • Written in Python 3
    The tool for testing 3D model for robust parameterization

    View Slide

  15. Unrestricted © Siemens AG
    2018
    Page 15 CT Russia
    Visual representation of phase distribution in Laser Metal Deposited workpiece:
    Heat treatment has a strong impact on the phase composition of treated part.
    Modeling of phase transformation might replace resource-consuming
    experiments and give insight into spatial distribution of formed phases within the
    heat treated part.
    Phase Transformation Model: calculation and visualization
    Laser Metal Deposition (LMD)

    View Slide

  16. Unrestricted © Siemens AG
    2018
    Page 16 CT Russia
    Continuous Cooling Transformation (CCT) phase diagram
    1% of austenite has
    turned into martensite
    90% of austenite has
    turned into martensite
    Raw data recognition
    Mathematic
    Application (Temperatures / Phase fraction %)

    View Slide

  17. Unrestricted © Siemens AG
    2018
    Page 17 CT Russia
    Data translation from Ansys into Python
    ANSYS result file (.rth )
    Fortran ( .exe )
    .rth => .bin
    Python
    .bin => calculation

    View Slide

  18. Unrestricted © Siemens AG
    2018
    Page 18 CT Russia
    Sample Design Rule: Trapped Support
    Test case: Internal chamber of atomizer
    Areas with
    trapped supports
    Input:
    • Areas in need of support (single or a list of areas)
    • SLM build orientation (vector)
    Output:
    • Surfaces which need supports should be highlighted in green
    • Surfaces with trapped supports should be highlighted in red
    The preparation of 3D-model for 3D printing is sophisticated process.
    There are some design rules (min diameter of holes, min fillet, areas to be
    supported, …) that have to be taking into account.
    One of design rules is “finding trapped supports”. Trapped supports are
    supports that are enclosed either completely or partially within desirable
    geometry such that they cannot be removed by post processes. The script
    has to highlight the areas of part, which require supports during additive
    manufacturing process, as well as highlight surfaces for which support can
    be trapped.

    View Slide

  19. Unrestricted © Siemens AG
    2018
    Page 19 CT Russia
    Drone inspection

    View Slide

  20. Unrestricted © Siemens AG
    2018
    Page 20 CT Russia
    How to develop you skills?
    https://pythonworld.ru/
    Invent your project
    Implement and finish
    https://www.youtube.com/user/sentdex
    https://pythonprogramming.net

    View Slide

  21. Unrestricted © Siemens AG
    2018
    Page 21 CT Russia
    Contact information
    Anton Kavalerov
    “Siemens” LLC, Corporate Technology
    115093, Russia, Moscow,
    Dubininskaya st., 96, room 409
    Tel.: +7-968-793 2175
    [email protected]

    View Slide