diff --git a/doc/content/source/vectorpostprocessors/LeastSquaresBaselineCorrection.md b/doc/content/source/vectorpostprocessors/LeastSquaresBaselineCorrection.md new file mode 100644 index 0000000000..7be87fe696 --- /dev/null +++ b/doc/content/source/vectorpostprocessors/LeastSquaresBaselineCorrection.md @@ -0,0 +1,26 @@ +# LeastSquaresBaselineCorrection (DRAFT) + +The `LeastSquaresBaselineCorrection` applies a baseline correction to an acceleration time-history, $A(t)$, contained in some other VectorPostprocessor object, e.g., `ResponseHistoryBuilder` or `CSVReader`. The corrections are performed by first computing the nominal velocity, $V(t)$, and displacement, $D(t)$, time-histories by the [Newmark-beta method](manuals/theory/index.md#time-integration). An $n$-th order polynomial approximation of the original, or *uncorrected*, acceleration, velocity, or displacement is then found by the method of least squares and is subtracted from the uncorrected acceleration to obtain the corrected acceleration, $\tilde{A}$. That is, the corrected acceleration time-history is given by the following: + +\begin{equation} +\label{corrected-accel} +\tilde{A}(t)=A(t)-P_{A}(t)-P_{V}(t)-P_{D}(t) +\end{equation} + +Here, $P_{A}$, $P_{V}$, or $P_{D}$ are the least squares approximations of the uncorrected acceleration, velocity, and displacement time histories, respectively. [corrected-accel] is then integrated to obtain the corrected velocity, $\tilde{V}$, and displacement, $\tilde{D}$. This object, ultimately, stores the corrected time-histories as VectorPostprocessor data. Note that it is possible to apply corrections using a best-fit of only one or any combination of the three kinematic variables (see [#usage]), for which, any unused polynomials would result in a zero value in [corrected-accel]. + +## Usage id=usage + +The object requires, as input, some sort of record of an acceleration time-history stored in a MOOSE VectorPostprocessor object specified with the `vectorpostprocessor` parameter. The VectorPostprocessor columns which store the abscissa (time) values and the ordinate (acceleration) values are then specified with `time_name` and `acceleration_name` parameters, respectively. This data could be obtained from any number of sources, for example, it could be the nodal acceleration data obtained from the finite element solution itself, or it could be the raw data from an accelelogram. If the case is the latter example, this object could be useful for using the corrected time-history data elsewhere in the input file. Note if the corrections are to be used as inputs for the simulation, the user must take care to set the `execute_on`, `force_preaux`, or `force_preic` parameters accordingly. + +The order of the approximating polynomials, $n$, is specified with the `order` parameter and can take on a maximum integer value of 9. The corrections are highly sensitive to the order, and so it is recommended that a user run with several trial values until the desired result is achieved. The `beta` and `gamma` parameters are those used for Newmark Integration, and, ideally, should correspond to the values used elsewhere throughout the simulation. Finally, the `fit_acceleration`, `fit_velocity`, and `fit_displacement` variables control whether or not to use the polynomials described in [corrected-accel] when formulating the corrected time-histories. + +## Example Input Syntax + +!listing test/tests/vectorpostprocessors/least_squares_baseline_correction/least_squares_baseline_correction.i block=VectorPostprocessors + +!syntax parameters /VectorPostprocessors/LeastSquaresBaselineCorrection + +!syntax inputs /VectorPostprocessors/LeastSquaresBaselineCorrection + +!syntax children /VectorPostprocessors/LeastSquaresBaselineCorrection diff --git a/include/utils/BaselineCorrectionUtils.h b/include/utils/BaselineCorrectionUtils.h new file mode 100644 index 0000000000..1d24e84270 --- /dev/null +++ b/include/utils/BaselineCorrectionUtils.h @@ -0,0 +1,66 @@ +// This code was implemented in collaboration with Christopher J. Wong +// (chris.wong@utah.edu) from the University of Utah. + +/** + * This namespace contains the functions used for the calculations corresponding + * to the time history adjustment procedure in LeastSquaresBaselineCorrection + **/ + +#ifndef BASELINECORRECTIONUTILS_H +#define BASELINECORRECTIONUTILS_H + +// MOOSE includes +#include "DenseMatrix.h" + +// LIBMESH includes +#include "libmesh/dense_vector.h" + +// Forward declarations +namespace BaselineCorrectionUtils +{ + +// Evaluates an integral over a single time step with Newmark-beta method +// Also is used as simple trapezoidal rule when gamma = 0.5. +Real newmarkGammaIntegrate(const Real & u_ddot_old, + const Real & u_ddot, + const Real & u_dot_old, + const Real & gamma, + const Real & dt); + +// Evaluates a double integral over a single time step with Newmark-beta method +Real newmarkBetaIntegrate(const Real & u_ddot_old, + const Real & u_ddot, + const Real & u_dot_old, + const Real & u_old, + const Real & beta, + const Real & dt); + +// Solves linear normal equation for minimum acceleration square error +DenseVector getAccelerationFitCoeffs(unsigned int order, + const std::vector & accel, + const std::vector & t, + const unsigned int & num_steps, + const Real & gamma); + +// Solves linear normal equation for minimum velocity square error +DenseVector getVelocityFitCoeffs(unsigned int order, + const std::vector & accel, + const std::vector & vel, + const std::vector & t, + const unsigned int & num_steps, + const Real & beta); + +// Solves linear normal equation for minimum displacement square error +DenseVector getDisplacementFitCoeffs(unsigned int order, + const std::vector & disp, + const std::vector & t, + const unsigned int & num_steps); + +// Evaluates the least squares polynomials over at a single time step +std::vector computePolynomials(unsigned int order, + const DenseVector & coeffs, + const Real & t); + +} + +#endif // BASELINECORRECTIONUTILS_H diff --git a/include/vectorpostprocessors/LeastSquaresBaselineCorrection.h b/include/vectorpostprocessors/LeastSquaresBaselineCorrection.h new file mode 100644 index 0000000000..4e03572121 --- /dev/null +++ b/include/vectorpostprocessors/LeastSquaresBaselineCorrection.h @@ -0,0 +1,71 @@ +/*************************************************/ +/* DO NOT MODIFY THIS HEADER */ +/* */ +/* MASTODON */ +/* */ +/* (c) 2015 Battelle Energy Alliance, LLC */ +/* ALL RIGHTS RESERVED */ +/* */ +/* Prepared by Battelle Energy Alliance, LLC */ +/* With the U. S. Department of Energy */ +/* */ +/* See COPYRIGHT for full restrictions */ +/*************************************************/ + +#ifndef LEASTSQUARESBASELINECORRECTION_H +#define LEASTSQUARESBASELINECORRECTION_H + +// MOOSE includes +#include "GeneralVectorPostprocessor.h" + +// Forward Declarations +class LeastSquaresBaselineCorrection; + +template <> +InputParameters validParams(); + +/** + * Applies a baseline correction to an accceleration time history contained in another + * vectorpostprocessor using least squares polynomial fits and outputs the adjusted + * acceleration, velocity, and displacement time histories + */ +class LeastSquaresBaselineCorrection : public GeneralVectorPostprocessor +{ +public: + LeastSquaresBaselineCorrection(const InputParameters & parameters); + virtual void initialize() override; + virtual void execute() override; + +protected: + // acceleration time history variables from specified vectorpostprocessor + const VectorPostprocessorValue & _accel; + const VectorPostprocessorValue & _t; + + // order used for the least squares polynomial fit + const unsigned int _order; + + // Newmark integration parameters + const Real & _gamma; + const Real & _beta; + + // set which kinematic variables a polynomial fit will be applied to + const bool _fit_accel; + const bool _fit_vel; + const bool _fit_disp; + + // the variables used to write out the adjusted time histories + VectorPostprocessorValue & _time; + VectorPostprocessorValue & _adj_accel; + VectorPostprocessorValue & _adj_vel; + VectorPostprocessorValue & _adj_disp; + + // wether to output nominal time histories from Newmark integration alone + const bool _out_unadj; + + // the variables used to write out the nominal time histories (if requested) + VectorPostprocessorValue * _unadj_accel; + VectorPostprocessorValue * _unadj_vel; + VectorPostprocessorValue * _unadj_disp; +}; + +#endif // LEASTSQUARESBASELINECORRECTION_H diff --git a/src/utils/BaselineCorrectionUtils.C b/src/utils/BaselineCorrectionUtils.C new file mode 100644 index 0000000000..b0dc8861e2 --- /dev/null +++ b/src/utils/BaselineCorrectionUtils.C @@ -0,0 +1,163 @@ +// This code was implemented in collaboration with Christopher J. Wong +// (chris.wong@utah.edu) from the University of Utah. + +// MASTODON includes +#include "BaselineCorrectionUtils.h" + +Real +BaselineCorrectionUtils::newmarkGammaIntegrate(const Real & u_ddot_old, + const Real & u_ddot, + const Real & u_dot_old, + const Real & gamma, + const Real & dt) +{ + return u_dot_old + (1 - gamma) * dt * u_ddot_old + gamma * dt * u_ddot; +} + +Real +BaselineCorrectionUtils::newmarkBetaIntegrate(const Real & u_ddot_old, + const Real & u_ddot, + const Real & u_dot_old, + const Real & u_old, + const Real & beta, + const Real & dt) +{ + return u_old + dt * u_dot_old + (0.5 - beta) * dt * dt * u_ddot_old + + beta * dt * dt * u_ddot; +} + +DenseVector +BaselineCorrectionUtils::getAccelerationFitCoeffs(unsigned int order, + const std::vector & accel, + const std::vector & t, + const unsigned int & num_steps, + const Real & gamma) +{ + unsigned int num_rows = order + 1; /* no. of eqns to solve for coefficients */ + DenseMatrix mat(num_rows, num_rows); + DenseVector rhs(num_rows); + DenseVector coeffs(num_rows); + + // compute matrix of linear normal equation + for (unsigned int row = 0; row < num_rows; ++row) { + for (unsigned int col = 0; col < num_rows; ++col) + { + mat(row, col) = pow(t[t.size()-1], row + col + 1) * (col * col + 3 * col + 2) / + (row + col + 1); + } + } + + // compute vector of integrals on right-hand side of linear normal equation + Real dt, u_ddot_old, u_ddot; + for (unsigned int i = 0; i < num_steps; ++i) + { + dt = t[i+1] - t[i]; + for (unsigned int row = 0; row < num_rows; ++row) + { + u_ddot_old = pow(t[i], row) * accel[i]; + u_ddot = pow(t[i+1], row) * accel[i+1]; + + rhs(row) += newmarkGammaIntegrate(u_ddot_old, u_ddot, 0.0, gamma, dt); + } + } + + // solve the system using libMesh lu factorization + mat.lu_solve(rhs, coeffs); + return coeffs; +} + +DenseVector +BaselineCorrectionUtils::getVelocityFitCoeffs(unsigned int order, + const std::vector & accel, + const std::vector & vel, + const std::vector & t, + const unsigned int & num_steps, + const Real & beta) +{ + unsigned int num_rows = order + 1; /* no. of eqns to solve for coefficients */ + DenseMatrix mat(num_rows, num_rows); + DenseVector rhs(num_rows); + DenseVector coeffs(num_rows); + + // compute matrix of linear normal equation + for (unsigned int row = 0; row < num_rows; ++row) { + for (unsigned int col = 0; col < num_rows; ++col) + { + mat(row, col) = pow(t[t.size()-1], row + col + 3) * (col + 2) / (row + col + 3); + } + } + + // compute vector of integrals on right-hand side of linear normal equation + Real dt, u_ddot_old, u_ddot, u_dot_old; + for (unsigned int i = 0; i < num_steps; ++i) + { + dt = t[i+1] - t[i]; + for (unsigned int row = 0; row < num_rows; ++row) + { + u_dot_old = pow(t[i], row + 1) * vel[i]; + u_ddot_old = pow(t[i], row + 1) * accel[i] + (row + 1) * pow(t[i], row) * vel[i]; + u_ddot = pow(t[i+1], row + 1) * accel[i+1] + (row + 1) * pow(t[i+1], row) * vel[i+1]; + + rhs(row) += newmarkBetaIntegrate(u_ddot_old, u_ddot, u_dot_old, 0.0, beta, dt); + } + } + + // solve the system using libMesh lu factorization + mat.lu_solve(rhs, coeffs); + return coeffs; +} + +DenseVector +BaselineCorrectionUtils::getDisplacementFitCoeffs(unsigned int order, + const std::vector & disp, + const std::vector & t, + const unsigned int & num_steps) +{ + unsigned int num_rows = order + 1; + DenseMatrix mat(num_rows, num_rows); + DenseVector rhs(num_rows); + DenseVector coeffs(num_rows); + + // computer matrix of linear normal equation + for (unsigned int row = 0; row < num_rows; ++row) { + for (unsigned int col = 0; col < num_rows; ++col) + { + mat(row, col) = pow(t[t.size()-1], row + col + 5) / (row + col + 5); + } + } + + // compute vector of integrals on right-hand side of linear normal equation + Real dt, u_old, u; + for (unsigned int i = 0; i < num_steps; ++i) + { + dt = t[i+1] - t[i]; + for (unsigned int row = 0; row < num_rows; ++row) + { + u_old = pow(t[i], row + 2) * disp[i]; + u = pow(t[i+1], row + 2) * disp[i+1]; + + // note: newmarkGamma with gamma = 0.5 is trapezoidal rule + rhs(row) += newmarkGammaIntegrate(u_old, u, 0.0, 0.5, dt); + } + } + + // solve the system using libMesh lu factorization + mat.lu_solve(rhs, coeffs); + return coeffs; +} + +std::vector +BaselineCorrectionUtils::computePolynomials(unsigned int order, + const DenseVector & coeffs, + const Real & t) +{ + std::vector p_fit(3); /* accel polyfit and its derivatives */ + for (unsigned int k = 0; k < order + 1; ++k) /* compute polynomials */ + { + p_fit[0] += (k * k + 3 * k + 2) * coeffs(k) * pow(t, k); + p_fit[1] += (k + 2) * coeffs(k) * pow(t, k + 1); + p_fit[2] += coeffs(k) * pow(t, k + 2); + } + + return p_fit; +} diff --git a/src/vectorpostprocessors/LeastSquaresBaselineCorrection.C b/src/vectorpostprocessors/LeastSquaresBaselineCorrection.C new file mode 100644 index 0000000000..028e2836d6 --- /dev/null +++ b/src/vectorpostprocessors/LeastSquaresBaselineCorrection.C @@ -0,0 +1,190 @@ +// MASTODON includes +#include "LeastSquaresBaselineCorrection.h" +#include "BaselineCorrectionUtils.h" + +registerMooseObject("MastodonApp", LeastSquaresBaselineCorrection); + +template <> +InputParameters +validParams() +{ + InputParameters params = validParams(); + params.addRequiredParam("vectorpostprocessor", + "The vectorpostprocessor containing the acceleration time history data to which a baseline " + "correction will be applied before integration"); + params.addRequiredParam("acceleration_name", + "The name of the acceleration variable in the vectorpostprocessor"); + params.addRequiredParam("time_name", + "The name of the time variable in the vectorpostprocessor"); + params.addRequiredRangeCheckedParam("order", "order < 10", + "The order of the polynomial fit(s) used to adjust the nominal time histories (coefficients " + "of higher order polynomials can be difficult to compute and the method generally becomes " + "unstable when order >= 10)"); + params.addRequiredParam("gamma", "The gamma parameter for Newmark time integration"); + params.addRequiredParam("beta", "The beta parameter for Newmark time integration"); + params.addParam("fit_acceleration", true, + "If set to \"true\", the acceleration time history will be adjusted using a polynomial fit " + "of the acceleration data"); + params.addParam("fit_velocity", false, + "If set to \"true\", the acceleration time history will be adjusted using a polynomial fit " + "of the velocity data obtained by integration"); + params.addParam("fit_displacement", false, + "If set to \"true\", the acceleration time history will be adjusted using a polynomial fit " + "of the displacement data obtained by double-integration"); + params.addParam("output_unadjusted", false, + "If set to \"true\", the nominal time histories computed from Newmark integration alone " + "will be output along with the baseline corrected time histories"); + params.addClassDescription( + "Applies a baseline correction to an accceleration time history contained in another " + "vectorpostprocessor using least squares polynomial fits and outputs the adjusted " + "acceleration, velocity, and displacement time histories"); + return params; +} + +LeastSquaresBaselineCorrection::LeastSquaresBaselineCorrection(const InputParameters & parameters) + : GeneralVectorPostprocessor(parameters), + _accel(getVectorPostprocessorValue("vectorpostprocessor", + getParam("acceleration_name"))), + _t(getVectorPostprocessorValue("vectorpostprocessor", + getParam("time_name"))), + _order(parameters.get("order")), + _gamma(getParam("gamma")), + _beta(getParam("beta")), + _fit_accel(parameters.get("fit_acceleration")), + _fit_vel(parameters.get("fit_velocity")), + _fit_disp(parameters.get("fit_displacement")), + _time(declareVector("time")), + _adj_accel(declareVector("adjusted_acceleration")), + _adj_vel(declareVector("adjusted_velocity")), + _adj_disp(declareVector("adjusted_displacement")), + _out_unadj(parameters.get("output_unadjusted")), + _unadj_accel(NULL), + _unadj_vel(NULL), + _unadj_disp(NULL) +{ + if (!_fit_accel && !_fit_vel && !_fit_disp) + mooseWarning("Warning in " + name() + + ". Computation of a polynomial fit is set to \"false\" for all three " + "kinematic variables. No adjustments will occur and outputs will be the " + "nominal time-histories computed from Newmark integration alone."); + + if (_out_unadj) + { + _unadj_accel = &declareVector("unadjusted_acceleration"); + _unadj_vel = &declareVector("unadjusted_velocity"); + _unadj_disp = &declareVector("unadjusted_displacement"); + } +} + +void +LeastSquaresBaselineCorrection::initialize() +{ + _time.clear(); + _adj_accel.clear(); + _adj_vel.clear(); + _adj_disp.clear(); + + if (_out_unadj) + { + _unadj_accel->clear(); + _unadj_vel->clear(); + _unadj_disp->clear(); + } +} + +void +LeastSquaresBaselineCorrection::execute() +{ + if (_t.size() != _accel.size()) + mooseError("Error in " + name() + + ". The size of time and acceleration data must be equal."); + if (_t.size() == 0) + mooseError("Error in " + name() + + ". The size of time and acceleration data must be > 0."); + + // create a copy of the acceleration data so it can be passed to functions + std::vector t_var(_t.begin(), _t.end()), + accel_var(_accel.begin(), _accel.end()); + unsigned int index_end = accel_var.size() - 1; /* store a reference to final index array */ + + // Compute unadjusted velocity and displacment time histories + Real dt; + std::vector unadj_vel, unadj_disp; + unadj_vel.push_back(0); unadj_disp.push_back(0); /* assume zero-ICs */ + for (unsigned int i = 0; i < index_end; ++i) + { + dt = t_var[i+1] - t_var[i]; + + unadj_vel.push_back(BaselineCorrectionUtils::newmarkGammaIntegrate( + accel_var[i], accel_var[i+1], unadj_vel[i], _gamma, dt)); + unadj_disp.push_back(BaselineCorrectionUtils::newmarkBetaIntegrate( + accel_var[i], accel_var[i+1], unadj_vel[i], unadj_disp[i], _beta, dt)); + } + + // initialize polyfits and the dummy adjusted time history arrays as the nominal ones + DenseVector coeffs; + std::vector p_fit, + adj_accel = accel_var, + adj_vel = unadj_vel, + adj_disp = unadj_disp; + + // check if acceleration fit shall be applied to corrections + if (_fit_accel) /* adjust time histories with acceleration fit */ + { + coeffs = BaselineCorrectionUtils::getAccelerationFitCoeffs( + _order, adj_accel, t_var, index_end, _gamma); + + for (unsigned int i = 0; i <= index_end; ++i) + { + p_fit = BaselineCorrectionUtils::computePolynomials(_order, coeffs, t_var[i]); + + adj_accel[i] -= p_fit[0]; + adj_vel[i] -= p_fit[1]; + adj_disp[i] -= p_fit[2]; + } + } + + // check if velocity fit shall be applied to corrections + if (_fit_vel) /* adjust time histories with velocity fit */ + { + coeffs = BaselineCorrectionUtils::getVelocityFitCoeffs( + _order, adj_accel, adj_vel, t_var, index_end, _beta); + + for (unsigned int i = 0; i <= index_end; ++i) + { + p_fit = BaselineCorrectionUtils::computePolynomials(_order, coeffs, t_var[i]); + + adj_accel[i] -= p_fit[0]; + adj_vel[i] -= p_fit[1]; + adj_disp[i] -= p_fit[2]; + } + } + + // check if displacement fit shall be applied to corrections + if (_fit_disp) /* adjust time histories with displacement fit */ + { + coeffs = BaselineCorrectionUtils::getDisplacementFitCoeffs(_order, adj_disp, t_var, index_end); + + for (unsigned int i = 0; i <= index_end; ++i) + { + p_fit = BaselineCorrectionUtils::computePolynomials(_order, coeffs, t_var[i]); + + adj_accel[i] -= p_fit[0]; + adj_vel[i] -= p_fit[1]; + adj_disp[i] -= p_fit[2]; + } + } + + // assign computed values in dummy arrays to output variables + _time = t_var; + _adj_accel = adj_accel; + _adj_vel = adj_vel; + _adj_disp = adj_disp; + + if (_out_unadj) /* also output unadjusted time histories if requested */ + { + *_unadj_accel = accel_var; + *_unadj_vel = unadj_vel; + *_unadj_disp = unadj_disp; + } +} diff --git a/test/tests/vectorpostprocessors/least_squares_baseline_correction/accel_20hz.csv b/test/tests/vectorpostprocessors/least_squares_baseline_correction/accel_20hz.csv new file mode 100644 index 0000000000..032fccb4ec --- /dev/null +++ b/test/tests/vectorpostprocessors/least_squares_baseline_correction/accel_20hz.csv @@ -0,0 +1,402 @@ +time,accel_20hz +0,0 +0.001,10093.8337780864 +0.002,20028.4817677283 +0.003,29647.2686354581 +0.004,38798.5003663869 +0.005,47337.8565694371 +0.006,55130.6664961224 +0.007,62054.0328787001 +0.008,67998.7700934983 +0.009,72871.1260834256 +0.01,76594.2608839167 +0.011,79109.4584350748 +0.012,80377.0525690119 +0.013,80377.0525690119 +0.014,79109.4584350748 +0.015,76594.2608839167 +0.016,72871.1260834256 +0.017,67998.7700934982 +0.018,62054.0328787001 +0.019,55130.6664961224 +0.02,47337.8565694371 +0.021,38798.5003663869 +0.022,29647.2686354581 +0.023,20028.4817677283 +0.024,10093.8337780864 +0.025,9.86281202193409E-12 +0.026,-10093.8337780864 +0.027,-20028.4817677283 +0.028,-29647.2686354581 +0.029,-38798.5003663869 +0.03,-47337.8565694371 +0.031,-55130.6664961224 +0.032,-62054.0328787001 +0.033,-67998.7700934983 +0.034,-72871.1260834257 +0.035,-76594.2608839167 +0.036,-79109.4584350748 +0.037,-80377.0525690119 +0.038,-80377.0525690119 +0.039,-79109.4584350748 +0.04,-76594.2608839167 +0.041,-72871.1260834256 +0.042,-67998.7700934982 +0.043,-62054.0328787001 +0.044,-55130.6664961225 +0.045,-47337.8565694371 +0.046,-38798.5003663869 +0.047,-29647.2686354581 +0.048,-20028.4817677283 +0.049,-10093.8337780864 +0.05,-1.97256240438682E-11 +0.051,10093.8337780864 +0.052,20028.4817677283 +0.053,29647.2686354581 +0.054,38798.5003663869 +0.055,47337.8565694371 +0.056,55130.6664961224 +0.057,62054.0328787001 +0.058,67998.7700934983 +0.059,72871.1260834257 +0.06,76594.2608839167 +0.061,79109.4584350748 +0.062,80377.0525690119 +0.063,80377.0525690119 +0.064,79109.4584350748 +0.065,76594.2608839167 +0.066,72871.1260834256 +0.067,67998.7700934983 +0.068,62054.0328787001 +0.069,55130.6664961224 +0.07,47337.8565694371 +0.071,38798.5003663868 +0.072,29647.2686354581 +0.073,20028.4817677284 +0.074,10093.8337780865 +0.075,2.95884360658022E-11 +0.076,-10093.8337780863 +0.077,-20028.4817677283 +0.078,-29647.2686354581 +0.079,-38798.5003663869 +0.08,-47337.8565694371 +0.081,-55130.6664961225 +0.082,-62054.0328787001 +0.083,-67998.7700934983 +0.084,-72871.1260834257 +0.085,-76594.2608839167 +0.086,-79109.4584350748 +0.087,-80377.0525690119 +0.088,-80377.0525690119 +0.089,-79109.4584350748 +0.09,-76594.2608839167 +0.091,-72871.1260834257 +0.092,-67998.7700934983 +0.093,-62054.0328787001 +0.094,-55130.6664961224 +0.095,-47337.8565694371 +0.096,-38798.5003663869 +0.097,-29647.2686354581 +0.098,-20028.4817677284 +0.099,-10093.8337780864 +0.1,-3.94512480877363E-11 +0.101,10093.8337780864 +0.102,20028.4817677283 +0.103,29647.2686354582 +0.104,38798.5003663869 +0.105,47337.8565694371 +0.106,55130.6664961224 +0.107,62054.0328787001 +0.108,67998.7700934982 +0.109,72871.1260834256 +0.11,76594.2608839167 +0.111,79109.4584350748 +0.112,80377.0525690119 +0.113,80377.0525690119 +0.114,79109.4584350748 +0.115,76594.2608839167 +0.116,72871.1260834256 +0.117,67998.7700934983 +0.118,62054.0328787001 +0.119,55130.6664961224 +0.12,47337.8565694371 +0.121,38798.500366387 +0.122,29647.2686354581 +0.123,20028.4817677284 +0.124,10093.8337780864 +0.125,4.93140601096704E-11 +0.126,-10093.8337780863 +0.127,-20028.4817677283 +0.128,-29647.2686354582 +0.129,-38798.5003663869 +0.13,-47337.856569437 +0.131,-55130.6664961224 +0.132,-62054.0328787002 +0.133,-67998.7700934983 +0.134,-72871.1260834256 +0.135,-76594.2608839167 +0.136,-79109.4584350748 +0.137,-80377.0525690119 +0.138,-80377.0525690119 +0.139,-79109.4584350748 +0.14,-76594.2608839167 +0.141,-72871.1260834256 +0.142,-67998.7700934982 +0.143,-62054.0328787001 +0.144,-55130.6664961224 +0.145,-47337.8565694371 +0.146,-38798.500366387 +0.147,-29647.2686354583 +0.148,-20028.4817677285 +0.149,-10093.8337780864 +0.15,-5.91768721316045E-11 +0.151,10093.8337780863 +0.152,20028.4817677281 +0.153,29647.2686354579 +0.154,38798.5003663869 +0.155,47337.856569437 +0.156,55130.6664961223 +0.157,62054.0328787 +0.158,67998.7700934983 +0.159,72871.1260834256 +0.16,76594.2608839167 +0.161,79109.4584350748 +0.162,80377.0525690119 +0.163,80377.0525690119 +0.164,79109.4584350748 +0.165,76594.2608839167 +0.166,72871.1260834256 +0.167,67998.7700934982 +0.168,62054.0328787001 +0.169,55130.6664961224 +0.17,47337.8565694371 +0.171,38798.5003663868 +0.172,29647.268635458 +0.173,20028.4817677283 +0.174,10093.8337780864 +0.175,-2.17081564896876E-10 +0.176,-10093.8337780863 +0.177,-20028.4817677281 +0.178,-29647.2686354579 +0.179,-38798.5003663869 +0.18,-47337.856569437 +0.181,-55130.6664961223 +0.182,-62054.0328787 +0.183,-67998.7700934981 +0.184,-72871.1260834256 +0.185,-76594.2608839167 +0.186,-79109.4584350748 +0.187,-80377.0525690119 +0.188,-80377.0525690119 +0.189,-79109.4584350748 +0.19,-76594.2608839167 +0.191,-72871.1260834257 +0.192,-67998.7700934982 +0.193,-62054.0328787001 +0.194,-55130.6664961224 +0.195,-47337.8565694371 +0.196,-38798.500366387 +0.197,-29647.268635458 +0.198,-20028.4817677283 +0.199,-10093.8337780864 +0.2,-7.89024961754727E-11 +0.201,10093.8337780865 +0.202,20028.4817677284 +0.203,29647.2686354581 +0.204,38798.5003663869 +0.205,47337.8565694372 +0.206,55130.6664961225 +0.207,62054.0328787002 +0.208,67998.7700934983 +0.209,72871.1260834255 +0.21,76594.2608839167 +0.211,79109.4584350748 +0.212,80377.0525690119 +0.213,80377.052569012 +0.214,79109.4584350748 +0.215,76594.2608839167 +0.216,72871.1260834257 +0.217,67998.7700934984 +0.218,62054.0328787001 +0.219,55130.6664961225 +0.22,47337.8565694372 +0.221,38798.500366387 +0.222,29647.268635458 +0.223,20028.4817677283 +0.224,10093.8337780864 +0.225,8.87653081974068E-11 +0.226,-10093.8337780862 +0.227,-20028.4817677284 +0.228,-29647.2686354581 +0.229,-38798.5003663869 +0.23,-47337.856569437 +0.231,-55130.6664961225 +0.232,-62054.0328787002 +0.233,-67998.7700934983 +0.234,-72871.1260834256 +0.235,-76594.2608839168 +0.236,-79109.4584350748 +0.237,-80377.0525690119 +0.238,-80377.0525690119 +0.239,-79109.4584350748 +0.24,-76594.2608839167 +0.241,-72871.1260834257 +0.242,-67998.7700934984 +0.243,-62054.0328787003 +0.244,-55130.6664961225 +0.245,-47337.8565694372 +0.246,-38798.500366387 +0.247,-29647.2686354583 +0.248,-20028.4817677283 +0.249,-10093.8337780864 +0.25,-9.86281202193409E-11 +0.251,10093.8337780862 +0.252,20028.4817677281 +0.253,29647.2686354581 +0.254,38798.5003663869 +0.255,47337.8565694372 +0.256,55130.6664961225 +0.257,62054.0328787002 +0.258,67998.7700934983 +0.259,72871.1260834256 +0.26,76594.2608839167 +0.261,79109.4584350747 +0.262,80377.0525690119 +0.263,80377.0525690119 +0.264,79109.4584350747 +0.265,76594.2608839166 +0.266,72871.1260834256 +0.267,67998.7700934982 +0.268,62054.0328787001 +0.269,55130.6664961225 +0.27,47337.8565694372 +0.271,38798.500366387 +0.272,29647.2686354578 +0.273,20028.481767728 +0.274,10093.8337780862 +0.275,-1.77630316809139E-10 +0.276,-10093.8337780865 +0.277,-20028.4817677284 +0.278,-29647.2686354581 +0.279,-38798.5003663869 +0.28,-47337.856569437 +0.281,-55130.6664961227 +0.282,-62054.0328787003 +0.283,-67998.7700934984 +0.284,-72871.1260834257 +0.285,-76594.2608839168 +0.286,-79109.4584350748 +0.287,-80377.0525690119 +0.288,-80377.0525690119 +0.289,-79109.4584350748 +0.29,-76594.2608839167 +0.291,-72871.1260834257 +0.292,-67998.7700934984 +0.293,-62054.0328787003 +0.294,-55130.6664961227 +0.295,-47337.8565694374 +0.296,-38798.5003663873 +0.297,-29647.2686354586 +0.298,-20028.4817677283 +0.299,-10093.8337780864 +0.3,4.5388875383762E-10 +0.301,10093.8337780862 +0.302,20028.4817677281 +0.303,29647.2686354578 +0.304,38798.5003663866 +0.305,47337.8565694368 +0.306,55130.6664961221 +0.307,62054.0328787001 +0.308,67998.7700934983 +0.309,72871.1260834256 +0.31,76594.2608839167 +0.311,79109.4584350747 +0.312,80377.0525690119 +0.313,80377.052569012 +0.314,79109.4584350749 +0.315,76594.2608839167 +0.316,72871.1260834256 +0.317,67998.7700934982 +0.318,62054.0328787001 +0.319,55130.6664961225 +0.32,47337.8565694372 +0.321,38798.5003663871 +0.322,29647.2686354583 +0.323,20028.4817677286 +0.324,10093.8337780862 +0.325,-1.57904692765271E-10 +0.326,-10093.8337780865 +0.327,-20028.4817677284 +0.328,-29647.2686354581 +0.329,-38798.5003663868 +0.33,-47337.856569437 +0.331,-55130.6664961223 +0.332,-62054.0328787003 +0.333,-67998.7700934984 +0.334,-72871.1260834257 +0.335,-76594.2608839168 +0.336,-79109.4584350748 +0.337,-80377.0525690119 +0.338,-80377.0525690119 +0.339,-79109.4584350748 +0.34,-76594.2608839167 +0.341,-72871.1260834255 +0.342,-67998.7700934981 +0.343,-62054.0328786999 +0.344,-55130.6664961223 +0.345,-47337.856569437 +0.346,-38798.5003663868 +0.347,-29647.2686354581 +0.348,-20028.4817677283 +0.349,-10093.8337780865 +0.35,4.34163129793751E-10 +0.351,10093.8337780868 +0.352,20028.4817677281 +0.353,29647.2686354578 +0.354,38798.5003663866 +0.355,47337.8565694367 +0.356,55130.6664961221 +0.357,62054.0328786998 +0.358,67998.7700934982 +0.359,72871.1260834256 +0.36,76594.2608839167 +0.361,79109.4584350747 +0.362,80377.0525690119 +0.363,80377.052569012 +0.364,79109.4584350749 +0.365,76594.2608839168 +0.366,72871.1260834258 +0.367,67998.7700934982 +0.368,62054.0328787001 +0.369,55130.6664961225 +0.37,47337.8565694372 +0.371,38798.5003663871 +0.372,29647.2686354584 +0.373,20028.4817677286 +0.374,10093.8337780868 +0.375,4.34063429379426E-10 +0.376,-10093.8337780865 +0.377,-20028.4817677283 +0.378,-29647.2686354581 +0.379,-38798.5003663868 +0.38,-47337.856569437 +0.381,-55130.6664961223 +0.382,-62054.0328786999 +0.383,-67998.7700934981 +0.384,-72871.1260834257 +0.385,-76594.2608839167 +0.386,-79109.4584350748 +0.387,-80377.0525690119 +0.388,-80377.0525690119 +0.389,-79109.4584350748 +0.39,-76594.2608839168 +0.391,-72871.1260834257 +0.392,-67998.7700934984 +0.393,-62054.0328787 +0.394,-55130.6664961223 +0.395,-47337.856569437 +0.396,-38798.5003663868 +0.397,-29647.2686354581 +0.398,-20028.4817677284 +0.399,-10093.8337780865 +0.4,-1.57804992350945E-10 diff --git a/test/tests/vectorpostprocessors/least_squares_baseline_correction/gold/least_squares_baseline_correction_out_BL_adjustments.csv b/test/tests/vectorpostprocessors/least_squares_baseline_correction/gold/least_squares_baseline_correction_out_BL_adjustments.csv new file mode 100644 index 0000000000..c3dc2f9030 --- /dev/null +++ b/test/tests/vectorpostprocessors/least_squares_baseline_correction/gold/least_squares_baseline_correction_out_BL_adjustments.csv @@ -0,0 +1,402 @@ +time,adjusted_acceleration,adjusted_velocity,adjusted_displacement +0,-128540.12529754,0,0 +0.001,-104578.12685523,-116.46881548678,-0.059390001507296 +0.002,-81828.348454057,-209.58682840118,-0.22348566806346 +0.003,-60387.752215779,-280.61452131205,-0.46957141436106 +0.004,-40350.898364558,-330.90814510075,-0.77623980686894 +0.005,-21807.468288711,-361.91607842123,-1.1234855189274 +0.006,-4839.9059490516,-375.17276939818,-1.4927944362511 +0.007,10478.786507338,-372.29039583915,-1.8672255632179 +0.008,24087.065468629,-354.94841489564,-2.2314835339287 +0.009,35936.644383638,-324.88120510369,-2.5719797189557 +0.01,45994.046969506,-283.86403256067,-2.8768801360379 +0.011,54241.891818235,-233.69759819781,-3.1361386173459 +0.012,60679.889324498,-176.19144428837,-3.3415139534806 +0.013,65325.536364411,-113.14651515515,-3.4865700209294 +0.014,68214.498892494,-46.337179242948,-3.5666582007627 +0.015,69400.677517215,22.506972892623,-3.578881707215 +0.016,68955.956087069,91.719237674461,-3.5220417605719 +0.017,66969.638290674,159.71350018377,-3.3965658545314 +0.018,63547.582167577,225.00122139271,-3.2044186789713 +0.019,58811.047163975,286.2074161778,-2.9489965599565 +0.02,52895.272874855,342.08534422965,-2.6350065651525 +0.021,45947.812819946,391.52965721931,-2.2683316900695 +0.022,38126.650438993,433.58777084773,-1.8558837845703 +0.023,29598.127901801,467.46925929545,-1.405446096003 +0.024,20534.721256309,492.55310164893,-0.92550749177223 +0.025,11112.697837621,508.39264460309,-0.42509057722445 +0.026,1509.6936944462,514.71818257917,0.086423957995077 +0.027,-8097.7499720085,511.43709477299,0.599474352285 +0.028,-17536.651737615,498.63151795555,1.104493689469 +0.029,-26640.016634648,476.55357346691,1.5920822661861 +0.03,-35249.185586842,445.61820615068,2.0531739923541 +0.031,-43216.06984541,406.39373135068,2.4791944847067 +0.032,-50405.234505511,359.59022292928,2.8622086279424 +0.033,-56695.797582959,306.04590998693,3.1950555283461 +0.034,-61983.114059485,246.71178201858,3.4714689684483 +0.035,-66180.217715475,182.63463112901,3.6861816854704 +0.036,-69218.997407901,114.93878519081,3.8350120375514 +0.037,-71051.088657757,44.806807067522,3.9149318862616 +0.038,-71648.46591925,-26.540548093463,3.9241148074652 +0.039,-71003.725641236,-97.864813235346,3.8619640407335 +0.04,-69130.055125262,-167.93041572806,3.7291198954912 +0.041,-66060.887156777,-235.52509545096,3.5274466450397 +0.042,-61849.245358336,-299.47982286967,3.2599992525851 +0.043,-56566.790107467,-358.68791275031,2.9309705814542 +0.044,-50302.579600075,-412.12304136625,2.5456200399294 +0.045,-43161.565148225,-458.85589188726,2.1101848948663 +0.046,-35262.844007682,-498.06917383319,1.6317757529663 +0.047,-26737.696869399,-529.07078768885,1.1182579500896 +0.048,-17727.440559683,-551.30493461656,0.57812080347965 +0.049,-8381.1294223023,-564.36100321158,0.020336865824459 +0.05,1146.8587439585,-567.98009991896,-0.54578652919784 +0.051,10699.314484548,-562.0591265214,-1.1107610252577 +0.052,20118.727278286,-546.65234643441,-1.6650738235365 +0.053,29249.815344764,-521.97042080494,-2.1993445640221 +0.054,37942.015098114,-488.37693498105,-2.7044799880235 +0.055,46051.891299332,-446.38247517997,-3.1718239021938 +0.056,53445.43019797,-396.63635351092,-3.5933000433374 +0.057,60000.179787631,-339.91611630074,-3.9615455598331 +0.058,65607.203699399,-277.1150053466,-4.2700329777889 +0.059,70172.818185251,-209.22757373183,-4.5131787056746 +0.06,73620.085053472,-137.33368668369,-4.6864363472386 +0.061,75890.037256328,-62.581163171221,-4.786373335598 +0.062,76942.618036194,13.832664862586,-4.8107296676936 +0.063,76757.31904372,90.680181899173,-4.7584578036104 +0.064,75333.507579239,166.7232009214,-4.6297430951135 +0.065,72690.438001906,240.73284481425,-4.4260044173967 +0.066,68866.947322687,311.50928126541,-4.1498749926347 +0.067,63920.839968981,377.90099784332,-3.8051637085018 +0.068,57927.971601932,438.82331136489,-3.3967975444245 +0.069,50981.046605121,493.27581791486,-2.930746018099 +0.07,43188.148370737,540.35850675155,-2.413928850003 +0.071,34671.025715272,579.28628256203,-1.8541083097911 +0.072,25563.16259504,609.40166578203,-1.2597679513626 +0.073,16007.661701849,630.18546957004,-0.63997965924316 +0.074,6154.975447051,641.2652840701,-0.0042611143172482 +0.075,-3839.479758024,642.42163330588,0.63757406105826 +0.076,-13817.788183622,633.59170687278,1.2755711022629 +0.077,-23622.039444802,614.87060695693,1.8997913910114 +0.078,-33096.83354189,586.51009050084,2.5004697385781 +0.079,-42091.746673983,548.91482594138,3.0681691684978 +0.08,-50463.718845891,502.63622323628,3.5939307426862 +0.081,-58079.325528095,448.36393425617,4.0694160527889 +0.082,-64816.897463444,386.91515744239,4.4870401140923 +0.083,-70568.455114505,319.22191533678,4.8400925505442 +0.084,-75241.427173924,246.31650563154,5.1228451441 +0.085,-78760.12597064,169.31535525998,5.3306440366547 +0.086,-81066.956443543,89.401532296477,5.4599851149997 +0.087,-82123.339560574,7.8061916588598,5.5085713745991 +0.088,-81910.335569197,-74.210752524667,5.4753513424264 +0.089,-80428.957202266,-155.38042277741,5.3605379380724 +0.09,-77700.167857067,-234.44492982989,5.1656074611587 +0.091,-73764.56473746,-310.17716483674,4.8932787068986 +0.092,-68681.751921201,-381.40011969886,4.5474725253905 +0.093,-62529.413208219,-447.0054303447,4.1332524491338 +0.094,-55402.09934379,-505.97085004735,3.6567473122689 +0.095,-47409.748718418,-557.37637670492,3.1250570695204 +0.096,-38675.964852602,-600.41877921302,2.5461432883397 +0.097,-29336.077813455,-634.42429328889,1.9287060299636 +0.098,-19535.020120574,-658.85928595822,1.282049050319 +0.099,-9425.050626898,-673.33871993464,0.61593543652897 +0.1,836.63773935636,-677.63228381274,-0.059564053879899 +0.101,11090.388651731,-671.66809079336,-0.73422756819912 +0.102,21176.592522279,-655.53388700255,-1.3978411872784 +0.103,30938.196514227,-629.47574973695,-2.0403579075355 +0.104,40223.174846705,-593.89429555097,-2.6520540761269 +0.105,48886.920431631,-549.33845737308,-3.2236808187086 +0.106,56794.520121886,-496.49692818121,-3.7466080775761 +0.107,63822.877683257,-436.18740556831,-4.2129589939306 +0.108,69862.651002765,-369.34380621723,-4.6157325196614 +0.109,74819.972973833,-297.00165133119,-4.9489123290349 +0.11,78617.928908791,-220.28185291494,-5.2075603163046 +0.111,81197.767167704,-140.37315603506,-5.3878932074996 +0.112,82519.823898393,-58.51351339843,-5.4873410807124 +0.113,82564.147290078,24.029314568169,-5.5045868736373 +0.114,81330.811480801,105.97762871653,-5.4395862567063 +0.115,78839.915152152,186.0638164274,-5.2935675590402 +0.116,75131.264816501,263.05021780025,-5.0690117487281 +0.117,70263.747773831,335.74851996667,-4.7696127828152 +0.118,64314.404608493,403.03837412694,-4.4002189516215 +0.119,57377.21583404,463.88494216064,-3.9667561412559 +0.12,49561.621801701,517.3550965108,-3.4761342228567 +0.121,40990.799194354,562.63201826984,-2.9361380428461 +0.122,31799.721265704,599.0279636322,-2.3553047309255 +0.123,22133.032395189,625.99499774365,-1.7427892579314 +0.124,12142.770456437,643.13352701007,-1.108220360553 +0.125,1985.9728975874,650.19849563348,-0.46154910172205 +0.126,-8177.795735063,647.10314894688,0.18710754902306 +0.127,-18188.955859283,633.92030448142,0.82762565231145 +0.128,-27890.424910362,610.88111097486,1.4500332508047 +0.129,-37130.08979128,578.3713151262,2.0446668338777 +0.13,-45763.200749252,536.92509519121,2.6023228525417 +0.131,-53654.648947765,487.21655884693,3.1144019000376 +0.132,-60681.091837131,430.04903959291,3.5730432895936 +0.133,-66732.892826493,366.34236062062,3.9712479123136 +0.134,-71715.844688933,297.11826715588,4.3029874431579 +0.135,-75552.649541314,223.48425709614,4.5632981784283 +0.136,-78184.132079547,146.61606505315,4.7483580305619 +0.137,-79570.166955817,67.739076076535,4.8555454718236 +0.138,-79690.305692577,-11.891037759315,4.8834795031741 +0.139,-78544.093265975,-91.008152520237,4.8320400238024 +0.14,-76151.069384652,-168.35568651133,4.7023682860477 +0.141,-72550.454462679,-242.70643799617,4.4968474343908 +0.142,-67800.525256707,-312.88195372584,4.2190634413669 +0.143,-61977.690031215,-377.77112286881,3.8737470621469 +0.144,-55175.277854373,-436.34770316831,3.4666977292244 +0.145,-47502.061133692,-487.68650301858,3.0046905927875 +0.146,-39080.534708072,-530.97796435683,2.495368178794 +0.147,-30044.978650674,-565.54091649564,1.9471183785397 +0.148,-20539.335347896,-590.83329990303,1.3689406994646 +0.149,-10714.934347606,-606.46069094554,0.77030289178888 +0.15,-728.10087064568,-612.18249330637,0.16099021681091 +0.151,9262.3142878181,-607.91569861699,-0.44905026048662 +0.152,19097.444499555,-593.73615716115,-1.0498678948119 +0.153,28620.91709701,-569.87733881962,-1.6316666995437 +0.154,37681.323627975,-536.72660398223,-2.1849611018118 +0.155,46134.611604783,-494.81904346791,-2.7007267528447 +0.156,53846.360019464,-444.82898479961,-3.1705440115209 +0.157,60693.902731684,-387.55929904248,-3.5867318345205 +0.158,66568.266234198,-323.92867705222,-3.942469957815 +0.159,71375.891230371,-254.9570760618,-4.2319074398703 +0.16,75040.110867787,-181.74956635518,-4.4502558512839 +0.161,77502.362309947,-105.47883304297,-4.5938656386265 +0.162,78723.112535195,-27.366609152035,-4.6602844559126 +0.163,78682.483758793,51.335666896885,-4.6482965411604 +0.164,77380.568612375,129.36666411239,-4.5579425154625 +0.165,74837.430107768,205.47512932471,-4.3905192902579 +0.166,71092.786385632,278.43969993881,-4.1485600831952 +0.167,66205.385218549,347.08824630676,-3.8357948562957 +0.168,60252.078134642,410.31643842242,-3.4570917997677 +0.169,53326.608763456,467.10524383984,-3.0183807834436 +0.17,45538.134514412,516.53708061536,-2.5265599825875 +0.171,37009.504904023,557.81037024877,-1.989387151101 +0.172,27875.323686679,590.25226084372,-1.4153572565834 +0.173,18279.825354008,613.32931960063,-0.8135684071968 +0.174,8374.5994953541,626.65602572499,-0.19357818656902 +0.175,-1683.8010869734,630.0009295813,0.43474733812662 +0.176,-11736.330781141,623.2903807027,1.0613895510304 +0.177,-21623.961122476,606.60976561847,1.6763357058658 +0.178,-31190.190713132,580.20223574091,2.2697373265144 +0.179,-40283.515513991,544.46494515101,2.832066091045 +0.18,-48759.820545321,499.94285738834,3.3542647377312 +0.181,-56484.655266907,447.32021869979,3.8278906108879 +0.182,-63335.356747145,387.40983200852,4.2452495804741 +0.183,-69202.987127155,321.14030057427,4.5995182208434 +0.184,-73994.054816265,249.54144232045,4.8848523179173 +0.185,-77631.99226412,173.72810467849,5.0964799912038 +0.186,-80058.366994255,94.882635021063,5.2307779587518 +0.187,-81233.806789486,14.23628300936,5.285329737797 +0.188,-81138.624428026,-66.950172051562,5.2589648609777 +0.189,-79773.132105411,-147.40626341669,5.151778484615 +0.19,-77157.640573557,-225.87183587905,4.9651310767262 +0.191,-73332.14299764,-301.11688627321,4.7016281850174 +0.192,-68355.688504553,-371.9609326473,4.3650806001107 +0.193,-62305.455290887,-437.29160679051,3.9604455386039 +0.194,-55275.537894919,-496.08217693434,3.493749767034 +0.195,-47375.467745777,-547.40772437895,2.9719958775086 +0.196,-38728.490308724,-590.45971893767,2.4030531869074 +0.197,-29469.625983927,-624.55876343833,1.7955349759128 +0.198,-19743.545327421,-649.16530627756,1.1586639993815 +0.199,-9702.2920891172,-663.88815306066,0.50212838545225 +0.2,497.11003564686,-668.49064321871,-0.1640698105398 +0.201,10695.129210097,-662.89439400917,-0.82977101171159 +0.202,20732.236848521,-647.1805529909,-1.4848170239659 +0.203,30451.419002897,-621.58853905302,-2.1192099367055 +0.204,39700.648150178,-586.51229190932,-2.7232685190802 +0.205,48335.276412329,-542.49408904592,-3.2877796494157 +0.206,56220.312478765,-490.21602761384,-3.8041423936842 +0.207,63232.546334801,-430.48930551277,-4.264502466318 +0.208,69262.488300748,-364.24147054441,-4.6618749550705 +0.209,74216.091813909,-292.50183871418,-4.9902533807294 +0.21,78016.232795132,-216.38531141647,-5.2447033734044 +0.211,80603.922281889,-137.07484663081,-5.4214394937295 +0.212,81939.23321445,-55.802860413188,-5.5178839907241 +0.213,82001.926770588,26.168148166463,-5.5327065716793 +0.214,80791.768381144,107.56544329666,-5.4658445623508 +0.215,78328.528453651,187.12605701433,-5.3185031424656 +0.216,74651.667801979,263.61663691331,-5.0931356519756 +0.217,69819.712751191,335.85282410522,-4.7934042883086 +0.218,63909.329784348,402.71785605517,-4.4241218113623 +0.219,57014.114329876,463.18010112241,-3.991175178773 +0.22,49243.112800769,516.30924856378,-3.501432321656 +0.221,40719.101202502,561.29089878735,-2.9626335267258 +0.222,31576.647460191,597.43932412146,-2.3832691468116 +0.223,21959.988034572,624.20819907384,-1.7724455626787 +0.224,12020.752315038,641.1991310219,-1.1397415154099 +0.225,1915.5706863641,648.16785721257,-0.49505707564055 +0.226,-8196.3960066415,645.02801048031,0.15154236940108 +0.227,-18155.96662904,631.8523946295,0.78998464859848 +0.228,-27806.449970856,608.87174960512,1.4103493623153 +0.229,-36996.115417406,576.47102628015,2.0030239528996 +0.23,-45580.58510732,535.18322971157,2.5588548408073 +0.231,-53425.109852757,485.68092851915,3.0692912295229 +0.232,-60406.692927985,428.7655642512,3.5265193275618 +0.233,-66416.028231878,365.3547298819,3.9235848579784 +0.234,-71359.222261513,296.46761818785,4.254501935266 +0.235,-75159.272739139,223.20886984597,4.5143465891856 +0.236,-77757.280577833,146.75107623385,4.6993334633985 +0.237,-79113.376074394,68.316213151437,4.8068744835105 +0.238,-79207.344726761,-10.843701497913,4.8356185704746 +0.239,-78038.942812477,-89.466420649631,4.7854717759759 +0.24,-75627.8977516,-166.29943904976,4.6575975256285 +0.241,-72013.593262842,-240.11980699767,4.4543969722733 +0.242,-67254.444275007,-309.75347407497,4.1794697658312 +0.243,-61426.971469486,-374.09385760736,3.837555872837 +0.244,-54624.590046724,-432.11934281105,3.434459355047 +0.245,-46956.131837906,-482.90943836195,2.9769553278505 +0.246,-38544.124068978,-525.65933242401,2.4726815550585 +0.247,-29522.851942825,-559.69261928784,1.9300164098248 +0.248,-20036.235594238,-584.47199586311,1.3579451170884 +0.249,-10235.554921683,-599.60775898743,0.76591640402557 +0.25,-277.05818143031,-604.86396952012,0.1636918186345 +0.251,9680.5079216977,-600.1621856817,-0.43880990268175 +0.252,19478.407688343,-585.58270686512,-1.0316709525572 +0.253,28960.425824217,-561.36330781987,-1.6051325618695 +0.254,37975.337203043,-527.89548341922,-2.1497505969936 +0.255,46379.298020952,-485.71826292039,-2.6565461862359 +0.256,54038.120618616,-435.50969121192,-3.1171489969769 +0.257,60829.396075043,-378.0761113632,-3.5239308899254 +0.258,66644.431086666,-314.33941743447,-3.8701278457015 +0.259,71389.968558745,-245.32247858011,-4.1499482245691 +0.26,74989.664760947,-172.13296425563,-4.3586656585454 +0.261,77385.299731754,-95.945825676064,-4.4926950891603 +0.262,78537.701814986,-17.984709641358,-4.5496507569629 +0.263,78427.371739881,60.497401600084,-4.528385216351 +0.264,77054.796368383,138.23801979698,-4.4290087563891 +0.265,74440.447149549,213.98513590616,-4.2528889149952 +0.266,70624.463277154,286.51704642577,-4.0026300858637 +0.267,65666.024528149,354.66170744297,-3.6820335350765 +0.268,59642.423650971,417.31531139459,-3.2960384527289 +0.269,52647.85290504,473.45979339315,-2.8506449658925 +0.27,44791.923870766,522.17899066749,-2.3528203138413 +0.271,36197.943847049,562.67319995766,-1.8103896662134 +0.272,27000.975997984,594.27190338602,-1.2319133022857 +0.273,17345.713811699,616.44446155637,-0.62655208037475 +0.274,7384.2033790649,628.80860498384,-0.0039233069435625 +0.275,-2726.5506190613,631.1365897643,0.62605070055835 +0.276,-12827.057480223,623.35891975124,1.2532990118831 +0.277,-22757.852632918,605.56557665592,1.8677609394232 +0.278,-32362.009778683,578.00473768234,2.459544877613 +0.279,-41487.613429903,541.07900110908,3.0190846115356 +0.28,-49990.15287143,495.33917850584,3.5372906337406 +0.281,-57734.799805733,441.47575099521,4.0056940849296 +0.282,-64598.533799695,380.30812420327,4.4165810531007 +0.283,-70472.082016022,312.77185059034,4.763115107874 +0.284,-75261.64266632,239.90401999713,5.0394461437644 +0.285,-78890.365031358,162.82704865656,5.2408038102541 +0.286,-81299.562710145,82.73112149873,5.363574061976 +0.287,-82449.640997105,0.85556407927004,5.4053576130229 +0.288,-82320.723768972,-81.530562480168,5.3650093689843 +0.289,-80912.970009956,-163.14833842321,5.2426582383987 +0.29,-78246.575008082,-242.72902097485,5.0397069587609 +0.291,-74361.456197906,-319.03392376779,4.7588119871066 +0.292,-69316.628633994,-390.87382638506,4.4038437389264 +0.293,-63189.279943529,-457.12760988896,3.979827803555 +0.294,-56073.559349159,-516.7598235511,3.4928680564549 +0.295,-48079.099890718,-568.83690782862,2.9500528858819 +0.296,-39329.297120522,-612.54181726624,2.3593459848051 +0.297,-29959.371448621,-647.18681460798,1.729463443649 +0.298,-20114.244688868,-672.22423339214,1.0697390574499 +0.299,-9946.2642875326,-687.25504196806,0.38997997391169 +0.3,387.18888191179,-692.03507282963,-0.29968505203612 +0.301,10726.171419892,-686.47882053476,-0.98896242911033 +0.302,20910.688063552,-670.66074900076,-1.6675530379097 +0.303,30783.202507819,-644.81408807471,-2.3253116005646 +0.304,40191.108812431,-609.32713866599,-2.9524036066454 +0.305,48989.124442843,-564.73714601707,-3.539457304404 +0.306,57041.567200659,-511.7218379256,-4.0777084339963 +0.307,64224.480196258,-451.08876165875,-4.5591353637915 +0.308,70427.571340477,-383.7625891545,-4.9765825708007 +0.309,75555.936835139,-310.77059056114,-5.3238704951438 +0.31,79531.541480754,-233.22650552666,-5.5958900861032 +0.311,82294.432527974,-152.31306794089,-5.7886805137639 +0.312,83803.667944499,-69.263459178432,-5.8994889182888 +0.313,84037.944532891,14.658016392748,-5.9268111625251 +0.314,82995.915999909,98.175729508496,-5.8704130901716 +0.315,80696.196087216,180.02268436603,-5.7313318403257 +0.316,77177.046687606,258.96032258196,-5.5118573379529 +0.317,72495.756010824,333.79786063859,-5.2154941707339 +0.318,66727.716622002,403.41085497171,-4.8469045384811 +0.319,59965.217991038,466.75870271507,-4.4118331693439 +0.32,52315.972675191,522.90080155365,-3.9170153835446 +0.321,43901.399455377,571.01111442458,-3.3700698254377 +0.322,34854.690607144,610.39090925276,-2.7793775260744 +0.323,25318.693874683,640.47947361374,-2.1539492348378 +0.324,15443.642651829,660.86263516797,-1.5032831508346 +0.325,5384.7703129238,671.27895402929,-0.83721526898614 +0.326,-4700.1536392788,671.62349150582,-0.16576479057895 +0.327,-14653.326531499,661.94909428602,0.50102304256831 +0.328,-24319.415062106,642.46517622758,1.1532341195655 +0.329,-33548.017778617,613.53401793797,1.7812401613063 +0.33,-42196.048500331,575.6646431502,2.3758485465813 +0.331,-50130.002989737,529.50436986543,2.9284448151644 +0.332,-57228.072914917,475.82817160219,3.4311256423792 +0.333,-63382.073607588,415.52601754072,3.87682017302 +0.334,-68499.155062008,349.58839317134,4.2593977708328 +0.335,-72503.268957902,279.09023208282,4.5737604995239 +0.336,-75336.368410861,205.17351474937,4.815918864377 +0.337,-76959.321298643,129.02880975047,4.983049638012 +0.338,-77352.522565289,51.876053258848,5.0735348354377 +0.339,-76516.19559385,-25.055128893709,5.0869812375659 +0.34,-74470.377689895,-100.54524254423,5.0242201650701 +0.341,-71254.589625432,-173.40457367204,4.887287539063 +0.342,-66927.194224191,-242.49235160058,4.6793844885551 +0.343,-61564.453819628,-306.73511958937,4.404819257419 +0.344,-55259.301170277,-365.1440198252,4.068931200763 +0.345,-48119.842948829,-416.830715854,3.6779982829041 +0.346,-40267.619059075,-461.02169606582,3.2391293404296 +0.347,-31835.644966504,-497.07072829977,2.7601430725367 +0.348,-22966.267543591,-524.46926279515,2.2494355273768 +0.349,-13808.867937397,-542.85461640519,1.7158383637658 +0.35,-4517.4473248567,-552.01579836639,1.1684700269603 +0.351,4751.8667576273,-551.89688439712,0.61658240385859 +0.352,13843.354522473,-542.59787610951,0.069405287906278 +0.353,22604.238952799,-524.37302513104,-0.46400866608582 +0.354,30887.182133001,-497.62664317926,-0.9749361304888 +0.355,38552.703956974,-462.90645283605,-1.455129854079 +0.356,45471.485517563,-420.89457896938,-1.8969575249267 +0.357,51526.521276097,-372.39631068589,-2.2935306084278 +0.358,56615.086582003,-318.32680472792,-2.6388208050809 +0.359,60650.489942178,-259.69592877575,-2.9277624111993 +0.36,63563.582987633,-197.5914726236,-3.1563385994704 +0.361,65304.004751996,-133.16098381568,-3.321650247112 +0.362,65841.14125109,-67.592500233949,-3.4219661002399 +0.363,65164.7857499,-2.0944728280658,-3.4567532173877 +0.364,63285.489858815,62.124816645157,-3.4266870512684 +0.365,60234.600567487,123.87803241361,-3.3336409693873 +0.366,56063.983164891,182.01944232956,-3.180654923283 +0.367,50845.43512897,235.46514131013,-2.9718837570206 +0.368,44669.800807882,283.21254277657,-2.7125256554019 +0.369,37645.801548163,324.35883859489,-2.4087315589134 +0.37,29898.6004156,358.11815976715,-2.0674968361633 +0.371,21568.124843833,383.83717812076,-1.6965365508665 +0.372,12807.17438773,401.00892570751,-1.3041459910864 +0.373,3779.3441880938,409.28462783406,-0.89904843933459 +0.374,-5343.2023436392,408.4833846547,-0.49023207701725 +0.375,-14382.075682342,398.59956873521,-0.086778473426193 +0.376,-23155.079453978,379.807841583,0.30231518493721 +0.377,-31478.667770594,352.46573057697,0.66831775713644 +0.378,-39170.401099673,317.11375160186,1.0029469442701 +0.379,-46051.360906032,274.47309505371,1.2985512293444 +0.38,-51948.484246937,225.440936895,1.5482880960753 +0.381,-56696.780383909,171.08347510072,1.7462966330847 +0.382,-60141.393641743,112.62682562936,1.8878619438997 +0.383,-62139.478861359,51.445949251538,1.9695694885023 +0.384,-62561.858952082,-10.94818728193,1.989447585208 +0.385,-61294.437276084,-72.922985625158,1.9470961727986 +0.386,-58239.341573359,-132.73986952217,1.8438006146839 +0.387,-53315.780250336,-188.57093577108,1.6826293443267 +0.388,-46460.596403683,-238.51631347688,1.4685145254803 +0.389,-37628.509692655,-280.62191958435,1.2083150867394 +0.39,-26792.041041483,-312.89729696276,0.91086211478469 +0.391,-13941.120111234,-333.33322075573,0.58698627648633 +0.392,917.61941164953,-339.91875441363,0.24952816171773 +0.393,17761.847071764,-330.65745013928,-0.086668148948718 +0.394,36554.830659797,-303.58239876716,-0.40477712371947 +0.395,57247.000089156,-256.76984955934,-0.68602810432418 +0.396,79777.756718996,-188.35114289219,-0.90975446678755 +0.397,104077.50114405,-96.522726025528,-1.0534536777152 +0.398,130069.84876676,20.445953700369,-1.0928564340825 +0.399,157673.99980327,164.20684893152,-1.0020023895977 +0.4,186807.22783566,336.33014161326,-0.75332040126523 diff --git a/test/tests/vectorpostprocessors/least_squares_baseline_correction/least_squares_baseline_correction.i b/test/tests/vectorpostprocessors/least_squares_baseline_correction/least_squares_baseline_correction.i new file mode 100644 index 0000000000..be6785c7e5 --- /dev/null +++ b/test/tests/vectorpostprocessors/least_squares_baseline_correction/least_squares_baseline_correction.i @@ -0,0 +1,39 @@ +[Mesh] + type = GeneratedMesh + dim = 1 +[] + +[Problem] + solve = false +[] + +[Executioner] + type = Steady +[] + +[VectorPostprocessors] + [./accel_data] + type = CSVReader + csv_file = 'accel_20hz.csv' + outputs = none + [../] + [./BL_adjustments] + type = LeastSquaresBaselineCorrection + vectorpostprocessor = accel_data + acceleration_name = accel_20hz + time_name = time + order = 9 + gamma = 0.5 + beta = 0.25 + fit_acceleration = true + fit_velocity = true + fit_displacement = true + contains_complete_history = true + execute_on = INITIAL + [../] +[] + +[Outputs] + csv = true + execute_on = INITIAL +[] diff --git a/test/tests/vectorpostprocessors/least_squares_baseline_correction/tests b/test/tests/vectorpostprocessors/least_squares_baseline_correction/tests new file mode 100644 index 0000000000..734445c492 --- /dev/null +++ b/test/tests/vectorpostprocessors/least_squares_baseline_correction/tests @@ -0,0 +1,12 @@ +[Tests] + design = 'LeastSquaresBaselineCorrection.md' + issues = '#296' + + [./first_test] # will include a more diverse set of tests later on + type = CSVDiff + input = least_squares_baseline_correction.i + csvdiff = least_squares_baseline_correction_out_BL_adjustments.csv + + requirement = 'The object shall correct the acceleration, velocity, and displacements by applying 9th (max) order polynomial fits to all three kinematic variables.' + [../] +[../]