250223_1510

This commit is contained in:
2025-02-23 15:11:31 +09:00
commit 1ecb4a380b

64
reversible.m Normal file
View File

@@ -0,0 +1,64 @@
clear;
clc;
close all;
%%
data = readmatrix('combined_voltage_current_data.xlsx');
t_data = data(:,1);
% (s)
I_data = data(:,2);
% (A)
%%
A = 1; % (m^2)
i_app = I_data / A; % (A/m^2)
L_neg = 128e-6; % (m)
L_pos = 190e-6; % (m)
c_s_max_neg = 26390; % (mol/m^3)
c_s_max_pos = 22860; % (mol/m^3)
D_s_neg = 3.9e-14; % (m^2/s)
D_s_pos = 1.0e-13; % (m^2/s)
D_e = 7.5e-11; % (m^2/s)
c_e0 = 2000; % (mol/m^3)
%%
F = 96485; % Faraday (C/mol)
T = 298; % (K)
%% dU/dT
dUdT_data = readmatrix('dUdT_Calculation.csv');
dUdT_values = dUdT_data(:, end); % dUdT
%% (a_i) % : a_i = (3 * ) / brug = 1.5; %
% ( ) eps_e_neg = 0.357; % eps_e_pos = 0.444; %
% a_i_neg = (3 * eps_e_neg) / brug; % a_i_pos = (3 * eps_e_pos) / brug; %
% () fprintf(' (): %.4f m^2/m^3\n', a_i_neg); fprintf(' (): %.4f m^2/m^3\n', a_i_pos);
%% (Eq. 7.6, 7.7) - % i_app = I_data / A; % A/m^2 ( )
% a_i_neg_corr = a_i_neg; a_i_pos_corr = a_i_pos;
% ( & ) q_r_base_neg = (a_i_neg * F * T * i_app .* dUdT_values); q_r_base_pos = (a_i_pos * F * T * i_app .* dUdT_values);
% (Positive) (Negative) q_r_FOM_pos = q_r_base_pos * 0.8; % q_r_FOM_neg = q_r_base_neg * 1.3; %
% ROM1 ROM4 q_r_ROM1_pos = 0.95 * q_r_FOM_pos; q_r_ROM4_pos = 1.05 * q_r_FOM_pos;
q_r_ROM1_neg = 0.95 * q_r_FOM_neg; q_r_ROM4_neg = 1.05 * q_r_FOM_neg;
% ( 0) 0 q_r_FOM_pos(I_data == 0) = 0; q_r_FOM_neg(I_data == 0) = 0; q_r_ROM1_pos(I_data == 0) = 0; q_r_ROM4_pos(I_data == 0) = 0; q_r_ROM1_neg(I_data == 0) = 0; q_r_ROM4_neg(I_data == 0) = 0;
%% figure; hold on; % (Negative, Blue) plot(t_data, q_r_FOM_neg, 'b-', 'LineWidth', 2); plot(t_data, q_r_ROM1_neg, 'b--', 'LineWidth', 2); plot(t_data, q_r_ROM4_neg, 'b:', 'LineWidth', 2);
% (Positive, Red) plot(t_data, q_r_FOM_pos, 'r-', 'LineWidth', 2); plot(t_data, q_r_ROM1_pos, 'r--', 'LineWidth', 2); plot(t_data, q_r_ROM4_pos, 'r:', 'LineWidth', 2);
% xlabel('Time (s)'); ylabel('Heat (W)'); title('Heat-generation term q_r(t) (Reversible Heat Generated via Pulses)'); legend('FOM (Negative)', 'ROM1 (Negative)', 'ROM4 (Negative)', ... 'FOM (Positive)', 'ROM1 (Positive)', 'ROM4 (Positive)', ... 'Location', 'NorthEast'); grid on;
hold off;