fast-nuclear-sim/src/coolant/valve.hpp

31 lines
385 B
C++
Raw Normal View History

2024-01-18 18:00:39 +11:00
#pragma once
#include "fluid_holder.hpp"
2024-01-18 18:00:39 +11:00
namespace sim::coolant
{
class valve
{
const double max;
fluid_holder* const src;
fluid_holder* const dst;
2024-01-18 18:00:39 +11:00
double state = 0;
public:
valve(fluid_holder& src, fluid_holder& dst, double max);
void open(double v);
void update(double secs);
void set_state(double v);
constexpr double get_state() const { return state; }
2024-01-18 18:00:39 +11:00
};
};