Skip to content

Simple code for approximate thermal mathematical modeling and simulation. Conductivity Radiation

License

Notifications You must be signed in to change notification settings

newcanopies/model_isothermal_nodes

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thermal

DOI

A simple code for approximate thermal mathematical modeling and simulation.

This set of Matlab package allows modeling and simulating the thermal evolution of a system composed of several isothermal nodes, connected by conductive paths and radiative paths, subject to internal and external heat loads, and radiating to free space. All units are SI units.

This code has been developed as an aid for the Spacecraft Predesign course of the Master in Space Engineering at the Universidad Carlos III de Madrid. It is currently in beta version and may contain errors. All help to detect bugs and improve the code is welcome.

Installation

Installation requires simply that you download Thermal and add the base src directory (the one that contains the +thermal directory) to your Matlab path.

Dependencies

A recent version of Matlab is needed to run the code.

Quick usage guide

The main function that the user must know is thermal.integrator. This function uses ode45 to integrate the thermal evolution equation of each node. It has the following interface:

function [t,T] = integrator(model,scenario,ic,tspan,options)

The INPUTS are:

  • model is a structure like the one generated by the function model_template. It contains the parameters of the thermal mathematical model to be simulated.
  • scenario is a structure like the one generated by the function scenario_template. This structure contains the thermal loads for the simulation.
  • ic is a vector with the initial temperature conditions for the nodes.
  • tspan is the time span for the simulation, e.g. [0,1000] s.
  • options is an optional argument, a structure like the one generated by Matlab's odeset function.

The user is adviced to copy and edit the provided template files for model, scenario, where the necessary structure fields are defined. A template for ic is also provided for reference. The model and scenario structures and the ic vector may be also created/edited by other means. This is particularly interesting when concatenating succesive integrations with different thermal loads, where the initial conditions of each integration are the terminal conditions of the former.

A minimum absolute and relative tolerance should be indicated in options with odeset to ensure accurate integration.

The OUTPUTS are:

  • t is a m x 1-vector with the resulting integration times
  • T is a m x n-array with the resulting integration temperatures, one column per node.

Code structure

The package contains the following functions in the /src directory:

  • thermal.dT_dt: differential equations for each node.
  • thermal.integrator: main function to be called by the user. Integrates the differential equations.
  • model_template: a function that generates the model structure. This is a template, intended to be copied and modified by the user.
  • scenario_template: a function that generates the scenario structure. This is a template, intended to be copied and modified by the user.
  • ic_template: a function that generates the ic vector. This is a template, intended to be copied and modified by the user.

Testing

The test suite of Thermal is currently quite minimal. Tests and their fixtures can be found in the /tests directory. These tests can give you a feeling of how to run Thermal on your own. After adding the Thermal package to your Matlab path, you can run all tests by executing runtests from the /tests directory.

Contributing

If you have any comments for improvement or are interested in contributing to the continued development of this or any of our other codes, you can contact us through our website.

For updates and news, follow us on Twitter: @ep2lab..

Acknowledging

This program is the result of our development effort. It is released as open source in the hope that it will be useful to other people. If you find it useful and/or use it in any of your works, we kindly ask you to acknowledge it by referencing the code directly as:

Mario Merino (2020). Thermal code DOI: 10.5281/zenodo.1257295

License

Copyright (c) 2020 Mario Merino. The software is released as open source under the MIT License.

About

Simple code for approximate thermal mathematical modeling and simulation. Conductivity Radiation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • MATLAB 100.0%