Using ACT, how can I define a variable pressure with Independent Variable set to X in a specific coo

Member, Moderator, Employee Posts: 873
100 Answers 500 Comments 250 Likes Second Anniversary
✭✭✭✭
edited June 2023 in Structures

Using ACT, how can I define a variable pressure with Independent Variable set to X in a specific coordinate system?

Tagged:

Answers

  • Member, Moderator, Employee Posts: 873
    100 Answers 500 Comments 250 Likes Second Anniversary
    ✭✭✭✭
    Answer ✓

    The following code can be adapted:

    1. analysis=ExtAPI.DataModel.Project.Model.Analyses[0] # refer to analysis
    2. my_press=analysis.AddPressure() # add pressure
    3. my_press.Magnitude.Inputs[0].DiscreteValues=[Quantity('1[s]'),Quantity('20[s]')] # force definition to be set to tabular data
    4. my_press.Magnitude.Output.DiscreteValues=[Quantity('10[MPa]'),Quantity('20[MPa]')] # define pressure values
    5. my_press.IndependentVariable=LoadVariableVariationType.XValue # define X as independent variable
    6. my_press.XYZFunctionCoordinateSystem=ExtAPI.DataModel.GetObjectsByName("Coordinate System")[0] # select coordinate system called "Coordinate System" in which X is defined
    7. my_press.Magnitude.Inputs[0].DiscreteValues=[Quantity('1[mm]'),Quantity('20[mm]')] # define pressure values

Welcome!

It looks like you're new here. Sign in or register to get started.