ALTADataSet.AddStressDefinition: Difference between revisions
Albert Szeto (talk | contribs) No edit summary |
Albert Szeto (talk | contribs) No edit summary |
||
Line 49: | Line 49: | ||
NumOfStresses = ALTADS.NumStresses | NumOfStresses = ALTADS.NumStresses | ||
{{APIComment|Add values to the raw data.}} | {{APIComment|Add values to the raw data. See [[ALTADataSet.AddFailure|AddFailure]] for additional details.]}} | ||
ALTADS.AddFailure(1, 1, sp) | ALTADS.AddFailure(1, 1, sp) | ||
ALTADS.AddFailure(2, 1, sp) | ALTADS.AddFailure(2, 1, sp) | ||
ALTADS.AddFailure(3, 1, sp) | ALTADS.AddFailure(3, 1, sp) | ||
{{APIComment|Add a new stress definition.}} | |||
'''ALTADS.AddStressDefinition("NewStress1")''' | |||
{{APIComment|Add values to the raw data. With the addition of "NewStress1", AddFailure now requires an additional stress.}} | |||
Dim sp2 = New ALTAStressProfile("Profile1") | |||
sp2.RepeatCycle = True | |||
sp2.AddSegment(4, 100) | |||
sp2.AddSegment(5, 200) | |||
sp2.AddSegment(6, 300) | |||
ALTADS.AddFailure(4, 1, sp, sp2) | |||
ALTADS.AddFailure(5, 1, sp, sp2) | |||
ALTADS.AddFailure(6, 1, sp, sp2) |
Revision as of 23:05, 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. See AddFailure for additional details.]
ALTADS.AddFailure(1, 1, sp) ALTADS.AddFailure(2, 1, sp) ALTADS.AddFailure(3, 1, sp)
Add a new stress definition.
ALTADS.AddStressDefinition("NewStress1")
Add values to the raw data. With the addition of "NewStress1", AddFailure now requires an additional stress.
Dim sp2 = New ALTAStressProfile("Profile1") sp2.RepeatCycle = True sp2.AddSegment(4, 100) sp2.AddSegment(5, 200) sp2.AddSegment(6, 300) ALTADS.AddFailure(4, 1, sp, sp2) ALTADS.AddFailure(5, 1, sp, sp2) ALTADS.AddFailure(6, 1, sp, sp2)