help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

## Modelling questions

 From: И Страшко Subject: Modelling questions Date: Wed, 22 Jun 2011 08:58:50 -0700

So here are my general modelling question.

Background.   I am working on a heated mass.  This mass, of course, follows the heat equation,
del2(T) = partial(T)/dt + q_e(x)

q_e is some heat flux which comes into the system

This is all coded in something called a function "heat"

Boundary conditions.  For the first (aphysical) model, I've decided that the boundary conditions should simply be that the edges don't change, that is, they are a perfect heat sink.

Question- The "core" of my iterator looks like this.  T is a 4-d matrix in (x,y,z,t)...  Tnow and Tlast are (x,y,z)...

for itime = 2:size(timeaxis)(2)
disp(itime);
% Tnow is the previous temperature.
Tlast = Tnow;
% Tnow is now set to the current temperature
[Tnow, fcn, info] = fsolve(@heat,Tlast);
% Force Tnow to not lose boundary conditions
Tnow(1,:,:)=Tzero;
Tnow(end,:,:)=Tzero;
Tnow(:,1,:)=Tzero;
Tnow(:,end,:)=Tzero;
Tnow(:,:,1)=Tzero;
Tnow(:,:,end)=Tzero;

% Update the array with the current temperature
T(:,:,:,itime) = Tnow;
% Continue if we converged.
if (! (info==1))
disp("info not one:"),disp(info)
break
endif
endfor

Question 2- This concerns the function "heat."  When I rewrite my model to include thin layers of insulators on some walls and not on others, is it possible to compute the laplacian in segments, that is, so that part of the array has big blocks (dx, dy, dz are big) and the insulating walls have smaller blocks (that is, so that this part of the array has dx, dy, dz being small).  I mean, of course I can WRITE this in octave, the question is what the numeric analysis pitfalls will be when attempting this.

Thanks for the help!

-John Staško

reply via email to

 [Prev in Thread] Current Thread [Next in Thread]