FEDEM Solver  R8.0
Source code of the dynamics solver
Data Types | Functions/Subroutines | Variables
freqresponsemodule Module Reference

Module with subroutines for frequency domain analysis. More...

Data Types

type  dloadmotion
 Data type for frequency-domain load/motions. More...
 

Functions/Subroutines

subroutine, public solvefreqdomain (ierr)
 Interface to the frequency-domain solver module in Fedem. More...
 
subroutine, public deallocatefreq ()
 Deallocates the dynamic structures of the frequency domain analysis. More...
 
subroutine read_input (mech)
 Reads input specifications for the frequency domain analysis. More...
 
subroutine freq_eigenvalues (ndim, IOC, IOF, ierr)
 Calculates the eigenvalues and eigenvectors (optional). More...
 
subroutine freq_sweep (ndim, ierr)
 Runs a sweep analysis for detecting the eigenfrequencies (optional). More...
 
subroutine freq_input (forces, npt, inc, start, IOC, ierr)
 Load and motion definition for the frequency domain analysis. More...
 
subroutine freqincandupdate (sam, sys, mech, dis, vel, acc, ierr)
 Updates mechanism based on displacement, velocity and acceleration. More...
 
subroutine freq_segment (data, sUd, sUv, sUa, mDmp, del, npt, sdim, ierr)
 Handles the data segments including modal or direct solution. More...
 
subroutine freq_seg_analysis (sam, sys, mech, t, IOC, IOF, ierr)
 Main driver for the segmented frequency response analysis. More...
 
subroutine complexeqsolv (n, A, B, ierr)
 Solving a complex system of linear equations. More...
 
subroutine fft_complex_1d (n, data, del, transform, viewing, ierr)
 Fourier transformation for a single periodic sequence within a complex array. More...
 
subroutine createpyplot (abscissa, ordinate, atitle, alabel, afilename, axlabel, savefigure, istat)
 Creates output file for curve plotting in python. More...
 
subroutine createpyplotcurves (abscissa, ordinate, atitle, alabel, afilename, axlabel, type, savefigure)
 Creates output file for curve plotting in python. More...
 

Variables

type(dloadmotion), dimension(:), pointer, save plm => null()
 All frequency-domain loads and motions. More...
 
integer, save nrmodes
 number of modes used in the calculation More...
 
integer, save windowsize
 describes the window size in samples More...
 
integer, save sweep_dof
 sweep analysis (sweep location for acting force) More...
 
real(dp), dimension(2), save sweep_range
 sweep range (start and end frequency) More...
 
real(dp), save fs
 sampling frequency More...
 
integer, dimension(20), save output_triad_dof
 postprocessing, contains triad id and local dof number More...
 
integer, dimension(10), save out_dof
 internal equation number (based on output_triad_dof) More...
 
type(pyplot), pointer, save plt => null()
 python plot handler More...
 
integer, save ccw = 0
 total number of windows More...
 
integer, save seg_start = 0
 segstart (total position) More...
 

Detailed Description

Module with subroutines for frequency domain analysis.

Function/Subroutine Documentation

◆ complexeqsolv()

subroutine freqresponsemodule::complexeqsolv ( integer, intent(in)  n,
complex(dp), dimension(:,:), intent(inout)  A,
complex(dp), dimension(:), intent(inout)  B,
integer, intent(out)  ierr 
)

Solving a complex system of linear equations.

Parameters
[in]nmatrix dimension
[in,out]Acontains complex matrix A
[in,out]Bcontains rhs and the solution vector
[out]ierrerror flag

Number of right hand sides is set to 1.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createpyplot()

subroutine freqresponsemodule::createpyplot ( real(dp), dimension(:), intent(in)  abscissa,
real(dp), dimension(:), intent(in)  ordinate,
character(len=*), intent(in)  atitle,
character(len=*), intent(in)  alabel,
character(len=*), intent(in)  afilename,
character(len=*), intent(in)  axlabel,
logical, intent(in), optional  savefigure,
integer, intent(out)  istat 
)

