ALTADataSet.AddStressProfile: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:




<onlyinclude>Returns an [[ALTAStressProfile_Class|ALTAStressProfile]] object that represents a time-dependent stress profile and associates it with an ALTADataSet object. Applies to the cumulative damage (CD) model only.</onlyinclude>
<onlyinclude>Adds an [[ALTAStressProfile_Class|ALTAStressProfile]] object, which represents a time-dependent stress profile, to the ALTADATASet object. Applies to the cumulative damage (CD) model only.</onlyinclude>


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


==Example==
==Example==
The following example demonstrates how to create a stress profile and associate it with an ALTADataSet object.
The following example demonstrates how to analyze an ALTA data set with a stress profile.


  '''VB.NET'''
  '''VB.NET'''
   
   
  {{APIComment|'Declare a new ALTADataSet object.}}  
  {{APIComment|'Declare an ALTADataSet object.}}  
   {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
   {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
   
   
  {{APIComment|'Declare a new stress profile.}}
{{APIComment|'Define a stress type.}}
   {{APIPrefix|Dim}} sp {{APIPrefix|As New}} ALTAStressProfile({{APIString|"Profile1"}})
  ADS.AddStressDefinition({{APIString|"Temperature"}},,)
  {{APIComment|'Declare a new stress profile and define its segments.}}
   {{APIPrefix|Dim}} sp {{APIPrefix|As New}} ALTAStressProfile({{APIString|"Temperature_Profile"}})
   sp.RepeatCycle = True
   sp.RepeatCycle = True
   sp.AddSegment(1, 250)
   sp.AddSegment(1, 100)
   sp.AddSegment(2, 300)
   sp.AddSegment(2, 120)
   sp.AddSegment(3, 400)
   sp.AddSegment(3, 150)
    
    
  {{APIComment|'Add the stress profile to the ALTADataSet object.}}
  {{APIComment|'Add the stress profile to the ALTADataSet object.}}
   ALTADS.AddStressProfile(sp)
   ADS.AddStressProfile(sp)
 
 
  {{APIComment|'Add a failure time to the data set, using the stress profile.}}
  {{APIComment|'Add failure times to the data set.}}
   ALTADS.AddFailure(100, 1, sp)
   ADS.AddFailure(61, 1, sp)
  ADS.AddFailure(75, 1, sp)
  ADS.AddFailure(90, 1, sp)
  ADS.AddFailure(95, 1, sp)
  ADS.AddFailure(100, 1, sp)
{{APIComment|'Calculate results.}}
  ADS.AnalysisSettings.ModelType = ALTASolverModel.CumDamage
  ADS.AnalysisSettings.Distribution = ALTASolverDistribution.Weibull
  ADS.Calculate()

Revision as of 16:13, 19 April 2016

APIWiki.png


Member of: SynthesisAPI.ALTADataSet


Adds an ALTAStressProfile object, which represents a time-dependent stress profile, to the ALTADATASet object. Applies to the cumulative damage (CD) model only.

Syntax

.AddStressProfile(Profile)

Parameters

Profile

Required. The ALTAStressProfile object.


Example

The following example demonstrates how to analyze an ALTA data set with a stress profile.

VB.NET

 'Declare an ALTADataSet object.  
  Dim ADS As New ALTADataSet

 'Define a stress type.  
  ADS.AddStressDefinition("Temperature",,)

 'Declare a new stress profile and define its segments. 
  Dim sp As New ALTAStressProfile("Temperature_Profile")
  sp.RepeatCycle = True
  sp.AddSegment(1, 100)
  sp.AddSegment(2, 120)
  sp.AddSegment(3, 150)
 
 'Add the stress profile to the ALTADataSet object. 
  ADS.AddStressProfile(sp)
  
 'Add failure times to the data set. 
  ADS.AddFailure(61, 1, sp)
  ADS.AddFailure(75, 1, sp)
  ADS.AddFailure(90, 1, sp)
  ADS.AddFailure(95, 1, sp)
  ADS.AddFailure(100, 1, sp)

 'Calculate results. 
  ADS.AnalysisSettings.ModelType = ALTASolverModel.CumDamage
  ADS.AnalysisSettings.Distribution = ALTASolverDistribution.Weibull
  ADS.Calculate()