pyva.data.dof.DOFtype
- class pyva.data.dof.DOFtype(**kwargs)
Bases:
object
The DOFtype class provides methods to deal with types of phyical quantities in combination with units.
Units are defined by the pint package, but this does not include a clear definition of the phyiscal quantity. For example a force can be a reaction force of a force itself. Stress and pressure have the same base units so there is a need for managing the quantitiy.
The
exp
andxexp
attributes are aimed at spectral data infomation. For example if a specta is an amplitude spectrum, a an amplitude per root frequency or the squared amplitud per frequency. Thus, they are not inpluded in the mathematical operations ``+, -, *, / ``This class uses the pint module
- type
ID of DOF type, e.g. 8 for displacement
- Type:
int
- xtype
ID of nodal DOF for x axis, e.g. 1,2,3 for x,y,z direction 4 for roation around x-axis
- Type:
int
- exp
Exponent of the data, used for Signal power e.g. 2 for p^2
- Type:
float
- xexp
Exponent of data-axis exponent, e.g. -1 spectral density p^2/f
- Type:
floot
- unit
Physical unit of the quantity
- Type:
ureg
type
physical quantity
0
‘unknown’,
1
‘general’,
2
‘stress’,
3
‘strain’,
5
‘temperature’,
6
‘heat flux’,
8
‘displacement’,
9
‘force’,
10
‘volume flow’,
11
‘velocity’,
12
‘acceleration’,
13
‘excitation force’,
15
‘pressure’,
16
‘mass’,
17
‘time’,
18
‘frequency’,
19
‘rpm’,
20
‘order’,
21
‘angular frequency’,
22
‘sound intensity’,
23
‘power’
24
‘area’
25
‘transmission’
26
‘wavenumber’
27
‘energy’
- __init__(**kwargs)
Constructor of DOFtype class
- Parameters:
**kwargs (dict) – Arbitrary keyword arguemts list.
typestr (int) – ID of DOF type, e.g. 8 for displacement
typeID (int) – ID of nodal DOF for x axis, e.g. 1,2,3 for x,y,z direction 4 for roation around x-axis
xtypestr (str) – typestr, e.g. ‘diplacement’
xtypeID (int) – ID of xaxis, e.g. 18 for frequency
exponent (float) – Exponent of the data, used for Signal power e.g. 2 for p^2
xdata_exponent' (floot) – Exponent of data-axis exponent, e.g. -1 spectral density p^2/f
- Raises:
ValueError – Unkown values.
- Return type:
None.
Methods
__init__
(**kwargs)Constructor of DOFtype class
label
()Provides label
qlabel
()- returns:
_str -- DESCRIPTION.
ulabel
()Provide unit label
Attributes
Length, Mass, Time, exponents of instance
decibel reference value linked to unit
LMT as combination of nominator and denominator
Special ID that includes all types and exponents generated from LMT
property method
returns: DESCRIPTION.
property method
Length, Mass, Time, exponents of x-axis of instance
property method
property method
- property LMT
Length, Mass, Time, exponents of instance
- Returns:
np.array([L,M,T]).
- Return type:
ndarray
- property dBref
decibel reference value linked to unit
- Returns:
_ret – reference value, e.g. 20e-6 Pa for pressure.
- Return type:
float
- property fullLMT
LMT as combination of nominator and denominator
Length - Mass - Time units
- Returns:
np.array([L,M,T]).
- Return type:
ndarray
- property fulltype
Special ID that includes all types and exponents generated from LMT
- Returns:
Integer with specific digits for L, M or T
- Return type:
int
- label()
Provides label
- Returns:
_str – Full label, e.g. ‘displacement / meter’ .
- Return type:
str
- qlabel()
- Returns:
_str – DESCRIPTION.
- Return type:
TYPE
- property type
property method
- Returns:
type.
- Return type:
int
- property typestr
returns: DESCRIPTION. :rtype: TYPE
- ulabel()
Provide unit label
- Returns:
_str – unit str ‘meter’.
- Return type:
str
- property ureg
property method
- Returns:
unit registry.
- Return type:
ureg
- property xLMT
Length, Mass, Time, exponents of x-axis of instance
- Returns:
np.array([L,M,T]).
- Return type:
ndarray
- property xtypestr
property method
- Returns:
xtypestr.
- Return type:
str
- property xureg
property method
- Returns:
unit registry for x-axis.
- Return type:
ureg