Skip to content

Add load definition (signals, channels, load cases) - #69

Open
zairisabri123 wants to merge 3 commits into
faberorg:mainfrom
zairisabri123:feature/load-class
Open

zairisabri123 wants to merge 3 commits into
faberorg:mainfrom
zairisabri123:feature/load-class

Conversation

@zairisabri123

Copy link
Copy Markdown

Summary
Adds a way to describe loads: time signals, load channels and load cases. The results can be exported as Voigt-notation histories.

fatpy.utils.signal

  • Waveform enum and waveform_shape, which generate standard waveform shapes.
  • ConstantAmplitudeSignal and VariableAmplitudeSignal, both following a shared Signal protocol.
  • period_lcm and common_time_axis, which find the common period and a shared time axis for several periodic signals.
  • Inputs are checked: values must be finite, and the arrays returned are read-only.

fatpy.data_parsing.loads

  • Channel, ChannelHistory, LoadHistory and LoadCase.
  • A Quantity enum and a voigt_index helper that maps stress components to Voigt notation.
  • Export of load cases to Voigt stress, and a LoadDefinitionError raised for invalid definitions.

Examples and tests

  • src/fatpy/examples/load_usage.py shows 7 example load cases.
  • New tests are in tests/utils/test_signal.py and tests/data_parsing/test_loads.py.

Test plan

  • pytest tests/utils/test_signal.py tests/data_parsing/test_loads.py: 129 passed

- utils/signal.py: waveforms, constant- and variable-amplitude signals,
  common period of periodic signals.
- data_parsing/loads.py: Channel, LoadCase and LoadHistory, with export to Voigt stress.
- Tests for both modules and a usage example with 7 load cases.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant