Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions classes/heat.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
obj.heatDiffusion = p.Results.heatDiffusion;
obj.intpAtInterface = p.Results.intpAtInterface;
% set default ode options after initialization of parent class
obj.odeOptions.RelTol = 1e-3;
obj.odeOptions.RelTol = 1e-4;
end%function

%% Display
Expand Down Expand Up @@ -635,7 +635,7 @@ function setBoundaryCondition(obj,varargin)
index = finderb(z,dStart);
unitCell = handles{index}; % this is the handle to the corresponding unitCell

k = cellfun(@feval,(unitCell.thermCond)',num2cell(T));
k = cellfun(@feval,(unitCell.thermCond)',repmat({T},K,1));
% these are the parameters of the differential equation as they
% are defined in matlab for the pdesolver

Expand Down Expand Up @@ -731,11 +731,10 @@ function setBoundaryCondition(obj,varargin)
aAxes = obj.S.getUnitCellPropertyVector('aAxis');
bAxes = obj.S.getUnitCellPropertyVector('bAxis');
UCmasses = normMasses.*(aAxes/1e-10).*(bAxes/1e-10); % calculates vector of unit cell masses
Cells = obj.S.getNumberOfUnitCells;

for k=1:obj.S.numSubSystems
parfor i=1:size(tempMap,1)
for n=1:Cells
for i=1:size(tempMap,1)
for n=1:obj.S.getNumberOfUnitCells
energyMap(i,n,k) = UCmasses(n)*( intHeatCapacity{n,k}(tempMap(i,n,k)) - intHeatCapacity{n,k}(initTemp(n,k)) );
end
end
Expand Down
5 changes: 4 additions & 1 deletion classes/phonon.m
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ function disp(obj)
% current temperature for each subsystem
% traverse subsystems
for j=1:K
intAlphaT(:,j) = cellfun(@feval,intLinThermExps(:,j),num2cell(squeeze(tempMap(i,:,j))'));
% traverse unit cells
for n=1:N
intAlphaT(n,j) = intLinThermExps{n,j}(tempMap(i,n,j)); % cellfun(@feval,intLinThermExps(:,j),num2cell(squeeze(tempMap(i,:,j))'));
end
end%for

% calculate the length of the sticks of each subsystem and sum
Expand Down