Analysis package¶
Analysis package presentation¶
This module contains all the analysis type that are provided by pyHarm. The module is organized around an abstract class ABCAnalysis and a Factory that is in charge of creating the objects. All analysis object must comply with the ABCAnalysis abstract class. The section below presents the different classes that are available in this module.
ABCAnalysis¶
The ABCAnalysis class is an abstract class defining the essential components of any analysis. The initialisation of an instance requires an input dictionary containing the setup of the analysis, a system of type ABCSystem and the number of degrees of freedom to be treated. Three abstract methods are defined :
Methods |
Use |
|---|---|
|
Abstract method : Initialises the analysis by treating the first point to solve |
|
Abstract method : Method that describes the process of going from a solve point to the next point to solve |
|
Abstract method : Method that runs to whole solving process of the analysis |
Examples of creating an ABCAnalysis and adding it into an input dictionary:¶
To be created, an ABCAnalysis needs its abstract methods to be defined :
class FakeAnalysis(ABCAnalysis):
factory_keyword="fakeana"
def initialise(self, x0=None, **kwargs):
# this method shall solve the given initial point of the analysis.
pass
def makeStep(self,**kwargs) :
# this method shall make a step from previous solution and solve the new initial guess
pass
def Solve(self, x0=None, **kwargs):
# This method shall run the initialise method and then loop over the makeStep method until a stopping criterion is reached.
pass
INP = {
...,
"analysis":{
...,
"FakeAna":{
"study":"fakeana",
...,
},
...,
},
...,
}
FactoryNonLinearStudy¶
This file contains the dictionary of all the analysis that are available as well as the function generateNonLinearAnalysis that creates the analysis objects based on the type of analysis and the provided input.
FRF_NonLinear frf¶
The FRF_NonLinear object inherits from ABCAnalysis and the analysis that performs a forced response analysis. The process closely follows the advised process described in detail in [1] using a prediction/correction procedure. The method requires the following parameters into its input dictionary :
key |
Use |
Default value |
|---|---|---|
|
Defines the ABCNonLinearSolver object to be created |
✓ “scipyroot” |
|
Defines the ABCPredictor object to be created |
✓ “tangent” |
|
Defines the ABCCorrector object to be created |
✓ : “arc_length” |
|
Defines the list of ABCReductor object to be created |
✓ : [{“type”:”noreductor”}] |
|
Defines the ABCStepSizeRule object to be created |
✓ : “acceptance” |
|
Defines the ABCStopCriterion object to be created |
✓ : “bounds” |
|
Defines the direction of the path along the response curve : 1 forward, -1 backward |
✓ : 1 |
|
Defines the lower bound of the angular frequency range [float:rad/s] |
✓ : 0.1 |
|
Defines the upper bound of the angular frequency range [float:rad/s] |
✓ : 1.0 |
|
Defines starting angular frequency of interest [float:rad/s] |
✓ : |
|
Defines the minimal stepsize [float] |
✓ : 1e-8 |
|
Defines the maximal stepsize [float] |
✓ : 1e0 |
|
Defines the starting stepsize [float] |
✓ : 1e0 |
|
Defines if the jacobians are purged along the solving process [bool] |
✓ : True |
|
Defines if information along the solving is displayed [bool] |
✓ : True |
Linear_Analysis linear_analysis¶
The Linear_Analysis object inherits from ABCAnalysis. It first performs a modal analysis, followed by a linear frequency response analysis by using mode superposition. The method requires the following parameters into its input dictionary :
key |
Use |
Default value |
|---|---|---|
|
Defines the lower bound of the angular frequency range [float:rad/s] |
✓ : 0.1 |
|
Defines the upper bound of the angular frequency range [float:rad/s] |
✓ : 1.0 |
|
Defines if information along the solving is displayed [bool] |
✓ : True |
|
Defines the damping (either Rayleigh or modal) for the whole system [dict] |
✓ : 0.1% modal damping |
References¶
[1] M. Krack and J. Gross, Harmonic Balance for Non Linear Vibration Problems. 2019.
API links