Skip to content

Commit

Permalink
Bump version 0.19.0b29
Browse files Browse the repository at this point in the history
  • Loading branch information
pkrull-ansys committed Dec 5, 2024
1 parent efba380 commit 6045bdd
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* ParametricStudy() now requires a material name parameter. As a consequence, the material_name parameter has been removed from ParametricStudy.generate_single_bead_permutations(), ParametricStudy.generate_porosity_permutations(), and ParametricStudy.generate_microstructure_permutations(). The parametric study FORMAT_VERSION value has been incremented to 3.
* The ParametricRunner class has been removed. To run a parametric study, use Additive.simulate_study() or Additive.simulate_study_async().
* The ParametricStudy.generate_single_bead_permutations() will now accept min and max p/v ratios as constraints instead of min and max area energy densities.
* Thermal history simulations require the `enable_beta_features` flag to be set to `True` when calling `Additive()`. [#599](https://github.com/ansys/pyadditive/issues/599)

### New Features
* Default version of Additive Server is 25.1 when creating a client connection.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,30 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
"""
Thermal history analysis
========================
Thermal history analysis (BETA)
===============================
.. warning::
Beta Features Disclaimer
* This is beta documentation for one or more beta software features.
* Beta features are considered unreleased and have not been fully tested nor
fully validated. The results are not guaranteed by Ansys, Inc. (Ansys) to be
correct. You assume the risk of using beta features.
* At its discretion, Ansys may release, change, or withdraw beta features
in future revisions.
* Beta features are not subject to the Ansys Class 3 error reporting system.
Ansys makes no commitment to resolve defects reported against beta features;
however, your feedback will help us improve the quality of the product.
* Ansys does not guarantee that database and/or input files used with beta
features will run successfully from version to version of the software, nor
with the final released version of the features. You may need to modify the
database and/or input files before running them on other versions.
* Documentation for beta features is called beta documentation, and it may
not be written to the same standard as documentation for released features.
Beta documentation may not be complete at the time of product release.
At its discretion, Ansys may add, change, or delete beta documentation
at any time.
This example shows how to use PyAdditive to determine
thermal history during a build using a simulated coaxial
Expand All @@ -46,7 +68,7 @@
ThermalHistoryInput,
)

additive = Additive()
additive = Additive(enable_beta_features=True)

###############################################################################
# Specify model
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "flit_core.buildapi"
[project]
# Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections
name = "ansys-additive-core"
version = "0.19.0b28"
version = "0.19.0b29"
description = "A Python client for the Ansys Additive service"
readme = "README.rst"
requires-python = ">=3.10,<4"
Expand Down
4 changes: 2 additions & 2 deletions src/ansys/additive/core/additive.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,11 +455,11 @@ def _simulate(
raise ValueError("A material is not assigned to the simulation input")

if (
isinstance(simulation_input, Microstructure3DInput)
isinstance(simulation_input, (Microstructure3DInput, ThermalHistoryInput))
and self.enable_beta_features is False
):
raise BetaFeatureNotEnabledError(
"3D microstructure simulations require beta features to be enabled.\n"
"This simulation requires beta features to be enabled.\n"
"Set enable_beta_features=True when creating the Additive client."
)

Expand Down
12 changes: 9 additions & 3 deletions tests/test_additive.py
Original file line number Diff line number Diff line change
Expand Up @@ -1310,15 +1310,21 @@ def test_enable_beta_features_setter_assigns_value(_):
assert additive.enable_beta_features is True


@pytest.mark.parametrize(
"sim_input",
[
Microstructure3DInput(material=AdditiveMaterial(name="my_material")),
ThermalHistoryInput(material=AdditiveMaterial(name="my_material")),
],
)
@patch("ansys.additive.core.additive.ServerConnection")
def test_3d_microstructure_without_beta_enabled_raises_exception(_):
def test_3d_microstructure_without_beta_enabled_raises_exception(_, sim_input):
# arrange
additive = Additive()
input = Microstructure3DInput(material=AdditiveMaterial(name="my_material"))

# act, assert
with pytest.raises(BetaFeatureNotEnabledError):
additive.simulate(input)
additive.simulate(sim_input)


@patch("ansys.additive.core.additive.ServerConnection")
Expand Down

0 comments on commit 6045bdd

Please sign in to comment.