Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ansys Workbench ACT - Getting values of loads depening on axis component and time

Status
Not open for further replies.

xtremi

Structural
Jul 27, 2018
10
0
0
NO
I'm trying to do this in C#/C++, but for the sake of the question, I will make an example using Python.

In Ansys Mechanical, if I create a Pressure on a geometric face, set the Magnitude to Tabular Data and change the Independent Variable to for example Z.
I can then insert rows and values in a table as, for example:
[tt]
Z[m]| Pressure [Pa]
0.0 | 0.0
0.5 | 3.2e+6
[/tt]

Under the properties of the Pressure, Graph Controls > X-Axis, I can switch between Z and Time. Selecting Z will show the table above, and selecting Time, will bring up another table, with Steps, Time and Scale as column. Example:

[tt]
Steps | Time| Scale [Pa]
1 | 0.0 | 0.0
2 | 1.0 | 1.0
3 | 2.0 | 0.0
[/tt]

I then have a linear varying pressure over the Z axis.

In Python, I can get my Pressure in ACTConsole:

[tt]pressure = ExtAPI.DataModel.Project.Model.Analyses[0].Children[2][/tt] (the pressure is node n. 2 under Analysis node in Mechanical)

[tt]pressure.Magnitude.Inputs[/tt] outputs [tt][[0 [m],0.5 [m]]][/tt]
[tt]pressure.Magnitude.Output[/tt] outputs [tt][0 [Pa],3200000 [Pa]][/tt]

So the inputs and outputs are the values in the table when the dependent variable is Z. But I don't see any way of getting the table content of the table which depends on Steps and Time?

If instead of having the Independent Variable set to a X, Y or Z but to Time, and defining the table as follows:

[tt]
Steps | Time| Pressure [Pa]
1 | 0.0 | 0.0
2 | 1.0 | 3.2e6
3 | 2.0 | 0.0
[/tt]

In ACTConsole:

[tt]pressure.Magnitude.Inputs[/tt] outputs [tt][[0 [sec],1 [sec],2 [sec]]][/tt]
[tt]pressure.Magnitude.Output[/tt] outputs [tt][0 [Pa],3200000 [Pa],0 [Pa]][/tt]

Here I get the time/step dependent values, which makes sense.

So in my first example, the pressure is defined by 2 tables, one defining the pressure depending on a dimension, the other scaling the pressure depending on Step/time.
How can I access both tables using the API?
 
Status
Not open for further replies.
Back
Top