From 8d88fa503e9b3dad5c4ce3cb7805d08de9c1094e Mon Sep 17 00:00:00 2001 From: Antoine <antoine.hoffmann@epfl.ch> Date: Thu, 3 Aug 2023 13:09:39 +0200 Subject: [PATCH] to read transport from out_XX.txt files --- matlab/read_flux_out_XX.m | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/matlab/read_flux_out_XX.m b/matlab/read_flux_out_XX.m index 1d5b08b4..2c7737ea 100644 --- a/matlab/read_flux_out_XX.m +++ b/matlab/read_flux_out_XX.m @@ -1,4 +1,4 @@ -function [t_all, Pxi_all, Qxi_all] = read_flux_out_XX(folderPath,PLOT) +function [t_all, Pxi_all, Qxi_all, Pxe_all, Qxe_all] = read_flux_out_XX(folderPath,PLOT) % Check if the prompt_string is provided as an argument if nargin < 1 % If not provided, prompt the user for input @@ -74,16 +74,20 @@ function [t_all, Pxi_all, Qxi_all] = read_flux_out_XX(folderPath,PLOT) if PLOT figure subplot(211) - plot(t_all,Pxi_all,'r','DisplayName','$\Gamma_{xi}$'); hold on; + plot(t_all,Pxi_all,'r','DisplayName','ions'); hold on; if(numel(t_all)==numel(Pxe_all)) - plot(t_all,Pxe_all,'b','DisplayName','$\Gamma_{xe}$'); hold on; + plot(t_all,Pxe_all,'-.b','DisplayName','electrons'); hold on; end - title('Particle flux') + xlabel('$tc_s/R$'); ylabel('$\Gamma_{x}$'); + legend('show') + title('Radial particle flux') subplot(212) - plot(t_all,Qxi_all,'r','DisplayName','$Q_{xi}$'); hold on; + plot(t_all,Qxi_all,'r','DisplayName','ions'); hold on; if(numel(t_all)==numel(Qxe_all)) - plot(t_all,Qxe_all,'b','DisplayName','$Q_{xe}$'); hold on; + plot(t_all,Qxe_all,'-.b','DisplayName','electrons'); hold on; end - title('Heat flux') + xlabel('$tc_s/R$'); ylabel('$Q_{x}$'); + legend('show'); + title('Radial heat flux') end end -- GitLab