ALTADataSet.AddStressProfile: Difference between revisions
Jump to navigation
Jump to search
Kate Racaza (talk | contribs) No edit summary |
Kate Racaza (talk | contribs) No edit summary |
||
Line 14: | Line 14: | ||
==Example== | ==Example== | ||
The following example demonstrates how to analyze an ALTA data set with a stress profile. | The following example demonstrates how to analyze an ALTA data set with a stress profile. | ||
'''VBA''' | |||
{{APIComment|'Declare an ALTADataSet object.}} | |||
{{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet | |||
{{APIComment|'Define a stress type, with use stress = 100.}} | |||
{{APIPrefix|Call}} ADS.AddStressDefinition({{APIString|"Temperature"}},,100) | |||
{{APIComment|'Declare a new stress profile and define its segments.}} | |||
{{APIPrefix|Dim}} sp {{APIPrefix|As New}} ALTAStressProfile | |||
sp.Name = "Profile1" | |||
sp.RepeatCycle = True | |||
{{APIPrefix|Call}} sp.AddSegment(1, 100) | |||
{{APIPrefix|Call}} sp.AddSegment(2, 120) | |||
{{APIPrefix|Call}} sp.AddSegment(3, 150) | |||
{{APIComment|'Add the stress profile to the ALTADataSet object.}} | |||
{{APIPrefix|Call}} ADS.AddStressProfile(sp) | |||
{{APIComment|'Add failure times to the data set.}} | |||
{{APIPrefix|Call}} ADS.AddFailure_2(61, 1, sp) | |||
{{APIPrefix|Call}} ADS.AddFailure_2(75, 1, sp) | |||
{{APIPrefix|Call}} ADS.AddFailure_2(90, 1, sp) | |||
{{APIPrefix|Call}} ADS.AddFailure_2(95, 1, sp) | |||
{{APIPrefix|Call}} ADS.AddFailure_2(100, 1, sp) | |||
{{APIComment|'Use the cumulative damage model with the Weibull distribution.}} | |||
ADS.AnalysisSettings.ModelType = ALTASolverModel_CumDamage | |||
ADS.AnalysisSettings.Distribution = ALTASolverDistribution_Weibull | |||
{{APIComment|'Calculate results.}} | |||
{{APIPrefix|Call}} ADS.Calculate() | |||
'''VB.NET''' | '''VB.NET''' | ||
Line 20: | Line 54: | ||
{{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet | {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet | ||
{{APIComment|'Define a stress type.}} | {{APIComment|'Define a stress type, with use stress = 100.}} | ||
ADS.AddStressDefinition({{APIString|"Temperature"}},,) | ADS.AddStressDefinition({{APIString|"Temperature"}},,) | ||
Line 40: | Line 74: | ||
ADS.AddFailure(100, 1, sp) | ADS.AddFailure(100, 1, sp) | ||
{{APIComment|' | {{APIComment|'Use the cumulative damage model with the Weibull distribution.}} | ||
ADS.AnalysisSettings.ModelType = ALTASolverModel.CumDamage | ADS.AnalysisSettings.ModelType = ALTASolverModel.CumDamage | ||
ADS.AnalysisSettings.Distribution = ALTASolverDistribution.Weibull | ADS.AnalysisSettings.Distribution = ALTASolverDistribution.Weibull | ||
{{APIComment|'Calculate results.}} | |||
ADS.Calculate() | ADS.Calculate() |
Revision as of 23:07, 5 May 2016
Member of: SynthesisAPI.ALTADataSet
Adds an ALTAStressProfile object, which represents a time-dependent stress profile, to the data set. 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.
VBA 'Declare an ALTADataSet object. Dim ADS As New ALTADataSet 'Define a stress type, with use stress = 100. Call ADS.AddStressDefinition("Temperature",,100) 'Declare a new stress profile and define its segments. Dim sp As New ALTAStressProfile sp.Name = "Profile1" sp.RepeatCycle = True Call sp.AddSegment(1, 100) Call sp.AddSegment(2, 120) Call sp.AddSegment(3, 150) 'Add the stress profile to the ALTADataSet object. Call ADS.AddStressProfile(sp) 'Add failure times to the data set. Call ADS.AddFailure_2(61, 1, sp) Call ADS.AddFailure_2(75, 1, sp) Call ADS.AddFailure_2(90, 1, sp) Call ADS.AddFailure_2(95, 1, sp) Call ADS.AddFailure_2(100, 1, sp) 'Use the cumulative damage model with the Weibull distribution. ADS.AnalysisSettings.ModelType = ALTASolverModel_CumDamage ADS.AnalysisSettings.Distribution = ALTASolverDistribution_Weibull 'Calculate results. Call ADS.Calculate()
VB.NET 'Declare an ALTADataSet object. Dim ADS As New ALTADataSet 'Define a stress type, with use stress = 100. 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) 'Use the cumulative damage model with the Weibull distribution. ADS.AnalysisSettings.ModelType = ALTASolverModel.CumDamage ADS.AnalysisSettings.Distribution = ALTASolverDistribution.Weibull 'Calculate results. ADS.Calculate()