Creates output file for curve plotting in python.

Parameters
[in]abscissaabscissa values
[in]ordinateordinate values
[in]atitlegraph plot title
[in]alabeldescribes the plot
[in]afilenamefilename for writing the plot values
[in]axlabeldescribes the x axis
[in]savefigureflag for saving the plot as *.png
[out]istatstatus flag

Optionally also creates *.png graphics.

Here is the caller graph for this function:

◆ createpyplotcurves()

subroutine freqresponsemodule::createpyplotcurves ( real(dp), dimension(:), intent(in)  abscissa,
complex(dp), dimension(:,:), intent(in)  ordinate,
character(len=*), intent(in)  atitle,
character(len=*), intent(in)  alabel,
character(len=*), intent(in)  afilename,
character(len=*), intent(in)  axlabel,
integer, intent(in), optional  type,
logical, intent(in), optional  savefigure 
)
private

Creates output file for curve plotting in python.

Parameters
[in]abscissaabscissa values
[in]ordinateordinate values
[in]atitlegraph plot title
[in]alabeldescribes the plot
[in]afilenamefilename for writing the plot values
[in]axlabeldescribes the x axis
[in]typereal(1), imaginary(2) and absolute plot(3)
[in]savefigureflag for saving the plot as *.png

Optionally also creates *.png graphics.

Here is the caller graph for this function:

◆ deallocatefreq()

subroutine, public freqresponsemodule::deallocatefreq

Deallocates the dynamic structures of the frequency domain analysis.

Here is the caller graph for this function:

◆ fft_complex_1d()

subroutine freqresponsemodule::fft_complex_1d ( integer, intent(in)  n,
complex(dp), dimension(:), intent(inout)  data,
real(dp), intent(in)  del,
character(len=*), intent(in)  transform,
logical, intent(in), optional  viewing,
integer, intent(out)  ierr 
)

Fourier transformation for a single periodic sequence within a complex array.

Parameters
[in]nnumber of points
[in,out]datainput data (complex)
[in]deldata spacing
[in]transformforward or backward fourier transformation
[in]viewingoptional parameter
[out]ierrerror flag
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freq_eigenvalues()

subroutine freqresponsemodule::freq_eigenvalues ( integer, intent(in)  ndim,
integer, intent(in)  IOC,
integer, intent(in)  IOF,
integer, intent(out)  ierr 
)

Calculates the eigenvalues and eigenvectors (optional).

Parameters
[in]ndimDimension of the global equation system
[in]IOCFile unit number for console output
[in]IOFFile unit number for file output
[out]ierrError flag
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freq_input()

subroutine freqresponsemodule::freq_input ( type(forcetype), dimension(:), intent(in)  forces,
integer, intent(inout)  npt,
real(dp), intent(inout)  inc,
real(dp), intent(in)  start,
integer, intent(in)  IOC,
integer, intent(out)  ierr 
)
private

Load and motion definition for the frequency domain analysis.

Parameters
[in]forcesAll force objects in the model
[in,out]nptNumber of sample points
[in,out]incTime increment [s]
[in]startStart time for window
[in]IOCFile unit number for console output
[out]ierrError flag
Here is the caller graph for this function:

◆ freq_seg_analysis()

subroutine freqresponsemodule::freq_seg_analysis ( type(samtype), intent(in)  sam,
type(systemtype), intent(inout)  sys,
type(mechanismtype), intent(inout)  mech,
real(dp), intent(in)  t,
integer, intent(in)  IOC,
integer, intent(in)  IOF,
integer, intent(out)  ierr 
)
private

Main driver for the segmented frequency response analysis.

Parameters
[in]samData for managing system matrix assembly
[in,out]sysSystem level model data
[in,out]mechMechanism components of the model
[in]ttime interval
[in]IOCFile unit number for console output
[in]IOFFile unit number for file output
[out]ierrError flag

