diff --git a/RoccarasoFlight/postprocessing/RPS/dataAnalyzer.m b/RoccarasoFlight/postprocessing/RPS/dataAnalyzer.m index 081f1fdd1e5451b9665d1ced8464a8e4c3c9ef40..49f6d72be7e681a71d6b9028e05ea7951db7cf84 100644 --- a/RoccarasoFlight/postprocessing/RPS/dataAnalyzer.m +++ b/RoccarasoFlight/postprocessing/RPS/dataAnalyzer.m @@ -39,6 +39,11 @@ engineSim = combustionSimulation(engine, settings); % Computing actual performances engineFly = performanceReconstruction(engine, engineSim); +% Loading MSA simulated motor for the flight +load("HREmotors.mat"); +engineMSA = HREmotors(59); +clear HREmotors; + %% PLOTTING fprintf('DATA ANALYSIS CONCLUDED: \n\n') fprintf('\t - Total Impulse simulated: %.2f\n', engineSim.performances.Itot) @@ -78,8 +83,9 @@ if settings.plots plot(engineSim.time, engineSim.performances.T) hold on; grid minor plot(engineFly.time, engineFly.T) + plot(engineMSA.t, engineMSA.T) ylabel('Thrust [N]'); xlabel('Time [s]'); title('Thrust compare') - legend('Simulated', 'Computed') + legend('Simulated', 'Computed', 'MSA-SFT06') axis padded end diff --git a/RoccarasoFlight/postprocessing/RPS/msaData/HREmotors.mat b/RoccarasoFlight/postprocessing/RPS/msaData/HREmotors.mat new file mode 100644 index 0000000000000000000000000000000000000000..b7b3c10914d77aee38c5c66ed75e6f72bdf9926f Binary files /dev/null and b/RoccarasoFlight/postprocessing/RPS/msaData/HREmotors.mat differ diff --git a/RoccarasoFlight/postprocessing/RPS/msaEngineData.mat b/RoccarasoFlight/postprocessing/RPS/msaEngineData.mat index 1603214baff3dd313ed2ff0b4e98cc1f8bbf7a99..0cdec558af9edf9ae92a240128b897ec6ee850c5 100644 Binary files a/RoccarasoFlight/postprocessing/RPS/msaEngineData.mat and b/RoccarasoFlight/postprocessing/RPS/msaEngineData.mat differ diff --git a/RoccarasoFlight/postprocessing/RPS/src/combustionSimulation.m b/RoccarasoFlight/postprocessing/RPS/src/combustionSimulation.m index bdacbf726dbde03c0ea8d8ea92a7cf194c9893e7..1bfaeaf8c5f67537f3d6fdc6068dfdb133e9878b 100644 --- a/RoccarasoFlight/postprocessing/RPS/src/combustionSimulation.m +++ b/RoccarasoFlight/postprocessing/RPS/src/combustionSimulation.m @@ -59,6 +59,8 @@ g0 = settings.g0; %% COMBUSTION SIMULATION % Defining the time engineSim.time = engine.acquisition.cutData.timePTop - engine.acquisition.cutData.timePTop(1); + +% Saving the oxidizer mass flow in the out-struct engineSim.mfr.mox = engine.performances.mox; % Performing Marxman simulation @@ -83,6 +85,7 @@ OF = engineSim.mfr.mox./engineSim.mfr.mf; OF(1) = OF(2); engineSim.performances.OF = OF; +% Fixing convergence problems in the first transitory phase (performances are not relevant in this phase) ii = find(OF < 2); OF(ii) = 2; @@ -114,7 +117,7 @@ end Pe = real(Pe'); % Thrust coefficient -cT = sqrt(2*y.^2./(y - 1).*(2./(y + 1)).^((y + 1)./(y - 1))).*sqrt(1 - (Pe./Pc).^((y - 1)./y)) * lambda + (Pe - Pamb)./Pc.*epsilon; +cT = sqrt(2*y.^2./(y - 1).*(2./(y + 1)).^((y + 1)./(y - 1))).*sqrt(1 - (Pe./Pc).^((y - 1)./y)) * lambda; % Thrust T = cT.*Pc*1e5*At*etacT;