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

xdata

x-axis samples

Type:

DataAxis

ydata

array of Signal samples with dimension Ndof x Nxdata with ndarray output of (Ndofs,Nxdata) output

Type:

ndarray or function

dof

object with ID, local DOF and DOFtype of ydata channels

Type:

DOF

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

Nsig

Number of Signal channels

Nxdata

Number of DataAxis samples

dof

xdata

ydata

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

inf2zero()

sets all infs to zero

Returns:

with inf’s replaced by 0.

Return type:

Signal

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

nan2zero()

sets all ‘NaN’s to zero

Returns:

with NaNs replaced by 0.

Return type:

Signal

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:

Signal

sum()

sum of Signals

For reasonable results DOFtype must not change

Returns:

sum of all DOFs per x-axis.

Return type:

Signal

transfer(other, IDs=None)

Calculates the transfer function of similar types between differnt DOFs

Parameters:
  • other (Signal) – input Signal.

  • IDs (tuple or list of int, optional) – output and input ID. The default is [0,1].

Raises:

ValueError – IN case of not consitent data.

Returns:

transfer coefficient, self/other.

Return type:

Signal

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:

Signal