https://mooseframework.inl.gov
Loading...
Searching...
No Matches
GeneralSensorPostprocessor.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
13#include <iostream>
14using namespace std;
15#include "MooseRandom.h"
16
21{
22public:
24
26
27 virtual void initialize() override;
28 virtual void execute() override {}
30 virtual PostprocessorValue getValue() const override;
31
32protected:
34 std::vector<Real> elementwiseMultiply(std::vector<Real> & vec1, std::vector<Real> & vec2);
38 virtual vector<Real> getRVector();
40 Real getIntegral(std::vector<Real> integrand);
41
47 const Real _vector_size;
65 const Real _integral_weight;
67 std::vector<Real> & _time_values;
69 std::vector<Real> & _input_signal_values;
71 std::vector<Real> & _integrand;
73 std::vector<Real> & _R_function_values;
77 const unsigned int _seed;
85};
Real PostprocessorValue
A generalized sensor Postprocessor.
const Function & _drift_function
The drift function to be evaluated and returned.
std::vector< Real > elementwiseMultiply(std::vector< Real > &vec1, std::vector< Real > &vec2)
Function for element-wise multiplication of vectors.
const Function & _R_function
Function R for integration term.
int & _t_step_old
The last time step this object was executed on.
std::vector< Real > & _R_function_values
vector to store R function values
const Real _proportional_weight
A weighing factor for the proportional term.
const Function & _signalToNoise_function
Signal to noise function.
Real _sensor_value
for getValue() output
virtual vector< Real > getRVector()
Function to calculate R vector.
std::vector< Real > & _input_signal_values
Input Signal vector for calculating delay.
const Real _integral_weight
A weighing factor for the integral term.
const PostprocessorValue & _input_signal
A postprocessor used as the sensor input signal.
const Function & _uncertainty_std_dev_function
Uncertainty std dev function.
const Function & _efficiency_function
Efficiency function.
const PostprocessorValue & _pp_old
The old value of the postprocessor.
std::vector< Real > & _time_values
Time vector for calculating delay.
const unsigned int _seed
To get fixed seed random numbers.
const Real _vector_size
Size of vector to be stored.
Real _delay_value
Variable to store delay value.
Real getIntegral(std::vector< Real > integrand)
Function to calculate integral term.
const Function & _delay_function
Delay function.
const Function & _noise_std_dev_function
Noise standard deviation function.
Real getDelayedInputSignal()
Function to calculate delayed input signal.
std::vector< Real > & _integrand
Vector to store integrand data for numerical integration.
virtual PostprocessorValue getValue() const override
static InputParameters validParams()
Real _integration_value
the output of the integrand
const InputParameters & parameters() const
virtual PostprocessorValue getValue() const=0