ALTADataSet.AddStressDefinition: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:




<onlyinclude>Adds a stress definition to the data set.</onlyinclude>
<onlyinclude>Adds a stress type to the data set.</onlyinclude>
 


==Syntax==
==Syntax==
Line 13: Line 12:


''StressRelation''
''StressRelation''
:Optional. The stress transformation that will be applied to the stress. Can be any [[ALTASolverLSR_Enumeration|ALTASolverLSR]] constant. Default value &#61; 0.
: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).


''UseStress''
''UseStress''
Line 28: Line 27:
    
    
  {{APIComment|'Define 2 stress types with use stress levels &#61; 10 and 25.}}
  {{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|"Stress1"}},,10)
   {{APIPrefix|Call}} ADS.AddStressDefinition({{APIString|"Stress2",,25}})
   {{APIPrefix|Call}} ADS.AddStressDefinition({{APIString|"Stress2"}},,25)
    
    
  {{APIComment|'Add failure times for Stress1 &#61; 190 and Stress2 &#61; 235.}}
  {{APIComment|'Add failure times for Stress1 &#61; 190 and Stress2 &#61; 235.}}
  {{APIPrefix|Dim}} Stress(1) {{APIPrefix|As}} Variant
   {{APIPrefix|Call}} ADS.AddFailure_3(100, 1, 190, 235)
  Stress(0) = 190
   {{APIPrefix|Call}} ADS.AddFailure_3(120, 1, 190, 235)
  Stress(1) = 235
   {{APIPrefix|Call}} ADS.AddFailure_3(130, 1, 190, 235)
   {{APIPrefix|Call}} ADS.AddFailure(100, 1, Stress)
   {{APIPrefix|Call}} ADS.AddFailure(120, 1, Stress)
   {{APIPrefix|Call}} ADS.AddFailure(130, 1, Stress)
  {{APIPrefix|Call}} ADS.AddFailure(140, 1, Stress)


  '''VB.NET'''
  '''VB.NET'''
Line 47: Line 41:
    
    
  {{APIComment|'Define 2 stress types with use stress levels &#61; 10 and 25.}}
  {{APIComment|'Define 2 stress types with use stress levels &#61; 10 and 25.}}
   ADS.AddStressDefinition({{APIString|"Stress1",,10}})
   ADS.AddStressDefinition({{APIString|"Stress1"}},,10)
   ADS.AddStressDefinition({{APIString|"Stress2",,25}})
   ADS.AddStressDefinition({{APIString|"Stress2"}},,25)
   
   
  {{APIComment|'Add failure times for Stress1 &#61; 190 and Stress2 &#61; 235.}}
  {{APIComment|'Add failure times for Stress1 &#61; 190 and Stress2 &#61; 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)