1.4.8.1 Heat Sources

So far we focused on the matter side of the simulation, moving mass from A to B and similar things. However, if you run the simulation you have sofar you probably noticed that the temperature in the cabin rises. The reason for this is that we have not yet implemented a thermal component that maintains the coolant temperature. To do this we have to add thermal components to our system, this is done in a very similar fashion to the mass components. You simply have to add the function for it to the system:

function createThermalStructure(this)
	createThermalStructure@vsys(this);
end

Now it works the same way as the matter side of the system. For example if we want to control the temperature in the HX coolant water we have to add heatsources to do that to theses phases. Actually we do not add them to the phase itself, but its corresponding capacity on the thermal side of the model. All matter related components (like phases and branches) are represented on the thermal side as well. Also if we want to keep a temperature constant the library already contains a heat source to do just that. In order to add a heat source to the HX coolant phase the following line of code can be used:

oHeatSourceHX = components.thermal.heatsources.ConstantTemperature('HX_HeatSource');
this.toStores.HX_Coolant.toPhases.Coolant.oCapacity.addHeatSource(oHeatSourceHX);

So far we only have the human model which produces a heat load in the cabin atmopshere. In a real spacecraft the equipment also produces a significant amount of heat that must be accounted for. To do this we can use a normal heat source, for which we can set a heat flow either directly at its definition or by using the setHeatFlow Function later on.

% Create a heat source with 0W of thermal power beeing
% generated. Positive values increase the temperature of the
% capacity, negative values reduce it
oHeatSource = thermal.heatsource('Heater', 0);
% Add the heat source to the capacity
this.toStores.Cabin.toPhases.CabinAir.oCapacity.addHeatSource(oHeatSource);
% Set the heat flow of the heat source to 100W
oHeatSource.setHeatFlow(100);

Of course you can also derive your own heat sources from the core class and implement calculations specific to your system! This works the same way as we did for example for the LiOH p2p in 1.4.4 Processors

1.4.8.2 Thermal Branches and Conductors

Additional to heat sources V-HAB also includes thermal solvers which can solve the transfer of thermal energy via conduction, radiation or convection. The definition of these is kept similar to the mass branches and solver logic.

For now we add a convective heat transfer between the LiOH solid phase and the gas phase which models the gas flowing through it. For this we first have to define conductor that calculates the convective heat transfer, so we creat a new file in the component folder with the following content:

classdef convectiveConductorLiOH < thermal.procs.conductors.convective
    properties (SetAccess = protected)
        fHydraulicDiameter;
        fLength;
    end
    
    methods
        
        function this = convectiveConductorLiOH(oContainer, sName, oMassBranch, iFlow, fHydraulicDiameter, fLength)
            % calculate the heat transfer area from the provided inputs
            fArea = fLength * pi * fHydraulicDiameter;
            
            this@thermal.procs.conductors.convective(oContainer, sName, fArea, oMassBranch, iFlow)
            
            this.fHydraulicDiameter = fHydraulicDiameter;
            this.fLength            = fLength;
            
        end
        
        function fHeatTransferCoefficient = updateHeatTransferCoefficient(this, ~)
            % Get the corresponding flow from the ascociated mass branch
            oFlow = this.oMassBranch.aoFlows(this.iFlow);
            
            if oFlow.fFlowRate == 0
                fHeatTransferCoefficient = 0;
            else
                % calculate the matter properties
                fDensity              = this.oMT.calculateDensity(oFlow);
                fDynamicViscosity     = this.oMT.calculateDynamicViscosity(oFlow);
                fThermalConductivity  = this.oMT.calculateThermalConductivity(oFlow);
                fSpecificHeatCapacity = this.oMT.calculateSpecificHeatCapacity(oFlow);

                fFlowSpeed = (oFlow.fFlowRate / fDensity) / this.fArea;

                % calculate the convective heat transfer coefficient using a
                % pipe as an assumption
                fConvection_alpha = functions.calculateHeatTransferCoefficient.convectionPipe(this.fHydraulicDiameter, this.fLength, fFlowSpeed, fDynamicViscosity, fDensity, fThermalConductivity, fSpecificHeatCapacity, 0);

                % Calculate the thermal conductivity of the connection in [W/K]
                fHeatTransferCoefficient = fConvection_alpha * this.fArea;
            end
        end
    end
end

This conductor inherits from the general convective conductor defined in the V-HAB core and allows us to define a function to update the heat transfer coefficient with our individual calculation. In this case we assume the convection in a pipe as a representation for the heat transfer. To calculate the heat transfer coefficient of a pipe and other basic geometries V-HAB contains a functions library that implements the necessary functions so it is not necessary for you to look up all the necessary equations.

Now similar to a mass branch we must define a thermal branch in our Example system in the createThermalStructure function:

% Define the convective conductor. We attach it to the first
% flow of the CO2 removal branch and define the length of the
% pipe as 1 m and the hydraulic diameter as 0.1 m. From this
% the conductor calculates the heat transfer area!
xxyy.introduction.components.convectiveConductorLiOH(this, 'LiOH_Convection', this.toBranches.Cabin_to_CO2_Removal, 1, 0.1, 1);

% Create the necessary thermal exmes for this connection at the
% two phases in the CO2 removal
thermal.procs.exme(this.toStores.Cabin.toPhases.CabinAir.oCapacity,     'Air_Convection');
thermal.procs.exme(this.toStores.CO2_Removal.toPhases.LiOH.oCapacity,   'LiOH_Convection');

% define the thermal branch
thermal.branch(this, 'Cabin.Air_Convection', {'LiOH_Convection'}, 'CO2_Removal.LiOH_Convection', 'LiOH_Convection');

Note that thermal branches can be handled the same as mass branches and it is also possible to define thermal branches between subsystems using the same approach as for mass branches! You can also combine different conductors in a thermal branch, for example to simulate the heat transfer between two fluids through a wall you would require two convective conductors (one for each fluid) and a conduction conductor to model the thermal resistance of the solid.

You can also add solvers to the thermal branches the same way you would do for matter branches, however if you do not have a specific solver in mind the setThermalSolvers function will set the basic thermal solvers which should work fine for most system!


  • Keine Stichwörter