LinDynamicSim

class sharpy.solvers.lindynamicsim.LinDynamicSim[source]

Time-domain solution of Linear Time Invariant Systems

Uses the derived linear time invariant systems and solves it in time domain.

The inputs are provided by means of a list of dictionaries to the setting input_generators. For each input you want, you need a dictionary entry containing name (str) which is the name of the variable, index (int) for the index of the variable in the case of multidimensional variables (if unspecified reverts to 0) and the file_path to a text file containing the time series of the input. If the input variable is multidimensional, index may be a list of indices for each column of time series in the array in the input file.

Alternatively a case_name.lininput.h5 file in the case root folder can be used with the following entries:

  • x0 (optional): Initial state vector

  • input_vec: Input vector (n_tsteps, n_inputs).

Note

This solver is seldom used in SHARPy (its focus is on nonlinear time domain aeroelasticity) hence you may find this solver lacking in features. If you use it, you may need to make modifications. We would greatly appreciate that you contribute these modifications by means of a pull request!

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

write_dat

list(str)

List of vectors to write: x, y, u and/or t

[]

reference_velocity

float

Velocity to scale the structural equations when using a non-dimensional system

1.0

n_tsteps

int

Number of time steps to run

10

physical_time

float

Time to run

2.0

input_generators

list(dict)

List of dictionaries for each input

[]

dt

float

Time increment for the solution of systems without a specified dt

0.001

postprocessors

list(str)

[]

postprocessors_settings

dict

{}

input_vector(ss)[source]

Generates an input vector u of size n_tsteps x inputs and populates the correct columns with the time series arrays provided as text files in the settings input_generators.

Parameters:

ss (libss.StateSpace) – State Space object for which to generate input

Returns:

Input vector.

Return type:

np.array