ALTADataSet.AddStressDefinition: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(27 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Template:APIClass|ALTADataSet Class|ALTADataSet}}
{{Template:API}}{{Template:APIBreadcrumb|.[[ALTADataSet_Class|ALTADataSet]]}}


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


== Method Syntax ==
<onlyinclude>Adds a stress type to the data set.</onlyinclude>
{{APIName|'''AddStressDefinition'''(}}
{{APIPrefix|ByVal}}
{{APIName|Name}}
{{APIPrefix|As String, Optional ByVal}}
{{APIName|StressRelation}}
{{APIPrefix|As [[ALTASolverLSR]]}}
=
{{APIName|[[ALTASolverLSR]].Exponential,}}
{{APIPrefix|Optional ByVal}}
{{APIName|UseStress}}
{{APIPrefix|As Double}}
=
{{APIName|1)}} <br>
{{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 ==
==Syntax==
'''Name'''
'''.AddStressDefinition'''(''Name'', ''StressRelation'', ''UseStress'')
The name of the new stress definition


'''StressRelation'''
===Parameters===
The relation to set the new stress definition
''Name''
:Required. String. The name of the stress.


'''UseStress'''
''StressRelation''
The Use stress level
:Optional. The stress transformation that will be applied to the stress. Applies to the general log-linear (GLL) or cumulative damage (CD) models only. Can be any [[ALTASolverLSR_Enumeration|ALTASolverLSR]] constant. Default value &#61; 0 (exponential life-stress relationship).


== Usage Example ==
''UseStress''
:Optional. Double. The use stress level. Default value &#61; 1.


{{APIComment|Declare the ALTADataSet. See [[New ALTADataSet]] for additional details.}}
        Dim ALTADS as New ALTADataSet


{{APIComment|Add a new stress definition.}}
== Example ==
        '''ALTADS.AddStressDefinition("NewStress1")'''
The following example demonstrates how to add stress definitions to an ALTADataSet object.


{{APIComment|Declare an [[ALTAStressProfile Class|ALTAStressProfile]]. See [[ALTAStressProfile Class|ALTAStressProfile]] for additional details.}}
'''VBA'''
        Dim sp = New ALTAStressProfile("Profile1")
        sp.RepeatCycle = True
{{APIComment|'Declare a new ALTADataSet object.}}
        sp.AddSegment(1, 250)
  {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
        sp.AddSegment(2, 300)
 
        sp.AddSegment(3, 400)
{{APIComment|'Define 2 stress types with use stress levels &#61; 10 and 25.}}
  {{APIPrefix|Call}} ADS.AddStressDefinition({{APIString|"Stress1"}},,10)
  {{APIPrefix|Call}} ADS.AddStressDefinition({{APIString|"Stress2"}},,25)
 
{{APIComment|'Add failure times for Stress1 &#61; 190 and Stress2 &#61; 235.}}
  {{APIPrefix|Call}} ADS.AddFailure_3(100, 1, 190, 235)
  {{APIPrefix|Call}} ADS.AddFailure_3(120, 1, 190, 235)
  {{APIPrefix|Call}} ADS.AddFailure_3(130, 1, 190, 235)


{{APIComment|Add the stress profile}}
'''VB.NET'''
        ALTADS.AddStressProfile(sp)
 
 
{{APIComment|'Declare a new ALTADataSet object.}}
{{APIComment|Add values to the raw data. See [[ALTADataSet.AddFailure|AddFailure]] for additional details.  Because one definition was added, only one stress is needed.}}
  {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
        ALTADS.AddFailure(1, 1, sp)
 
        ALTADS.AddFailure(2, 1, sp)
{{APIComment|'Define 2 stress types with use stress levels &#61; 10 and 25.}}
        ALTADS.AddFailure(3, 1, sp)
  ADS.AddStressDefinition({{APIString|"Stress1"}},,10)
  ADS.AddStressDefinition({{APIString|"Stress2"}},,25)
{{APIComment|'Add failure times for Stress1 &#61; 190 and Stress2 &#61; 235.}}
  ADS.AddFailure(100, 1, 190, 235)
  ADS.AddFailure(120, 1, 190, 235)
  ADS.AddFailure(130, 1, 190, 235)

Latest revision as of 20:41, 24 June 2016

APIWiki.png


Member of: SynthesisAPI.ALTADataSet


Adds a stress type to the data set.

Syntax

.AddStressDefinition(Name, StressRelation, UseStress)

Parameters

Name

Required. String. The name of the stress.

StressRelation

Optional. The stress transformation that will be applied to the stress. Applies to the general log-linear (GLL) or cumulative damage (CD) models only. Can be any ALTASolverLSR constant. Default value = 0 (exponential life-stress relationship).

UseStress

Optional. Double. The use stress level. Default value = 1.


Example

The following example demonstrates how to add stress definitions to an ALTADataSet object.

VBA

 'Declare a new ALTADataSet object.  
  Dim ADS As New ALTADataSet
 
 'Define 2 stress types with use stress levels = 10 and 25. 
  Call ADS.AddStressDefinition("Stress1",,10)
  Call ADS.AddStressDefinition("Stress2",,25)
 
 'Add failure times for Stress1 = 190 and Stress2 = 235. 
  Call ADS.AddFailure_3(100, 1, 190, 235)
  Call ADS.AddFailure_3(120, 1, 190, 235)
  Call ADS.AddFailure_3(130, 1, 190, 235)
VB.NET
 
 'Declare a new ALTADataSet object.  
  Dim ADS As New ALTADataSet
 
 'Define 2 stress types with use stress levels = 10 and 25. 
  ADS.AddStressDefinition("Stress1",,10)
  ADS.AddStressDefinition("Stress2",,25)

 'Add failure times for Stress1 = 190 and Stress2 = 235. 
  ADS.AddFailure(100, 1, 190, 235)
  ADS.AddFailure(120, 1, 190, 235)
  ADS.AddFailure(130, 1, 190, 235)