Skip to content
Snippets Groups Projects
Commit b3c82fa5 authored by Oliver's avatar Oliver
Browse files

new

parent 3be59c79
No related branches found
No related tags found
No related merge requests found
......@@ -113,8 +113,8 @@ pe=0.5; % electricity price [$/kWh]
mixer_ERD=1; % PRO Draw outlet mixer adjustment (only if 2nd ERDs) (mixer_ERD=1 --> all flow to ERD2 no turbine needed)
%% display figures
fig=[1,0,0,0,0,0,0,0,1,0,0]; % f(i)=1 --> figure i will be displayed
%fig=[0,0,0,0,0,0,0,0,0,0,0]; % f(i)=1 --> figure i will be displayed
%fig=[1,0,0,0,0,0,0,0,1,0,0]; % f(i)=1 --> figure i will be displayed
fig=[0,0,0,0,0,0,0,0,0,0,0]; % f(i)=1 --> figure i will be displayed
%% model specific changes:
% co-current
......
%% Matlab file for the Paper 2024:
%% Matlab skript for the Paper 2024:
%
% - reproduce the simulations
% - reproduce optimisation results
% - reproduce all figures.png (converted to .eps using LibreOfficeDraw)
% - test average computation time
%
%% Numerical Simulations
% figures for SWRO, PRO and the ERD
% original .m file from: C:>User>bav1839>Documents>MATLAB>Counter-current-solver
%
% Create figures form chapter: Numerical simulations
%
close all;
[Output1, Output2, time]=fun_1(1,0,'sol',1e6,1e-6),
[Output1, Output2, time]=fun_1(1,0,'sol',1e4,1e-4),
%
%figure(1); set(gcf,'color','w'); f = gcf; exportgraphics(f,'Figure_6.png');
%figure(2); set(gcf,'color','w'); f = gcf; exportgraphics(f,'Figure_7.png');
%figure(3); set(gcf,'color','w'); f = gcf; exportgraphics(f,'Figure_8_ERD.png');
%
%% Average simulation time:
% manually disable figures first
%
% IMPORTANT: manually comment out line: 116<->117 in "SIM_0_data"
%
T=zeros(1,100);
for i=1:length(T)
[Sim_3b_output1, Sim_3b_output2, time]=fun_1(1,.32,'sol',1e6,1e-6);
[Output1, Output2, time]=fun_1(1,0,'sol',1e4,1e-4);
T(i)=time;
end
mean(T)
%5.9319
mean(T) %= 0.9600
%
%% Optimisation-1(blue)
c1=datetime("now");
......
function [output1, output2, output3] = fun(input,option_data,obj,option_mesh,option_BVP)
function [output1, output2, output3] = fun_1(input,option_data,obj,option_mesh,option_BVP)
%% fun Solves BVP for SWRO-PRO hybrid system using bvp5c
%
% fun(input,option_data,obj,option_mesh,option_BVP) will solve the
......@@ -29,6 +29,10 @@ function [output1, output2, output3] = fun(input,option_data,obj,option_mesh,opt
tic;
%% Read data
if option_data == 0; DATA = @(x)Sim_0_data(input); end
% Simulations
if option_data == 0.11; DATA = @(x)Sim_11_data(input); end
if option_data == 0.12; DATA = @(x)Sim_12_data(input); end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment