How can I define a variable pressure condition through scripting?
Pernelle Marone-Hitz
Member, Moderator, Employee Posts: 871
✭✭✭✭
Answers
-
Below is an example:
analysis=ExtAPI.DataModel.Project.Model.Analyses[0] # refer to analysis newPress=analysis.AddPressure() # add pressure # define entry values as tabular data newPress.Magnitude.Inputs[0].DiscreteValues=[Quantity('0.5[s]'),Quantity('1[s]’)] # define (output) pressure values as tabular data newPress.Magnitude.Output.DiscreteValues=[Quantity('10[MPa]'),Quantity('20[MPa]’)]
6