ALTADataSet.AddStressDefinition: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{Template:APIClass|ALTADataSet Class|ALTADataSet}}
{{Template:APIClass|ALTADataSet Class|ALTADataSet}}
Sets a new stress definition(column) to be used.
== Declaration  ==
== Declaration  ==
{{APIPrefix|Public Sub}}
{{APIName|AddStressDefinition(}}
{{APIName|AddStressDefinition((}}
{{APIPrefix|ByVal}}
{{APIPrefix|ByVal}}
{{APIName|Name}}
{{APIName|Name}}
{{APIPrefix|As String, Optional ByVal}}
{{APIPrefix|As String, Optional ByVal}}
{{APIName|StressRelation}}
{{APIName|StressRelation}}
{{APIPrefix|As ALTASolverLSR}}
{{APIPrefix|As [[ALTASolverLSR]]}}
=
=
{{APIName|ALTASolverLSR.Exponential,}}
{{APIName|[[ALTASolverLSR]].Exponential,}}
{{APIPrefix|Optional ByVal,}}
{{APIPrefix|Optional ByVal,}}
{{APIName|UseStress}}
{{APIName|UseStress}}
Line 17: Line 19:


{{APIComment|Adds a stress definition (column). The number of stresses in subsequent calls to AddFailure, AddSuspension etc. must be equal to the number of stress definitions in the data set.}}
{{APIComment|Adds a stress definition (column). The number of stresses in subsequent calls to AddFailure, AddSuspension etc. must be equal to the number of stress definitions in the data set.}}
== Parameters ==
'''Name'''
The name of the new stress definition
'''StressRelation'''
The relation to set the new stress definition
'''UseStress'''
The Use stress level
== Usage Example ==
{{APIComment|Declare the ALTADataSet. See [[New ALTADataSet]] for additional details.}}
        Dim ALTADS as New ALTADataSet
{{APIComment|Declare an [[ALTAStressProfile Class|ALTAStressProfile]]. See [[ALTAStressProfile Class|ALTAStressProfile]] for additional details.}}
        Dim sp = New ALTAStressProfile("Profile1")
        sp.RepeatCycle = True
        sp.AddSegment(1, 250)
        sp.AddSegment(2, 300)
        sp.AddSegment(3, 400)
{{APIComment|Add the stress profile}}
        ALTADS.AddStressProfile(sp)
{{APIComment|Get the number of stresses. In this example, NumOfStresses will be 1. }}
        Dim NumOfStresses as Integer
        NumOfStresses = ALTADS.NumStresses
{{APIComment|Add values to the raw data.}}
        ALTADS.AddFailure(1, 1, sp)
        ALTADS.AddFailure(2, 1, sp)
        ALTADS.AddFailure(3, 1, sp)

Revision as of 22:57, 12 September 2013



Sets a new stress definition(column) to be used.

Declaration

AddStressDefinition( ByVal Name As String, Optional ByVal StressRelation As ALTASolverLSR = ALTASolverLSR.Exponential, Optional ByVal, UseStress As Double = 1)

Adds a stress definition (column). The number of stresses in subsequent calls to AddFailure, AddSuspension etc. must be equal to the number of stress definitions in the data set.

Parameters

Name The name of the new stress definition

StressRelation The relation to set the new stress definition

UseStress The Use stress level

Usage Example

Declare the ALTADataSet. See New ALTADataSet for additional details.

       Dim ALTADS as New ALTADataSet

Declare an ALTAStressProfile. See ALTAStressProfile for additional details.

       Dim sp = New ALTAStressProfile("Profile1")
       sp.RepeatCycle = True
       sp.AddSegment(1, 250)
       sp.AddSegment(2, 300)
       sp.AddSegment(3, 400)

Add the stress profile

       ALTADS.AddStressProfile(sp)

Get the number of stresses. In this example, NumOfStresses will be 1.

       Dim NumOfStresses as Integer
       NumOfStresses = ALTADS.NumStresses

Add values to the raw data.

       ALTADS.AddFailure(1, 1, sp)
       ALTADS.AddFailure(2, 1, sp)
       ALTADS.AddFailure(3, 1, sp)