Skip to main content

Ansys Codefest Companion Library

Project description

Ansys CodeFest Companion Library

This package is a companion library to Ansys CodeFests. The challenges have varying storylines and contexts, however, they all have the same common framework. For example, to access the PyMAPDL structures challenges, execute the following code.

import ansys.codefest.mapdl as acf

# Challenge ids are *always* strings because some contain letters as well as numbers.
challenge = acf.Start.builtin_challenge('1a')
challenge.display_problem()

Then, once the specific challenge has been detailed, you can submit solution attempts using the following commands.

import ansys.codefest.mapdl as acf

# Challenge ids are *always* strings because some contain letters as well as numbers.
challenge = acf.Start.builtin_challenge('1a')
design = challenge.suggest_a_design()
bridge = challenge.build_bridge(design)
success, feedback, beams = bridge.assess_for_breaks()
print(f'Bridge costs ${challenge.calculate_design_cost(design)} dollarydoos')
bridge.plot()

The program will then test your attempt and provide feedback about what you did wrong (if anything). Finally, it will give a breakdown of all the elements you used and how close to the yield strength they came as percentages.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansys_codefest-0.2.0.tar.gz (40.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ansys_codefest-0.2.0-py3-none-any.whl (49.7 kB view details)

Uploaded Python 3

File details

Details for the file ansys_codefest-0.2.0.tar.gz.

File metadata

  • Download URL: ansys_codefest-0.2.0.tar.gz
  • Upload date:
  • Size: 40.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.9

File hashes

Hashes for ansys_codefest-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6e869c7ceb03e39be1acf8bf19f0b1f71c8f7aed177b750f967e587dba50be16
MD5 7a68fabdcc7c4f6f46792744dad6e85d
BLAKE2b-256 e911ea7ef9166a0e554210b8869414c4bfd26081cdef5f07b2c07c80625c1668

See more details on using hashes here.

File details

Details for the file ansys_codefest-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ansys_codefest-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 49.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.9

File hashes

Hashes for ansys_codefest-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ee57a7214353d0829d77fe9b80472ec821b5d8e9079021a0e96b2fb589613da
MD5 ff072fc366a18f38e2c99df1898807e4
BLAKE2b-256 f64e01c46348bb42912ca8094915d582ec80b1ce1178f1e83a0c9a701b9cdcb7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page