Oasys.THIS.Operate class¶
Static methods¶
- classmethod Operate.Abs(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Convert a curve to absolute values
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
To convert curve m to absolute values and store as curve p
p = Oasys.THIS.Operate.Abs(m)
- classmethod Operate.Acos(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Calculate Arc Cosine
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Calculate Arc Cosine() of curve m and store as curve p
p = Oasys.THIS.Operate.Acos(m)
- classmethod Operate.Acu(input_curve, offset, time_period, output_curve=Oasys.gRPC.defaultArg)¶
Evaluates the integratal of a curve over a user defined period
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Integrate c curve over 0.07 seconds with a 0.1 offset
p = Oasys.THIS.Operate.Acu(m,0.1,0.007)
- classmethod Operate.Ad(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Convert acceleration spectrum to a displacment spectrum
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Convert curve m and store as curve p
p = Oasys.THIS.Operate.Ad(m)
- classmethod Operate.Add(input_curve, second_curve_or_constant, output_curve=Oasys.gRPC.defaultArg)¶
Add Y axis values
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
To add curves m and n together and store as curve p
p = Oasys.THIS.Operate.Add(m,n)To add 20.0 to the values in curve m and store as curve p
p = Oasys.THIS.Operate.Add(m,20.0)
- classmethod Operate.Adx(first_curve, second_curve_or_constant, output_curve=Oasys.gRPC.defaultArg)¶
Add X axis values
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
To add X axis values for curves m and n together and store as curve p
p = Oasys.THIS.Operate.Adx(m,n)To add 20.0 to the X axis values in curve m and store as curve p
p = Oasys.THIS.Operate.Adx(m,20.0)
- classmethod Operate.Asi(x_acceleration, y_acceleration, z_acceleration, acceleration_conversion_factor, x_acceleration_limit, y_acceleration_limit, z_acceleration_limit, calculation_method, x_axis_interval=Oasys.gRPC.defaultArg, output_curve=Oasys.gRPC.defaultArg)¶
Acceleration Severity Index. This value is used to assess the performance of road side crash barriers. The calculation method can be set to 2010 (BS EN 1317-1:2010) or 1998 (BS EN 1317-1:1998)
- Parameters:
x_acceleration (Curve) – X Acceleration
Curve
y_acceleration (Curve) – Y Acceleration
Curve
z_acceleration (Curve) – Z Acceleration
Curve
acceleration_conversion_factor (float) – Factor required to divide input acceleration curve by to convert to (G)
x_acceleration_limit (float) – X direction acceleration limit
y_acceleration_limit (float) – Y direction acceleration limit
z_acceleration_limit (float) – Z direction acceleration limit
calculation_method (string) – Either 2010 or 1998
x_axis_interval (float) – Optional. If defined then T-HIS will automatically regularise the curve using this value first
output_curve (Curve) – Optional.
Curve
to overwrite- Returns:
Curve object or None
- Return type:
dict
Example
Calculate ASI using the 2010 method with input curves x,y and z, factors 12,9,10 and a conversioon factor of 9810. Regularise the input curves using an interval of 0.0001 first
p = Oasys.THIS.Operate.Asi(x,y,z,9810.0,12.0,9.0,10.0,"2010",0.0001)
- classmethod Operate.Asin(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Calculate Arc Sine
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Calculate Arc Sine() of curve m and store as curve p
p = Oasys.THIS.Operate.Asin(m)
- classmethod Operate.Atan(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Calculate Arc Tangent
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Calculate Arc Tangent() of curve m and store as curve p
p = Oasys.THIS.Operate.Atan(m)
- classmethod Operate.Atan2(first_input_curve, second_input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Calculate Arc Tangent using atan2(y, x)
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Calculate Arc Tangent() of curve m / curve n and store as curve p
p = Oasys.THIS.Operate.Atan2(m, n)
- classmethod Operate.Av(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Convert acceleration spectrum to a velocity spectrum
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Convert curve m and store as curve p
p = Oasys.THIS.Operate.Av(m)
- classmethod Operate.Ave(curves, output_curve=Oasys.gRPC.defaultArg)¶
Average a group of curves
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Average the list of curves stored in curve array x and store as curve p
p = Oasys.THIS.Operate.Ave(x)
- classmethod Operate.Bes(input_curve, frequency, order, x_axis_interval=Oasys.gRPC.defaultArg, output_curve=Oasys.gRPC.defaultArg)¶
Bessel Filter
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Filter curve m using a cut-off of 400Hz and order 2 and output as curve p . Regularise the input curve using an interval of 0.0001 first
p = Oasys.THIS.Operate.Bes(m,400.0,2,0.0001)
- classmethod Operate.Blc(input_curve)¶
Carry out a baseline correction on an accleration time history
- Parameters:
input_curve (Curve) – Moment / Time
Curve
- Returns:
List of Curve objects.
1st curve : Corrected curve
2nd curve : Integrated Velocity
3rd curve : Integrated Displacement- Return type:
list
Example
Calculate baseline correction on curve m,
c_list = Oasys.THIS.Operate.Blc(m) corrected_curve = c_list[0] vel_curve = c_list[1] disp_curve = c_list[2]
- classmethod Operate.But(input_curve, frequency, order, x_axis_interval=Oasys.gRPC.defaultArg, output_curve=Oasys.gRPC.defaultArg)¶
Butterworth Filter
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Filter curve m using a cut-off of 400Hz and order 2 and output as curve p . Regularise the input curve using an interval of 0.0001 first
p = Oasys.THIS.Operate.But(m,400.0,2,0.0001)
- classmethod Operate.C1000(input_curve, x_axis_interval=Oasys.gRPC.defaultArg, output_curve=Oasys.gRPC.defaultArg)¶
SAE Class 1000 Filter
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Filter curve m and output as curve p . Regularise the input curve using an interval of 0.0001 first
p = Oasys.THIS.Operate.C1000(m,0.0001)
- classmethod Operate.C180(input_curve, x_axis_interval=Oasys.gRPC.defaultArg, output_curve=Oasys.gRPC.defaultArg)¶
SAE Class 180 Filter
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Filter curve m and output as curve p . Regularise the input curve using an interval of 0.0001 first
p = Oasys.THIS.Operate.C180(m,0.0001)
- classmethod Operate.C60(input_curve, x_axis_interval=Oasys.gRPC.defaultArg, output_curve=Oasys.gRPC.defaultArg)¶
SAE Class 60 Filter
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Filter curve m and output as curve p . Regularise the input curve using an interval of 0.0001 first
p = Oasys.THIS.Operate.C60(m,0.0001)
- classmethod Operate.C600(input_curve, x_axis_interval=Oasys.gRPC.defaultArg, output_curve=Oasys.gRPC.defaultArg)¶
SAE Class 600 Filter
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Filter curve m and output as curve p . Regularise the input curve using an interval of 0.0001 first
p = Oasys.THIS.Operate.C600(m,0.0001)
- classmethod Operate.Cat(first_curve, second_curve, output_curve=Oasys.gRPC.defaultArg)¶
Concatenate 2 curves together
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
To concatenate the values for curve n to those in curve m and store as curve p
p = Oasys.THIS.Operate.Cat(m,n)
- classmethod Operate.Clip(input_curve, x_min, x_max, y_min, y_max, output_curve=Oasys.gRPC.defaultArg)¶
Clip a curve
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Clip a curve m to within 0.1<x<0.3, 0.0<y<100.0 and store as curve p
p = Oasys.THIS.Operate.Clip(m,0.1,0.3,0.0,100.0)
- classmethod Operate.Com(first_curve, second_curve, output_curve=Oasys.gRPC.defaultArg)¶
Combine Y axis values from 2 curves together
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
To combine the Y axis values for curve n to those in curve m and store as curve p
p = Oasys.THIS.Operate.Com(m,n)
- classmethod Operate.Cor(first_curve, second_curve, correlation_type)¶
Curve Correlation function. This Correlation function provides a measure of the degree to which two curves match. When comparing curves by eye, the quality of correlation may be judged on the basis of how well matched are the patterns of peaks, the overall shapes of the curves, etc, and can allow for differences of timing as well as magnitude. Thus a simple function based on the difference of Y-values (such as T/HIS ERR function) does not measure correlation in the same way as the human eye. The T/HIS correlation function attempts to include and quantify the more subtle ways in which the correlation of two curves may be judged.
The correlation can be calculated using either a strict or loose set of input parameters.
The degree of correlation is rated between 0 and 100
- Parameters:
- Returns:
Correlation value
- Return type:
float
Example
Calculate the correlation between curves m and n using the strict input parameters
val = Oasys.THIS.Operate.Cor(m,n,"strict")
- classmethod Operate.Cor3(first_curve, second_curve, x_axis_factor=Oasys.gRPC.defaultArg, y_axis_factor=Oasys.gRPC.defaultArg)¶
Curve Correlation function. This function first normalises the curves using two factors either specified by the user or defaults calculated by the program (the maximum absolute X and Y values of both graphs). For each point on the first normalised curve, the shortest distance to the second normalised curve is calculated. The root mean square value of all these distances is subtracted from 1 and then multiplied by 100 to get an index between 0 and 100. The process is repeated along the second curve and the two indices are averaged to get a final index. The higher the index the closer the correlation between the two curves.
Note that the choice of normalising factors is important. Incorrect factors may lead to a correlation index outside the range of 0 to 100
- Parameters:
- Returns:
Correlation value
- Return type:
float
Example
Calculate the correlation between curves m and n using the default normalising factors
val = Oasys.THIS.Operate.Cor3(m,n)Calculate the correlation between curves m and n using 0.1 and 1000.0 as the X and Y normalising factors
val = Oasys.THIS.Operate.Cor3(m,n,0.1,1000)
- classmethod Operate.Cos(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Calculate Cosine
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Calculate Cosine() of curve m and store as curve p
p = Oasys.THIS.Operate.Cos(m)
- classmethod Operate.Da(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Convert displacment spectrum to an acceleration spectrum
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Convert curve m and store as curve p
p = Oasys.THIS.Operate.Da(m)
- classmethod Operate.Dif(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Differentiate a curve
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
To differentiate curve m and store as curve p
p = Oasys.THIS.Operate.Dif(m)
- classmethod Operate.Div(first_curve, second_curve_or_constant, output_curve=Oasys.gRPC.defaultArg)¶
Divide Y axis values
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
To divide the Y axis values for curve n by curve m and store as curve p
p = Oasys.THIS.Operate.Div(m,n)To devide the Y axis values in curve m by 20.0 and store as curve p
p = Oasys.THIS.Operate.Div(m,20.0)
- classmethod Operate.Dix(first_curve, second_curve_or_constant, output_curve=Oasys.gRPC.defaultArg)¶
Divide X axis values
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
To divide the X axis values for curve n by curve m and store as curve p
p = Oasys.THIS.Operate.Dix(m,n)To devide the X axis values in curve m by 20.0 and store as curve p
p = Oasys.THIS.Operate.Dix(m,20.0)
- classmethod Operate.Ds(input_curve, broadening_factor, redefine_frequencies, output_curve=Oasys.gRPC.defaultArg)¶
Generate a design spectrum from a reponse spectrum
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Convert curve m and let T-HIS determine the new frequencies, store as curve p
p = Oasys.THIS.Operate.Ds(m,"yes")
- classmethod Operate.Dv(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Convert displacment spectrum to a velocity spectrum
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Convert curve m and store as curve p
p = Oasys.THIS.Operate.Dv(m)
- classmethod Operate.Env(curves, output_curve=Oasys.gRPC.defaultArg)¶
Generate an Envelope that bounds the min and max values of a group of curves
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Envelope of curves stored in curve list x and store as curve p
p = Oasys.THIS.Operate.Env(x)
- classmethod Operate.Err(first_curve, second_curve, output_curve=Oasys.gRPC.defaultArg)¶
Calculate the degree of correlation between 2 curves
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
To calculate the correlation between curves n and m and store as curve p
p = Oasys.THIS.Operate.Err(m,n)
- classmethod Operate.Exc(input_curve, output_option, output_curve=Oasys.gRPC.defaultArg)¶
Calculate and displays an EXCeedence plot. This is a plot of force (Y axis) versus cumulative time (X axis) for which the force level has been exceeded. By default the Automatic option will create an exceedence plot using either the +ve OR the -ve values depending on which the input curve contains most of.
The Positive option will calculate the exceedence plot using only the points with +ve y values.
The Negative option will calculate the exceedence plot using only the points with -ve y values
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Calculate Exceedence plot for curve m, using the positive option and store as curve p
p = Oasys.THIS.Operate.Exc(m,"positive")
- classmethod Operate.Exp(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Calculate E to the power of Y axis values
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Calculate E to the power of Y axis values for curve m and store as curve p
p = Oasys.THIS.Operate.Exp(m)
- classmethod Operate.Fft(input_curve, output_option, x_axis_interval=Oasys.gRPC.defaultArg, scaling_option=Oasys.gRPC.defaultArg)¶
Fast Fourier Transform
- Parameters:
input_curve (Curve) – Input
Curve
output_option (string) – Generate magnitude, magnitude+phase or real+imaginary, (one of magnitude,phase,real)
x_axis_interval (float) – Optional. If defined then T-HIS will automatically regularise the curve using this value first
scaling_option (string) – Optional. Scaling option, (either one or two)
- Returns:
Curve object/list or None
- Return type:
dict
Example
Generate magnitude and phase curves and return a curve list. Regularise the input curve using an interval of 0.0001 first and scale using option two
c_list = Oasys.THIS.Operate.Fft(m,"phase",0.0001,"one") mag_curve = c_list[0] phase_curve = c_list[1]
- classmethod Operate.Fir(input_curve, x_axis_interval=Oasys.gRPC.defaultArg, output_curve=Oasys.gRPC.defaultArg)¶
FIR Filter
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Filter curve m and output as curve p . Regularise the input curve using an interval of 0.0001 first
p = Oasys.THIS.Operate.Fir(m,0.0001)
- classmethod Operate.Hic(input_curve, window, acceleration_factor)¶
HIC Calculation. After calculating the HIC value for a curve the value can also be obtained from the curve using the
Curve.hic
property. In addition to the HIC value the start and end time for the time window can also be obtained using theCurve.hic_tmin
andCurve.hic_tmax
properties
- Parameters:
input_curve (Curve) – Input
Curve
window (float) – Maximum time window
acceleration_factor (float) – Factor required to divide input acceleration curve by to convert to (G)
- Returns:
HIC value
- Return type:
float
Example
Calculate HIC for curve m, using a window of 0.036s and a factor of 9810
val = Oasys.THIS.Operate.Hic(m,0.036,9810.0)
- classmethod Operate.Hicd(input_curve, window, acceleration_factor)¶
Modified HIC(d) Calculation for free motion headform. After calculating the HIC value for a curve the value can also be obtained from the curve using the
Curve.hicd
property. In addition to the HIC(d) value the start and end time for the time window can also be obtained using theCurve.hicd_tmin
andCurve.hicd_tmax
properties
- Parameters:
input_curve (Curve) – Input
Curve
window (float) – Maximum time window
acceleration_factor (float) – Factor required to divide input acceleration curve by to convert to (G)
- Returns:
HIC(d) value
- Return type:
float
Example
Calculate HIC(d) for curve m, using a window of 0.036s and a factor of 9810
val = Oasys.THIS.Operate.Hicd(m,0.036,9810.0)
- classmethod Operate.Ifft(first_curve, second_curve, input_type)¶
Inverse Fast Fourier Transform
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Generate curve from magnitude (m) and phase (p) data and return as curve q
q = Oasys.THIS.Operate.Ifft(m,p,"magnitude")
- classmethod Operate.Int(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Integrate a curve
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
To integrate curve m and store as curve p
p = Oasys.THIS.Operate.Int(m)
- classmethod Operate.Log(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Calculate Natural Log of Y axis values
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Calculate Natural Log of Y axis values for curve m and store as curve p
p = Oasys.THIS.Operate.Log(m)
- classmethod Operate.Log10(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Calculate Log (base 10) of Y axis values
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Calculate Log (base 10) of Y axis values for curve m and store as curve p
p = Oasys.THIS.Operate.Log10(m)
- classmethod Operate.Log10x(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Calculate Log (base 10) of X axis values
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Calculate Log (base 10) of X axis values for curve m and store as curve p
p = Oasys.THIS.Operate.Log10x(m)
- classmethod Operate.Logx(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Calculate Natural Log of X axis values
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Calculate Natural Log of X axis values for curve m and store as curve p
p = Oasys.THIS.Operate.Logx(m)
- classmethod Operate.Lsq(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Calculate Least Squares Fit for a curve
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
To calculate Least Squares Fit for curve m and store as curve p
p = Oasys.THIS.Operate.Lsq(m)
- classmethod Operate.Map(first_curve, second_curve, output_curve=Oasys.gRPC.defaultArg)¶
Map Y axis values from one curve onto another curve
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
To map curve n onto curve m and store as curve p
p = Oasys.THIS.Operate.Map(m,n)
- classmethod Operate.Max(curves, output_curve=Oasys.gRPC.defaultArg)¶
Maximum of a group of curves
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Maximum of curves stored in curve list x
p = Oasys.THIS.Operate.Max(x)
- classmethod Operate.Min(curves, output_curve=Oasys.gRPC.defaultArg)¶
Minimum of a group of curves
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Minimum of curves stored in curve list x
p = Oasys.THIS.Operate.Min(x)
- classmethod Operate.Mon(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Sort a curve into monotonically increasing X axis values
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
To sort curve m and store as curve p
p = Oasys.THIS.Operate.Mon(m)
- classmethod Operate.Mul(first_curve, second_curve_or_constant, output_curve=Oasys.gRPC.defaultArg)¶
Multiply Y axis values
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
To multiply the Y axis values for curve n from m and store as curve p
p = Oasys.THIS.Operate.Mul(m,n)To multiply the Y axis values in curve m by 20.0 and store as curve p
p = Oasys.THIS.Operate.Mul(m,20.0)
- classmethod Operate.Mux(first_curve, second_curve_or_constant, output_curve=Oasys.gRPC.defaultArg)¶
Multiply X axis values
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
To multiply the X axis values for curve n from m and store as curve p
p = Oasys.THIS.Operate.Mux(m,n)To multiply the X axis values in curve m by 20.0 and store as curve p
p = Oasys.THIS.Operate.Mux(m,20.0)
- classmethod Operate.Ncp(first_curve, second_curve)¶
Calculate a platic rotation curve for a beam from a moment/time and rotation/time
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Calculate plastic rotation curve p using curves m and r
q = Oasys.THIS.Operate.Ncp(m,r)
- classmethod Operate.Nij(shear_force, axial_force, moment, fzc_t, fzc_c, myc_f, myc_e, e)¶
Biomechanical neck injury predictor. Used as a measure of injury due to the load transferred through the occipital condyles.
This function returns a list containing 4 curve objects.
Curve 1 - “Nte” is the tension-extension condition
Curve 2 - “Ntf” is the tension-flexion condition
Curve 3 - “Nce” is the compression-extension condition
Curve 4 - “Ncf” is the compression-flexion condition
- Parameters:
shear_force (Curve) – Shear Force
Curve
axial_force (Curve) – Axial Force
Curve
moment (Curve) – Moment
Curve
fzc_t (float) – Critical Axial Force (Tension)
fzc_c (float) – Critical Axial Force (Compression)
myc_f (float) – Critical bending moment (Flexion)
myc_e (float) – Critical bending moment (Extension)
e (float) – Distance
- Returns:
List of Curve objects.
1st curve : Nte curve
2nd curve : Ntf curve
3rd curve : Nce curve
4th curve : Ncf curve- Return type:
list
Example
Calculate NIJ curves using input curves x,y,z, and constants Fzc=1.0 (tension) / 2.0 (compression), Myc=3.0 (flexion) / 4.0 (extenstion) and E=0.0
c_list = Oasys.THIS.Operate.Nij(x,y,z,1.0,2.0,3.0,4.0,0.0)
- classmethod Operate.Nor(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Normalise Y axis values between [-1,1]
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Normalise Y axis values of curve m and store as curve p
p = Oasys.THIS.Operate.Nor(m)
- classmethod Operate.Nor2(input_curve, y_min_value, y_max_value, lock_to_axis_y_min, lock_to_axis_y_max, output_curve=Oasys.gRPC.defaultArg)¶
Normalise Y axis values with manual settings. The operation takes the absolute value of the user-specified Y Min and Y Max. It then finds the maximum of these two numbers and divides all Y data by this number. There are two locks which probe or “lock on to” the Y Max and Y Min axis values which offers quick axis-normalizing
- Parameters:
input_curve (Curve) – First
Curve
y_min_value (float) – The Minimum Y value
y_max_value (float) – The Maximum Y value
lock_to_axis_y_min (integer) – Set the Lock button for the Y Minimum textbox
lock_to_axis_y_max (integer) – Set the Lock button for the Y Maximum textbox
output_curve (Curve) – Optional.
Curve
to overwrite- Returns:
Curve object or None
- Return type:
dict
Example
Normalise the Y axis values of curve m taking the absolute maximum between the two values -200 and 100 (which for this example will equate to 200) with the Y Min Lock active and the Y Max Lock Inactive. This is then stored as curve p
p = Oasys.THIS.Operate.Nor2(m, -200, 100, 1, 0)
- classmethod Operate.Nox(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Normalise X axis values between [-1,1]
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Normalise X axis values of curve m and store as curve p
p = Oasys.THIS.Operate.Nox(m)
- classmethod Operate.Nox2(input_curve, x_min_value, x_max_value, lock_to_axis_x_min, lock_to_axis_x_max, output_curve=Oasys.gRPC.defaultArg)¶
Normalise X axis values with manual settings. The operation takes the absolute value of the user-specified X Min and X Max. It then finds the maximum of these two numbers and divides all X data by this number. There are two locks which probe or “lock on to” the X Max and X Min axis values which offers quick axis-normalizing
- Parameters:
input_curve (Curve) – First
Curve
x_min_value (float) – The Minimum X value
x_max_value (float) – The Maximum X value
lock_to_axis_x_min (integer) – Set the Lock button for the X Minimum textbox
lock_to_axis_x_max (integer) – Set the Lock button for the X Maximum textbox
output_curve (Curve) – Optional.
Curve
to overwrite- Returns:
Curve object or None
- Return type:
dict
Example
Normalise the X axis values of curve m taking the absolute maximum between the two values -200 and 100 (which for this example will equate to 200) with the X Min Lock active and the X Max Lock Inactive. This is then stored as curve p
p = Oasys.THIS.Operate.Nox2(m, -200, 100, 1, 0)
- classmethod Operate.Octave(input_curve, band_type_to_convert_to, output_type, input_type, output_curve=Oasys.gRPC.defaultArg)¶
Coverts a narrow band curve to either Octave or 1/Third Octave bands
- Parameters:
input_curve (Curve) – Input
Curve
band_type_to_convert_to (String) – Band type to convert to. Either “Octave” or “Third” Octave
output_type (String) – Generate curve containing either “RMS” or “mean” values
input_type (String) – Input curve contains either “Linear” or “dB” values
output_curve (Curve) – Optional.
Curve
to overwrite- Returns:
Curve object or None
- Return type:
dict
Example
Convert curve m that contains Linear values to 1/3 Octave bands and output RMS in curve p
p = Oasys.THIS.Operate.Octave(m,"third","rms","linear")
- classmethod Operate.Order(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Reverse the order of points in a curve
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Reverse the order of points in curve m and store as curve p
p = Oasys.THIS.Operate.Order(m)
- classmethod Operate.Pbut(input_curve, frequency, order, x_axis_interval=Oasys.gRPC.defaultArg, output_curve=Oasys.gRPC.defaultArg)¶
Pure Butterworth Filter
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Filter curve m using a cut-off of 400Hz and order 2 and output as curve p. Regularise the input curve using an interval of 0.0001 first
p = Oasys.THIS.Operate.Pbut(m,400.0,2,0.0001)
- classmethod Operate.Power(input_curve, power, output_curve=Oasys.gRPC.defaultArg)¶
Raise to the power
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Raise the Y axis values for curve m to the power 2.5 and store as curve p
p = Oasys.THIS.Operate.Power(m,2.5)
- classmethod Operate.Rave(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Calculate rolling average of a curve
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Calculate rolling average of curve m and store as curve p
p = Oasys.THIS.Operate.Rave(m)
- classmethod Operate.Rec(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Calculate reciprocal
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Calculate receprocal of curve m and store as curve p
p = Oasys.THIS.Operate.Rec(m)
- classmethod Operate.Reg(input_curve, x_axis_interval, output_curve=Oasys.gRPC.defaultArg)¶
Regularise X axis intervals for a curve
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Regularise curve m using a new X axis intreval of 0.0001
p = Oasys.THIS.Operate.Reg(m,0.0001)
- classmethod Operate.Res(curves, output_curve=Oasys.gRPC.defaultArg)¶
Resultant of a group of curves
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Resultant of curves stored in curve list x
p = Oasys.THIS.Operate.Res(x)
- classmethod Operate.Rev(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Reverse X and Y axis values
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Reverse X and Y axis values of curve m and store as curve p
p = Oasys.THIS.Operate.Rev(m)
- classmethod Operate.Rs(input_curve, damping_factor, sampling_points, x_axis_interval=Oasys.gRPC.defaultArg, output_curve=Oasys.gRPC.defaultArg)¶
Generate a reponse spectrum from input accelerations
- Parameters:
input_curve (Curve) – Input
Curve
damping_factor (float) – Dammping factor
sampling_points (int) – Number of points to sample over (30 or 70)
x_axis_interval (float) – Optional. If defined then T-HIS will automatically regularise the curve using this value first
output_curve (Curve) – Optional.
Curve
to overwrite- Returns:
List of Curve objects
1st curve : Relative displacement
2nd curve : Relative velocity
3th curve : Pseudo relative velocity
4th curve : Absolute acceleration
5th curve : Pseudo absolute acceleration- Return type:
list
Example
Generate a response spectrum using a factor of 0.05 and 70 sampling points. Regularise the input curve using an interval of 0.0001 first
p = Oasys.THIS.Operate.Rs(m,0.05,70,0.0001)
- classmethod Operate.Sin(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Calculate Sine
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Calculate Sine() of curve m and store as curve p
p = Oasys.THIS.Operate.Sin(m)
- classmethod Operate.Smooth(input_curve, smoothing_factor, output_curve=Oasys.gRPC.defaultArg)¶
Apply a smoothing factor to a curve
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Smooth curve m using 7 points and store as curve p
p = Oasys.THIS.Operate.Smooth(m,7)
- classmethod Operate.Sqr(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Square root of a curve
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Square root curve m and store as curve p
p = Oasys.THIS.Operate.Sqr(m)
- classmethod Operate.Stress(input_curve, convert_to, output_curve=Oasys.gRPC.defaultArg)¶
Convert between true and engineering stress
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Convert curve m from engineering to true strees and store as curve p
p = Oasys.THIS.Operate.Stress(m,"True")
- classmethod Operate.Sub(first_curve, second_curve_or_constant, output_curve=Oasys.gRPC.defaultArg)¶
Subtract Y axis values
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
To subtract the Y axis values for curve n from m and store as curve p
p = Oasys.THIS.Operate.Sub(m,n)To subtract 20.0 from the Y axis values in curve m and store as curve p
p = Oasys.THIS.Operate.Sub(m,20.0)
- classmethod Operate.Sum(curves, output_curve=Oasys.gRPC.defaultArg)¶
Sum of a group of curves
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Sum of curves stored in curve list x
p = Oasys.THIS.Operate.Sum(x)
- classmethod Operate.Sux(first_curve, second_curve_or_constant, output_curve=Oasys.gRPC.defaultArg)¶
Subtract X axis values
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
To subtract the X axis values for curve n from m and store as curve p
p = Oasys.THIS.Operate.Sux(m,n)To subtract 20.0 from the X axis values in curve m and store as curve p
p = Oasys.THIS.Operate.Sux(m,20.0)
- classmethod Operate.Tan(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Calculate Tangent
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Calculate Tangent() of curve m and store as curve p
p = Oasys.THIS.Operate.Tan(m)
- classmethod Operate.Thiv(x_acceleration, y_acceleration, yaw_rate, dx, dy, x0)¶
Theoretical Head Impact Velocity and the Post Impact Head Deceleration. These values are used to assess the performance of road side crash barriers.
This function returns a list containing 2 curve objects. The 1st curve is the THIV curve and the 2nd is the PHD curve. The peak values of these curves are the corresponding THIV and PHD values and can be obtained using theCurve.ymax
property
- Parameters:
x_acceleration (Curve) – X Acceleration
Curve
y_acceleration (Curve) – Y Acceleration
Curve
yaw_rate (Curve) – Yaw Rate
Curve
dx (float) – Horizontal distance between occupants head and vehicle
dy (float) – Lateral distance between occupants head and vehicle
x0 (float) – Horizontal distance between occupants head and vehicle CofG
- Returns:
List of Curve objects.
1st curve : THIV curve
2nd curve : PHD curve- Return type:
list
Example
Calculate THIV and PHD curves x,y,z and distances Dx=0.6, Dy=0.3, X0=0.0
c_list = Oasys.THIS.Operate.Thiv(x,y,z,0.6,0.3,0.0) thiv = c_list[0].ymax phd = c_list[1].ymax
- classmethod Operate.Tms(input_curve, period)¶
3ms Clip Calculation. After calculating the 3ms clip value for a curve the value can also be obtained from the curve using the
Curve.tms
property. In addition to the 3ms clip value the start and end time for the time window can also be obtained using theCurve.tms_tmin
andCurve.tms_tmax
properties
- Parameters:
input_curve (Curve) – Input
Curve
period (float) – Clip period
- Returns:
3ms clip value
- Return type:
float
Example
Calculate 3ms clip for curve m, using a clip period of 0.003s
val = Oasys.THIS.Operate.Tms(m,0.003)
- classmethod Operate.Translate(input_curve, x_value, y_value, output_curve=Oasys.gRPC.defaultArg)¶
Translate a curve
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Translate curve m by x=0.2, y=0.3 and store as curve p
p = Oasys.THIS.Operate.Translate(m,0.2,0.3)
- classmethod Operate.Tti(upper_rib_acceleration, lower_rib_acceleration, t12_acceleration)¶
Thorax Trauma Index
- Parameters:
- Returns:
TTI value
- Return type:
float
Example
Calculate TTI using curves x,y and z as inputs
val = Oasys.THIS.Operate.TTi(x,y,z)
- classmethod Operate.Va(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Convert velocity spectrum to an acceleration spectrum
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Convert curve m and store as curve p
p = Oasys.THIS.Operate.Va(m)
- classmethod Operate.Vc(input_curve, a, b, calculation_method, output_curve=Oasys.gRPC.defaultArg)¶
Viscous Criteria calculate. The VC calculation can be done using 2 different calculation methods ECER95 and IIHS
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Calculate VC for curve m, using A=1.3, B=0.229 and the ECER95 method
p = Oasys.THIS.Operate.Vc(m,1.3,0.229,"ECER95")
- classmethod Operate.Vd(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Convert velocity spectrum to a displacment spectrum
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Convert curve m and store as curve p
p = Oasys.THIS.Operate.Vd(m)
- classmethod Operate.Vec(first_curve, second_curve, third_curve, output_curve=Oasys.gRPC.defaultArg)¶
Vector magnitude of 3 curves
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Calculate vector magnitude of curves m,n,o and store as curve p
p = Oasys.THIS.Operate.Vec(m,n,o)
- classmethod Operate.Vec2d(first_curve, second_curve, output_curve=Oasys.gRPC.defaultArg)¶
Vector magnitude of 2 curves
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Calculate vector magnitude of curves m and n and store as curve p
p = Oasys.THIS.Operate.Vec2d(m,n)
- classmethod Operate.Wif(first_curve, second_curve)¶
Weigthed Integrated Factor (WIFAC) Correlation function
- Parameters:
- Returns:
Correlation value
- Return type:
float
Example
Calculate the correlation between curves m and n
val = Oasys.THIS.Operate.Wif(m,n)
- classmethod Operate.Window(input_curve, window_type, percentage_lead_in=Oasys.gRPC.defaultArg, output_curve=Oasys.gRPC.defaultArg)¶
Apply a smoothing window to a curve
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Apply a hanning window to curve m and store as curve p
p = Oasys.THIS.Operate.Window(m,"Hanning")
- classmethod Operate.Zero(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Translate curve to 0,0
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Translate curve m to (0,0) and store as curve p
p = Oasys.THIS.Operate.Zero(m)
- classmethod Operate.ZeroX(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Translate curve to X=0.0
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Translate curve m to X=0 and store as curve p
p = Oasys.THIS.Operate.ZeroX(m)
- classmethod Operate.ZeroY(input_curve, output_curve=Oasys.gRPC.defaultArg)¶
Translate curve to Y=0.0
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Translate curve m to Y=0 and store as curve p
p = Oasys.THIS.Operate.ZeroY(m)
- classmethod Operate.dB(input_curve, reference_value, output_curve=Oasys.gRPC.defaultArg)¶
Converts a curve to dB (y = 20.0*log(y/yref))
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Convert curve m to dB’s using a reference value of 10.0 and store as curve p
p = Oasys.THIS.Operate.dB(m,10.0)
- classmethod Operate.dBA(input_curve, weighting_type, output_curve=Oasys.gRPC.defaultArg)¶
Applies A-weighting to a curve (convert from dB to dBA)
- Parameters:
- Returns:
Curve object or None
- Return type:
dict
Example
Apply narrow band A-weighting to convert curve m from dB to dBA and store as curve p
p = Oasys.THIS.Operate.dBA(m,"narrow")