pyva.loads.loadCase.Load
- class pyva.loads.loadCase.Load(xdata, ydata, dof, name='Load', **kwargs)
Bases:
Signal
Class Load management in dynamic model extends Signal
- ydata
array of Signal samples with dimension Ndof x Nxdata with ndarray output of (Ndofs,Nxdata) output
- Type:
ndarray or function
- name
identifier for loadcase
- Type:
str
- __init__(xdata, ydata, dof, name='Load', **kwargs)
Constructor of Load
- Parameters:
xdata (DataAxis) – x-axis samples
ydata (ndarray or function) – array of Signal samples with dimension Ndof x Nxdata with ndarray output of (Ndofs,Nxdata) output
dof (DOF) – object with ID, local DOF and DOFtype of ydata channels
name (str) – identifier for loadcase. The default is ‘Load’.
**kwargs (dict) – Arbitrary keyword list.
- Return type:
None.
Methods
__init__
(xdata, ydata, dof[, name])Constructor of Load
conj
()getdof
()imag
()inf2zero
()sets all infs to zero
interp
(xvalues[, ix])interpolation for Signals
isa
(typestr)nan2zero
()sets all 'NaN's to zero
plot
(nfig[, loc, res, xscale, yscale])Plot method for Signal obejcts.
pressure
(ID)Exctracts the pressure from Signals
real
()setdof
(value)sum
()sum of Signals
transfer
(other[, IDs])Calculates the transfer function of similar types between differnt DOFs
volume_flow
(ID[, dofarg, S])Exctracts the volume flow from Signals
Attributes
Number of Signal channels
Number of DataAxis samples
- property Nsig
Number of Signal channels
- Returns:
Number of Signal DOFs.
- Return type:
int
- property Nxdata
Number of DataAxis samples
- Returns:
Number of samples.
- Return type:
int
- interp(xvalues, ix=0)
interpolation for Signals
Provides interpolated values when sample is not given
- Parameters:
xvalues (double) – xvalues for interpolation from Signal
ix (integer, optional) – Signal index. The default is 0.
- Returns:
interpolated ydata values for Signal of index ix
- Return type:
ndarray
- plot(nfig, loc=1, res='mag', xscale='linear', yscale='linear', **kwargs)
Plot method for Signal obejcts.
- Parameters:
nfig (TYPE) – number of figure.
loc (int or str, optional) – location of legend. The default is 1.
res (str, optional) – kind of result mag, phase, real, imag. The default is ‘mag’.
xscale (str, optional) – linear or log. The default is ‘linear’.
yscale (str, optional) –
- linear or log. The default is ‘linear’.
ls : line style
**kwargs – Arbitrary argument list.
ID (IDs to plot) –
dof (DOFs to plot e.g. [1,2]) –
legstr (additional label added to automatic label) –
fulllegstr (list of labels overwriting the automatic label) –
DX (int) – value for skipping x samples DX=2 skips every second sample
lw (list or tuple) – line width
cs (list or tuple) – colorstyle
ms (list or tuple) – markerstyle
ls (list or tuple) – line_styles
- Raises:
ValueError – DESCRIPTION.
- Return type:
None.
- pressure(ID)
Exctracts the pressure from Signals
- Parameters:
ID (int) – node ID.
- Returns:
extracted pressure Signal.
- Return type:
- sum()
sum of Signals
For reasonable results DOFtype must not change
- Returns:
sum of all DOFs per x-axis.
- Return type:
- transfer(other, IDs=None)
Calculates the transfer function of similar types between differnt DOFs
- volume_flow(ID, dofarg=1, S=1.0)
Exctracts the volume flow from Signals
- Parameters:
ID (int) – node ID.
dofarg (int, optional) – local degree of freedom. The default is 1.
S (float, optional) – DESCRIPTION. The default is 1..
- Raises:
ValueError – DESCRIPTION.
- Returns:
of volume flow DOFs.
- Return type: