|
13 | 13 | """ |
14 | 14 | import matplotlib.pyplot as plt |
15 | 15 |
|
16 | | -import ansys.additive as pyadditive |
17 | | -from ansys.additive import MeltPoolColumnNames |
| 16 | +import ansys.additive.core as pyadditive |
| 17 | +from ansys.additive.core import MeltPoolColumnNames |
18 | 18 |
|
19 | 19 | additive = pyadditive.Additive() |
20 | 20 |
|
|
23 | 23 | # --------------- |
24 | 24 | # The next step is a to choose a material. A list of available materials can |
25 | 25 | # be obtained using the |
26 | | -# :meth:`get_materials_list() <ansys.additive.additive.Additive.get_materials_list>` |
| 26 | +# :meth:`get_materials_list() <ansys.additive.core.additive.Additive.get_materials_list>` |
27 | 27 | # command. |
28 | 28 |
|
29 | 29 | print(additive.get_materials_list()) |
30 | 30 |
|
31 | 31 | ############################################################################### |
32 | 32 | # Obtain the parameters for a single material by passing one of the names |
33 | 33 | # from the materials list to |
34 | | -# :meth:`get_material() <ansys.additive.additive.Additive.get_material>`. |
| 34 | +# :meth:`get_material() <ansys.additive.core.additive.Additive.get_material>`. |
35 | 35 | material = additive.get_material("17-4PH") |
36 | 36 |
|
37 | 37 | ############################################################################### |
38 | 38 | # Set Machine Parameters |
39 | 39 | # ---------------------- |
40 | 40 | # Specify machine parameters by first creating an |
41 | | -# :class:`AdditiveMachine <ansys.additive.machine.AdditiveMachine>` object |
| 41 | +# :class:`AdditiveMachine <from ansys.additive.core.machine.AdditiveMachine>` object |
42 | 42 | # then assigning the desired values. All values are in SI units (m, kg, s, K) |
43 | 43 | # unless otherwise noted. |
44 | 44 |
|
|
55 | 55 | ############################################################################### |
56 | 56 | # Specify Single Bead Simulation Inputs |
57 | 57 | # ------------------------------------- |
58 | | -# Create a :class:`SingleBeadInput <ansys.additive.single_bead.SingleBeadInput>` |
| 58 | +# Create a :class:`SingleBeadInput <ansys.additive.core.single_bead.SingleBeadInput>` |
59 | 59 | # object containing the desired simulation parameters. |
60 | 60 |
|
61 | 61 | input = pyadditive.SingleBeadInput( |
|
65 | 65 | ############################################################################### |
66 | 66 | # Run Simulation |
67 | 67 | # -------------- |
68 | | -# Use the :meth:`simulate() <ansys.additive.additive.Additive.simulate>` |
| 68 | +# Use the :meth:`simulate() <ansys.additive.core.additive.Additive.simulate>` |
69 | 69 | # method of the ``additive`` object to run the simulation. The returned object is a |
70 | | -# :class:`SingleBeadSummary <ansys.additive.single_bead.SingleBeadSummary>` |
| 70 | +# :class:`SingleBeadSummary <ansys.additive.core.single_bead.SingleBeadSummary>` |
71 | 71 | # containing the input and a |
72 | | -# :class:`MeltPool <ansys.additive.single_bead.MeltPool>` object. |
| 72 | +# :class:`MeltPool <ansys.additive.core.single_bead.MeltPool>` object. |
73 | 73 |
|
74 | 74 | summary = additive.simulate(input) |
75 | 75 |
|
|
78 | 78 | # ------------------------- |
79 | 79 | # A :class:`Pandas DataFrame <pandas.DataFrame>` containing the melt pool |
80 | 80 | # statistics can be obtained using the |
81 | | -# :meth:`data_frame() <ansys.additive.single_bead.MeltPool.data_frame>` property |
| 81 | +# :meth:`data_frame() <ansys.additive.core.single_bead.MeltPool.data_frame>` property |
82 | 82 | # of the ``melt_pool`` attribute of the ``summary`` object. The |
83 | 83 | # :meth:`plot() <pandas.DataFrame.plot>` method can be used to plot the melt |
84 | 84 | # pool dimensions as a function of bead length. |
|
0 commit comments