From 79d62d7d22302db8b96bae4b69a6391724c8bcd3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Luk=C3=A1=C5=A1=20Ji=C5=99i=C5=A1t=C4=9B?= Date: Wed, 11 Dec 2024 10:54:00 +0100 Subject: [PATCH] Rename volume variable for more clarity --- process_experiment.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/process_experiment.m b/process_experiment.m index 039dc24..2b52bbf 100644 --- a/process_experiment.m +++ b/process_experiment.m @@ -1,8 +1,8 @@ -function [p_eq n] = process_experiment(t, p, V1, V2, Vvz, T = 298, graph = 1, threshold = 0.1) +function [p_eq n] = process_experiment(t, p, V_fill, V_cell, Vvz, T = 298, graph = 1, threshold = 0.1) R = 8.314; [p_eq, p_fill] = get_important_pressure(t, p, graph, threshold); - p_start = (p_eq(1:(end - 1)) * (V2 - Vvz) + p_fill * V1) / (V1 + V2 - Vvz); - delta_n = (p_start - p_eq(2:end)) .* (V1 + V2 - Vvz) / R / T; + p_start = (p_eq(1:(end - 1)) * (V_cell - Vvz) + p_fill * V_fill) / (V_fill + V_cell - Vvz); + delta_n = (p_start - p_eq(2:end)) .* (V_fill + V_cell - Vvz) / R / T; n = [0 cumsum(delta_n)]; if (graph) figure(); -- 2.30.2