Using ACT, how can I define a variable pressure with Independent Variable set to X in a specific coo
Pernelle Marone-Hitz
Member, Moderator, Employee Posts: 871
✭✭✭✭
Using ACT, how can I define a variable pressure with Independent Variable set to X in a specific coordinate system?
Tagged:
0
Answers
-
The following code can be adapted:
analysis=ExtAPI.DataModel.Project.Model.Analyses[0] # refer to analysis my_press=analysis.AddPressure() # add pressure my_press.Magnitude.Inputs[0].DiscreteValues=[Quantity('1[s]'),Quantity('20[s]')] # force definition to be set to tabular data my_press.Magnitude.Output.DiscreteValues=[Quantity('10[MPa]'),Quantity('20[MPa]')] # define pressure values my_press.IndependentVariable=LoadVariableVariationType.XValue # define X as independent variable my_press.XYZFunctionCoordinateSystem=ExtAPI.DataModel.GetObjectsByName("Coordinate System")[0] # select coordinate system called "Coordinate System" in which X is defined my_press.Magnitude.Inputs[0].DiscreteValues=[Quantity('1[mm]'),Quantity('20[mm]')] # define pressure values
0