Define tabular force through Mechanical scripting

Pernelle Marone-Hitz
Pernelle Marone-Hitz Member, Moderator, Employee Posts: 732
First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member
edited June 2023 in Structures

Using ACT, how can I define the values of a force through tabular data?

Tagged:

Answers

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 732
    First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member
    Answer ✓

    The following script can be adapted. There must be the same numbers of entries defined in Inputs and in Outputs.

        StaticAnalysis=ExtAPI.DataModel.Project.Model.Analyses[2]
        MyForce=StaticAnalysis.AddForce()
        MyForce.DefineBy=LoadDefineBy.Components
        MyForce.XComponent.Inputs[0].DiscreteValues=[Quantity('0[s]'),Quantity('0.5[s]'),Quantity('1[s]')]
        MyForce.XComponent.Output.DiscreteValues=[Quantity('0[N]'),Quantity('15[N]'),Quantity('50[N]')]