From: Lukáš Jiřiště Date: Wed, 11 Dec 2024 09:54:00 +0000 (+0100) Subject: Rename volume variable for more clarity X-Git-Url: https://git.ljiriste.work/?a=commitdiff_plain;h=79d62d7d22302db8b96bae4b69a6391724c8bcd3;p=analyse_servo.git Rename volume variable for more clarity --- 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();