https://mooseframework.inl.gov
PIDTransientControl.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 
12 #include "Control.h"
13 
19 {
20 public:
22 
28 
29  virtual void execute() override;
30 
31 private:
35  const Function & _target;
37  const Real _Kint;
39  const Real _Kpro;
41  const Real _Kder;
66  int & _t_step_old;
71 };
Base class for function objects.
Definition: Function.h:36
const Real _Kint
The coefficient multiplying the integral of the error.
const PostprocessorValue & _current
The current value of the target postprocessor.
Real & _integral
Integral of the error.
const Real _stop_time
The time to stop using the PID controller on.
static InputParameters validParams()
const bool _reset_every_timestep
Whether to reset the PID integral error when changing timestep, to limit its action to within couplin...
const Real _Kder
The coefficient multiplying the derivative of the error.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const bool _reset_integral_windup
Whether to reset the PID integral error when the error crosses 0, to avoid windup.
Real & _value_old
Saved value of the controlled parameter at the beginning of a timestep, to recover from a failed solv...
Real & _value
Saved value of the controlled parameter at the end of a timestep.
A time-dependent control of an input parameter or a postprocessor, which aims at making a postprocess...
bool _has_recovered
whether the app has recovered once, because the logic for setting the value is different after having...
const Real _minimum_output_value
Limiting minimum value for the output of the PID controller.
const Real _Kpro
The coefficient multiplying the error.
const Real _maximum_output_value
Limiting maximum value for the output of the PID controller.
Real PostprocessorValue
various MOOSE typedefs
Definition: MooseTypes.h:202
const Function & _target
The target 1D time-dependent function for the postprocessor.
virtual void execute() override
Execute the control.
Real & _old_delta
the previous value of the difference with the target, to detect changes of sign, and to compute the d...
const Real _start_time
The time to start the PID controller on.
int & _t_step_old
the previous time step
Real & _integral_old
Saved value of the integral at the beginning of a timestep, to recover from a failed solve...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Base class for Control objects.
Definition: Control.h:33
PIDTransientControl(const InputParameters &parameters)
Class constructor.
const Real _maximum_change_rate
Limiting maximum value for the rate of change of output of the PID controller.
const InputParameters & parameters() const
Get the parameters of the object.