Rename volume variable for more clarity
authorLukáš Jiřiště <jiriste@icpf.cas.cz>
Wed, 11 Dec 2024 09:54:00 +0000 (10:54 +0100)
committerLukáš Jiřiště <jiriste@icpf.cas.cz>
Wed, 11 Dec 2024 09:54:00 +0000 (10:54 +0100)
process_experiment.m

index 039dc246d98a43b5916c8f8af96b2d2135478527..2b52bbf494b9bd814ed55f4dfa9334ac48d8c2c0 100644 (file)
@@ -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();