Skip to content

Commit

Permalink
% Version 8.2.
Browse files Browse the repository at this point in the history
% Frozen February 18, 2013 6:10 pm.

% Please start with constants.m. Define the properties of your system. Most
% properties are self explanatory.

% Then run either mainLinear.m or mainCircular.m depending on whether you
% have a structure with a constant cross-section or one with rotational
% symmetry.

% New
% * Made speed improvements
% * Intead of interpolation, now polynomials are compuated for materials.

% Notes
% 1. optical model
% 2. thermal model
% 3. costing
%
% trough.material
% 1. refractiveIndex, reflectivity 3. density
%
% receiver.absorber
% 2. emissivity, thermalConductivity, absorptance
%
% receiver.sleeve
% 2. emissivity, absorptance
%
% receiver.gas
% 2. thermalDiffusivityTable, viscosityTable, prandtlNumberTable, thermalConductivityTable
%
% collectorCycle.fluid
% 2. viscosityTable, densityTable, heatCapacityTable, heatConductivityTable
%
% atmosphere
% 2. viscosityTable, prandtlNumberTable, thermalConductivityTable
  • Loading branch information
abdullahkhalids committed Jul 7, 2013
1 parent bbd3680 commit cfb7569
Show file tree
Hide file tree
Showing 13 changed files with 605 additions and 199 deletions.
16 changes: 8 additions & 8 deletions calculations.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
%compute trough stuff
trough.rotAngle = deg2rad(sun.widthAngle) + trough.trackingError;
trough.height = ParabolaHeight(trough.focalLength,trough.width);
trough.rimAngle = ParabolaRimAngle(trough.focalLength, trough.width);
% trough.rimAngle = ParabolaRimAngle(trough.focalLength, trough.width);
trough.arcLength = ParabolaArcLength(trough.focalLength,trough.width);
trough.area = trough.arcLength*trough.length;
trough.aperature = trough.width*trough.length;
trough.coordinates = ParabolaCoordinates(trough, simulation);
trough.gradients = ParabolaGradient(trough.coordinates,trough.surfaceStdDev);
trough.coordinates = trough.coordinates(:,2:end-1); %throw away the coordinates no longer needed
trough.fullQuantization = 2*trough.halfQuantization + 1;
if trough.halfQuantization == 0; trough.specularity = 1; end;
% trough.fullQuantization = 2*trough.halfQuantization + 1;
% if trough.halfQuantization == 0; trough.specularity = 1; end;
trough.normals = normalize([-trough.gradients(1,:); ones(1,length(trough.gradients)); -trough.gradients(2,:)]);
trough.reflector.length = trough.length;
trough.reflector.width = trough.arcLength;
Expand All @@ -49,13 +49,13 @@
collectorCycle.outletTemperature = setValueStructField(collectorCycle,'outletTemperature', atmosphere.temperature);
collectorCycle.area = pi*(receiver.absorber.innerDiameter^2 - receiver.annulus.diameter^2)/4;
collectorCycle.speed = fluidSpeed(collectorCycle.flowRate,receiver.absorber.innerDiameter,collectorCycle.fluid.density,receiver.annulusCheck,receiver.annulus.diameter);
collectorCycle.quality = 0;
collectorCycle.volume = pi*(receiver.radius)^2*receiver.length*3; % 3 is an arbitrary factor here.
collectorCycle.material = collectorCycle.fluid.material;
collectorCycle.massFlowRate = collectorCycle.flowRate*materialProperty(collectorCycle.fluid.densityTable,collectorCycle.inletTemperature);

% collectorCycle.quality = 0;
% collectorCycle.volume = pi*(receiver.radius)^2*receiver.length*3; % 3 is an arbitrary factor here.
% collectorCycle.material = collectorCycle.fluid.material;

%Field
field.columnFlowRate = field.totalFlowRate/field.parallel;
field.nTroughs = field.parallel*field.series;

% %troughStructure
% troughStructure.length = trough.length*ceil(trough.width/troughStructure.widthInterval);
27 changes: 10 additions & 17 deletions constants.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%% Constants
dataValues;
dataValues2;

%% Sim area
simulation = struct();
Expand All @@ -18,10 +18,9 @@
trough.orientationAngle = 0;
trough.width = 1;
trough.length = 2.5;
trough = mergeStructs(trough,aluminium);
trough = mergeStructs(trough,materials.aluminium);
trough.material = 'alref1';
trough.surfaceStdDev = [12e-3 12e-3]; %rad [width length]
% trough.specularity = 0.9;
trough.specularityStdDev = 2e-3;
trough.halfQuantization = 1;
trough.trackingError = deg2rad(0);
Expand All @@ -38,23 +37,23 @@
receiver.mislocation = [0 0];
receiver.absorber = struct();
receiver.absorber.type = 'pipe';
receiver.absorber = mergeStructs(receiver.absorber,cermet);
receiver.absorber = mergeStructs(receiver.absorber,materials.cermet);
receiver.absorber.diameter = 0.050; %m
receiver.absorber.thickness = 0.0029; %m
receiver.sleeve = struct();
receiver.sleeve.type = 'pipe';
receiver.sleeve.diameter = 0.110; %m
receiver.sleeve.thickness = 0.002; %m
receiver.sleeve = mergeStructs(receiver.sleeve,glass);
receiver.gas = air;
receiver.sleeve = mergeStructs(receiver.sleeve,materials.glass);
receiver.gas = materials.air;
receiver.annulusCheck = true;
receiver.annulus = struct();
receiver.annulus.diameter = 0.020; %m
receiver.bracketSpacing = 4;

%% Collector cycle
collectorCycle = struct();
collectorCycle.fluid = water;
collectorCycle.fluid = materials.water;
collectorCycle.flowRate = 1/60/1000; % 0.5; %m^3/s 1g/m-->0.00378541*60m^3/s
collectorCycle.inletTemperature = celcius2kelvin(25);
collectorCycle.outletTemperature = 'default';
Expand Down Expand Up @@ -82,27 +81,21 @@
sun.halfAngle = deg2rad(min2deg(16));

%% Location
location = lahore;
location = locations.lahore;
location.date = [21 6];
location.time = [12 10];

%% Atmosphere
atmosphere = struct();
atmosphere = mergeStructs(atmosphere,air);
atmosphere = mergeStructs(atmosphere,materials.air);
atmosphere.gravity = 9.81;
atmosphere.temperature = celcius2kelvin(25);
atmosphere.windSpeed = 1;
atmosphere.pressure = 'default';

%% alternate fuel
alternateFuel = suigas;
alternateFuel = fuels.suigas;
alternateFuel.heaterEffeciency =1; %percentage

% %% trough structure
% troughStructure = struct();
% troughStructure.type = 'pipe';
% troughStructure.material = 'ssrod';
% troughStructure.diameter = 0.01;
% troughStructure.thickness = 0.01;
% troughStructure.widthInterval = 0.2;


4 changes: 3 additions & 1 deletion costs.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,6 @@
costTable.structure.fluid = 'volume';
costTable.sheet = sheet;
costTable.pipe = pipe;
costTable.fluid = fluid;
costTable.fluid = fluid;

clear pipe sheet fluid materialname1 materialname2 materialname3;
Loading

0 comments on commit cfb7569

Please sign in to comment.