Skip to content
Newton's Law of cooling simulator (analytical approach) using Ruby
Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README
README.md
newtons_law_of_cooling_analytical.rb

README.md

NEWTON'S LAW OF COOLING ENGINE v01.04 README

Language

Carnot Engine is written in Ruby 1.9.2

Description

This program simulates a warmer object shedding heat by conduction into a cooler environment.

Requirements

You must have Ruby 1.9.2 installed on your computer.

Running the Program

There may be various ways to run Ruby programs on particular machines. However, these instructions assume that you have access to your computer's command line interface.

To run this file, first download it and place it in an appropriate directory. For example, you may wish to create a subdirectory for Ruby program in your top-level user directory and place the program file in there.

In the command line, go to the directory where the program file is located.

Then enter:

ruby carnot_engine_v01-02.rb

You will be prompted to enter parameters.

Adjusting Parameters

You can adjust other parameters manually. To do so, change the parameters in the "# Initialize simulation parameters" section of the source code. You will need a text editor for this.

Troubleshooting

If the program does not run, make sure that at least Ruby version 1.9.2 is installed on your computer.

Make that you are in the correct directory.

If you adjusted the parameters, make sure all are positive and have decimal point. Also make sure that you saved the file in a pure text format and that the file name ends in ".rb"

Copyright and Use Notice

Copyright 2011-13 by Mark Ciotola.

Available for use under GNU license.

You can’t perform that action at this time.