2024-02-06 17:57:59 +11:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "fluid_holder.hpp"
|
2024-02-07 16:04:22 +11:00
|
|
|
#include "evaporator.hpp"
|
2024-02-06 17:57:59 +11:00
|
|
|
#include "condenser.hpp"
|
|
|
|
|
|
|
|
namespace sim::coolant
|
|
|
|
{
|
|
|
|
|
|
|
|
class condenser_secondary : public fluid_holder
|
|
|
|
{
|
|
|
|
condenser* const primary;
|
2024-02-07 16:04:22 +11:00
|
|
|
evaporator* const source;
|
2024-02-06 17:57:59 +11:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2024-02-13 15:28:39 +11:00
|
|
|
condenser_secondary(condenser* primary, evaporator* source, double volume);
|
2024-02-06 17:57:59 +11:00
|
|
|
|
2024-02-07 16:04:22 +11:00
|
|
|
virtual double add_heat(double m, double t) { return source->add_heat(m, t); }
|
2024-02-13 22:33:55 +11:00
|
|
|
virtual void add_gas(double steam, double gas, double t, double e) { return source->add_gas(steam, gas, t, e); }
|
2024-02-07 16:04:22 +11:00
|
|
|
virtual double extract_fluid(double amount) { return source->extract_fluid(amount); }
|
|
|
|
|
|
|
|
virtual double add_fluid(double amount, double heat);
|
2024-02-13 15:28:39 +11:00
|
|
|
|
2024-02-07 16:04:22 +11:00
|
|
|
virtual double get_volume() const { return source->get_volume(); }
|
|
|
|
virtual double get_level() const { return source->get_level(); }
|
|
|
|
virtual double get_heat() const { return source->get_heat(); } // celsius
|
|
|
|
virtual double get_steam() const { return source->get_steam(); } // grams
|
2024-02-13 17:05:57 +11:00
|
|
|
virtual double get_air() const { return source->get_air(); } // grams
|
|
|
|
virtual double get_gas() const { return source->get_gas(); } // grams
|
|
|
|
virtual double get_gas_volume() const { return source->get_gas_volume(); } // litres
|
2024-02-07 16:04:22 +11:00
|
|
|
virtual double get_mass() const { return source->get_mass(); } // grams
|
|
|
|
virtual double get_thermal_mass() const { return source->get_thermal_mass(); } // grams
|
|
|
|
virtual double get_pressure() const { return source->get_pressure(); } // pascals
|
2024-02-13 17:05:57 +11:00
|
|
|
virtual double get_gas_density() const { return source->get_gas_density(); } // g/L
|
2024-02-13 15:28:39 +11:00
|
|
|
|
|
|
|
void update(double dt);
|
2024-02-06 17:57:59 +11:00
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|