pyoomph.utils.periodic_driving_response module
A module to compute the linear response of a system to a periodic driving force.
- class pyoomph.utils.periodic_driving_response.PeriodicDrivingResponse(problem, omega_param_name='_driving_omega', driving_domain_name='_driving', hopf_param_name='_driving_damping')[source]
Bases:
objectHelper class to compute the linear response of a system to a periodic driving force. Replace the periodic driving, e.g. some
cos(omega*var("time")), byget_driving_mode()in the problem. Then, after finding a stationary solution, you can useiterate_over_driving_frequencies()to iterate over driving frequencies and get the response of the system.- Parameters:
problem (
Problem) – The problem to which the driving force is applied.omega_param_name (
str) – The name of the parameter that stores the current driving frequency.hopf_param_name (
str) – The name of the parameter that is used to find the driving response.
- get_driving_mode()[source]
Must be used to replace the driving force in the problem.
- Returns:
An expression that represents the driving force for finding the linear response.
- iterate_over_driving_frequencies(*, omegas=None, freqs=None, unit=1, signum=1)[source]
Iterator to iterate over the response of the system to different driving frequencies.
- Parameters:
omegas (
Optional[List[Union[Expression,int,float]]]) – A list of angular frequencies to iterate over. You must either setomegasorfreqs.freqs (
Optional[List[Union[Expression,int,float]]]) – A list of frequencies to iterate over. You must either setomegasorfreqs.unit (
Union[Expression,int,float]) – An optional unit for the frequencies, e.g.kilo*hertz. Defaults to 1.signum (
int) – The sign orientation in the complex plane. Defaults to 1.
- Yields:
For each frequency, you get the current response as complex vector, with entries belonging to the degrees of freedom of the system.