Data segmenting and windowing.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freq_segment()

subroutine freqresponsemodule::freq_segment ( complex(dp), dimension(:,:), intent(inout)  data,
complex(dp), dimension(:,:), intent(inout)  sUd,
complex(dp), dimension(:,:), intent(inout)  sUv,
complex(dp), dimension(:,:), intent(inout)  sUa,
type(functiontype), intent(in), pointer  mDmp,
real(dp), intent(in)  del,
integer, intent(in)  npt,
integer, intent(in)  sdim,
integer, intent(out)  ierr 
)

Handles the data segments including modal or direct solution.

Parameters
[in,out]dataSegment data (on input; loads and constraints)
[in,out]sUdSegment displacement data
[in,out]sUvSegment velocity data
[in,out]sUaSegment acceleration data
[in]mDmpFrequency-dependent modal damping function
[in]delStep size for time series
[in]nptNumber of sampling points
[in]sdimSystem dimension
[out]ierrError indicator
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freq_sweep()

subroutine freqresponsemodule::freq_sweep ( integer, intent(in)  ndim,
integer, intent(out)  ierr 
)

Runs a sweep analysis for detecting the eigenfrequencies (optional).

Parameters
[in]ndimDimension of the global equation system
[out]ierrError flag
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freqincandupdate()

subroutine freqresponsemodule::freqincandupdate ( type(samtype), intent(in)  sam,
type(systemtype), intent(inout)  sys,
type(mechanismtype), intent(inout)  mech,
real(dp), dimension(:), intent(in)  dis,
real(dp), dimension(:), intent(in)  vel,
real(dp), dimension(:), intent(in)  acc,
integer, intent(out)  ierr 
)

Updates mechanism based on displacement, velocity and acceleration.

Parameters
[in]samData for managing system matrix assembly
[in,out]sysSystem level model data
[in,out]mechMechanism components of the model
[in]disDisplacement increment
[in]velVelocity increment
[in]accAcceleration increment
[out]ierrError flag

All position variables are updated with respect to the previous configuration to not intervene with the time domain response. The current configuration will then be restored back to the previous one after the results are saved.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_input()

subroutine freqresponsemodule::read_input ( type(mechanismtype), intent(in)  mech)
private

Reads input specifications for the frequency domain analysis.

Parameters
[in]mechMechanism components of the model
Here is the call graph for this function:
Here is the caller graph for this function:

◆ solvefreqdomain()

subroutine, public freqresponsemodule::solvefreqdomain ( integer, intent(out)  ierr)

Interface to the frequency-domain solver module in Fedem.

Parameters
[out]ierrError flag
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ccw

integer, save freqresponsemodule::ccw = 0
private

total number of windows

◆ fs

real(dp), save freqresponsemodule::fs
private

sampling frequency

◆ nrmodes

integer, save freqresponsemodule::nrmodes
private

number of modes used in the calculation

◆ out_dof

integer, dimension(10), save freqresponsemodule::out_dof
private

internal equation number (based on output_triad_dof)

◆ output_triad_dof

integer, dimension(20), save freqresponsemodule::output_triad_dof
private

postprocessing, contains triad id and local dof number

◆ plm

type(dloadmotion), dimension(:), pointer, save freqresponsemodule::plm => null()
private

All frequency-domain loads and motions.

◆ plt

type(pyplot), pointer, save freqresponsemodule::plt => null()
private

python plot handler

◆ seg_start

integer, save freqresponsemodule::seg_start = 0
private

segstart (total position)

◆ sweep_dof

integer, save freqresponsemodule::sweep_dof
private

sweep analysis (sweep location for acting force)

◆ sweep_range

real(dp), dimension(2), save freqresponsemodule::sweep_range
private

sweep range (start and end frequency)

◆ windowsize

integer, save freqresponsemodule::windowsize
private

describes the window size in samples