... share your algorithms as a web service

Algorithm: Visualize Heat Conduction on a Plate using Discrete Laplacian

A function I wrote a while ago to experiment with simulating the heat conduction using the discrete laplacian. The borders are always forced to be cold and there is only a single heat source.
Every tenth timestep is being plotted.

As this was written for experimentation there might very well ... (show more)
Tags: visualization
Usage: Algorithm is public.
Viewed 2470 times, called 63 times
Empty star Empty star Empty star Empty star Empty star
0 votes
Florian Pfaff
01/27/2013 5:29 p.m. (version #1)

Run Algorithm

Scale the plate
: Heat source permanent
: Amount of time steps
: Allow cached result?

Please Wait

Computation is running...


showing plot # of

Result Value(s)


Resource Usage

Execution of the algorithm took seconds.
Peak memory usage for running the algorithm was kilobytes (total usage: kilobytes).

Run ID / Link

ID of this run:

Result from Cache

Result has been delivered from cache and computed on (UTC).

Matlab log




Using this algorithm in your local MATLAB environment is easy: Click here for instructions!

Usage Instructions for CloudRunner Client

  1. Download the CloudRunner Client by clicking here and place the downloaded file in your MATLAB working directory.

  2. Inside MATLAB, initialize the CloudRunner Client by calling CloudRunner:
    >> CloudRunner

    A login dialog will prompt for your CloudRunner mail address and password. For a start, you can leave the dialog empty and just click "Connect".

    Alternatively, you can provide the login credentials (or empty strings to skip login) as a parameter and hence skip the login dialog. This is useful when using CloudRunner in non-interactive scripts.
    >> CloudRunner('', 'password')

  3. Select this algorithm by its URL. Selecting an algorithm creates the lambda function that proxies calls to the algorithm to the server for execution:
    >> CloudRunnerSelect('')

    For the sake of convenience, you can also use the algorithm ID instead of its URL for public algorithms.

  4. Call functions from the algorithm like any regular local function.

Note: You can find further information on the help page.

Source Code


 1 function heatConduction(scale,permanent,steps)
 2 % @author Florian Pfaff
 3 % @date 2011
 4     if nargin<1, scale=3;end;
 5     if nargin<2, permanent=true;end;
 6     if nargin<3, steps=100*scale;end;
 7     if ~mod(scale,2)
 8         error('Expected odd value');
 9     end
10     n=20*scale;
11     a=zeros(n,n);
12     colormap(hot)
14     a(3/4*n-(scale-1)/2:3/4*n+(scale-1)/2,3/4*n-(scale-1)/2:3/4*n+(scale-1)/2)=1;
15     for i=1:steps
16         disp(i);
17         if permanent
18             a(3/4*n-(scale-1)/2:3/4*n+(scale-1)/2,3/4*n-(scale-1)/2:3/4*n+(scale-1)/2)=1;
19         end
20         a(1,:)=0;a(n,:)=0;a(:,1)=0;a(:,n)=0;
21         a=a+del2(a);
23         image(64*a')
24         colorbar
25         if mod(i,10)==0
26             drawnow
27         end
28     end
29 end
Download algorithm (1 file) as ZIP


Please login to post a comment.