diff --git a/src/algebra/SparseSystem.cpp b/src/algebra/SparseSystem.cpp index bd705a9e5..03d1fe08a 100644 --- a/src/algebra/SparseSystem.cpp +++ b/src/algebra/SparseSystem.cpp @@ -101,6 +101,7 @@ void SparseSystem::update_jacobian(double time_coeff_ydot, void SparseSystem::solve() { solver->factorize(jacobian); if (solver->info() != Eigen::Success) { + std::cout<<"Jacobian: "< ¶meters) { + double capacitance = parameters[global_param_ids[ParamId::CAPACITANCE]]; + + // unknowns: y = [P_in, Q_in, P_out, Q_out] + + // Q_{in} - Q_{out} - C * \dot{P}_{in} = 0 + system.E.coeffRef(global_eqn_ids[0], global_var_ids[0]) = -capacitance; + system.F.coeffRef(global_eqn_ids[0], global_var_ids[1]) = 1.0; + system.F.coeffRef(global_eqn_ids[0], global_var_ids[3]) = -1.0; + + // P_{in} - P_{out} = 0 + system.F.coeffRef(global_eqn_ids[1], global_var_ids[0]) = 1.0; + system.F.coeffRef(global_eqn_ids[1], global_var_ids[2]) = -1.0; +} \ No newline at end of file diff --git a/src/model/Capacitance.h b/src/model/Capacitance.h new file mode 100644 index 000000000..bb53a9a4c --- /dev/null +++ b/src/model/Capacitance.h @@ -0,0 +1,150 @@ +// Copyright (c) Stanford University, The Regents of the University of +// California, and others. +// +// All Rights Reserved. +// +// See Copyright-SimVascular.txt for additional details. +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject +// to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/** + * @file Capacitance.h + * @brief model::Capacitance source file + */ +#ifndef SVZERODSOLVER_MODEL_CAPACITANCE_HPP_ +#define SVZERODSOLVER_MODEL_CAPACITANCE_HPP_ + +#include + +#include "Block.h" +#include "SparseSystem.h" + +/** + * @brief Simple capacitance element for 0D blood flow modeling + * + * Models a pure capacitance element relating flow to change in pressure. + * + * \f[ + * \begin{circuitikz} \draw + * node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0); + * (1,0) node[anchor=south]{$P_{in}$} + * to [short, -*] (1,0) + * to [C, l=$C$] (5,0) + * to [short, -*] (7,0) + * node[anchor=south]{$P_{out}$} + * (7.2,0) -- (8,0) node[right] {$Q_{out}$}; + * \end{circuitikz} + * \f] + * + * ### Governing equations + * + * \f[ + * P_\text{in}-P_\text{out} = 0 \f] + * + * \f[ + * Q_\text{in} - C (\dot{P}_\text{in} - \dot{P}_\text{out}) = 0 \f] + * + * ### Local contributions + * + * \f[ + * \mathbf{y}^{e}=\left[\begin{array}{llll}P_{i n} & Q_{in} & + * P_{out} & Q_{out}\end{array}\right]^\text{T} \f] + * + * \f[ + * \mathbf{F}^{e}=\left[\begin{array}{cccc} + * 0 & 1 & 0 & 0 \\ + * 1 & 0 & -1 & 0 + * \end{array}\right] + * \f] + * + * \f[ + * \mathbf{E}^{e}=\left[\begin{array}{cccc} + * -C & 0 & C & 0 \\ + * 0 & 0 & 0 & 0 + * \end{array}\right] + * \f] + * + * ### Parameters + * + * Parameter sequence for constructing this block + * + * * `0` Capacitance value + * + * ### Internal variables + * + * This block has no internal variables. + * + */ +class Capacitance : public Block { + public: + /** + * @brief Local IDs of the parameters + * + */ + enum ParamId { + CAPACITANCE = 0, + }; + + /** + * @brief Construct a new Capacitance object + * + * @param id Global ID of the block + * @param model The model to which the block belongs + */ + Capacitance(int id, Model *model) + : Block(id, model, BlockType::capacitance, BlockClass::vessel, + {{"C", InputParameter()}}) { + is_vessel = true; + } + + /** + * @brief Set up the degrees of freedom (DOF) of the block + * + * Set \ref global_var_ids and \ref global_eqn_ids of the element based on the + * number of equations and the number of internal variables of the + * element. + * + * @param dofhandler Degree-of-freedom handler to register variables and + * equations at + */ + void setup_dofs(DOFHandler &dofhandler); + + /** + * @brief Update the constant contributions of the element in a sparse + * system + * + * @param system System to update contributions at + * @param parameters Parameters of the model + */ + void update_constant(SparseSystem &system, std::vector ¶meters); + + /** + * @brief Number of triplets of element + * + * Number of triplets that the element contributes to the global system + * (relevant for sparse memory reservation) + */ + TripletsContributions num_triplets{4, 1, 0}; +}; + +#endif // SVZERODSOLVER_MODEL_CAPACITANCE_HPP_ \ No newline at end of file diff --git a/src/model/FourElementWindkesselBC.cpp b/src/model/FourElementWindkesselBC.cpp new file mode 100644 index 000000000..7e7233d87 --- /dev/null +++ b/src/model/FourElementWindkesselBC.cpp @@ -0,0 +1,69 @@ +// Copyright (c) Stanford University, The Regents of the University of +// California, and others. +// +// All Rights Reserved. +// +// See Copyright-SimVascular.txt for additional details. +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject +// to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "FourElementWindkesselBC.h" + +void FourElementWindkesselBC::setup_dofs(DOFHandler &dofhandler) { + Block::setup_dofs_(dofhandler, 3, {"pressure_c", "pressure_L"}); +} + +void FourElementWindkesselBC::update_constant(SparseSystem &system, + std::vector ¶meters) { + // P_in - P_L = 0 (constant part) + system.F.coeffRef(global_eqn_ids[0], global_var_ids[0]) = 1.0; + system.F.coeffRef(global_eqn_ids[0], global_var_ids[3]) = -1.0; + + // P_L - P_c - R_p*Q_in = 0 (constant part) + system.F.coeffRef(global_eqn_ids[1], global_var_ids[2]) = -1.0; + system.F.coeffRef(global_eqn_ids[1], global_var_ids[3]) = 1.0; + + // R_d*Q_in - P_c + P_ref = 0 (constant part) + system.F.coeffRef(global_eqn_ids[2], global_var_ids[2]) = -1.0; +} + +void FourElementWindkesselBC::update_time(SparseSystem &system, + std::vector ¶meters) { + double inductance = parameters[global_param_ids[0]]; + double resistance_proximal = parameters[global_param_ids[1]]; + double capacitance = parameters[global_param_ids[2]]; + double resistance_distal = parameters[global_param_ids[3]]; + double pressure_distal = parameters[global_param_ids[4]]; + + // P_in - P_L - L*dQ_in/dt = 0 (time-dependent part) + system.E.coeffRef(global_eqn_ids[0], global_var_ids[1]) = -inductance; + + // P_L - P_c - R_p*Q_in = 0 (time-dependent part) + system.F.coeffRef(global_eqn_ids[1], global_var_ids[1]) = -resistance_proximal; + + // R_d*Q_in - P_c + P_ref - R_d*C*dP_c/dt = 0 (time-dependent part) + system.F.coeffRef(global_eqn_ids[2], global_var_ids[1]) = resistance_distal; + system.E.coeffRef(global_eqn_ids[2], global_var_ids[2]) = -resistance_distal * capacitance; + system.C(global_eqn_ids[2]) = pressure_distal; +} \ No newline at end of file diff --git a/src/model/FourElementWindkesselBC.h b/src/model/FourElementWindkesselBC.h new file mode 100644 index 000000000..a77b94447 --- /dev/null +++ b/src/model/FourElementWindkesselBC.h @@ -0,0 +1,177 @@ +// Copyright (c) Stanford University, The Regents of the University of +// California, and others. +// +// All Rights Reserved. +// +// See Copyright-SimVascular.txt for additional details. +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject +// to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/** + * @file FourElementWindkesselBC.h + * @brief model::FourElementWindkesselBC source file + */ +#ifndef SVZERODSOLVER_MODEL_FOUR_ELEMENT_WINDKESSELBC_HPP_ +#define SVZERODSOLVER_MODEL_FOUR_ELEMENT_WINDKESSELBC_HPP_ + +#include "Block.h" +#include "SparseSystem.h" + +/** + * @brief Four-Element Windkessel (RDCR) boundary condition. + * + * Models the mechanical behavior of a Four-Element Windkessel (RDCR) boundary condition. + * + * \f[ + * \begin{circuitikz} \draw + * node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0); + * \draw (1,0) node[anchor=south]{$P_{in}$} + * to [L, l=$L$, *-] (3,0) + * to [R, l=$R_p$, *-] (5,0) + * node[anchor=south]{$P_{c}$} + * to [R, l=$R_d$, *-*] (7,0) + * node[anchor=south]{$P_{ref}$} + * (5,0) to [C, l=$C$, *-] (5,-1.5) + * node[ground]{}; + * \end{circuitikz} + * \f] + * + * ### Governing equations + * + * \f[ + * P_{in} - P_L - L \dot{Q}_{in} = 0 + * \f] + * + * \f[ + * P_L - P_c - R_p Q_{in} = 0 + * \f] + * + * \f[ + * R_d Q_{in} - P_c + P_{ref} - R_d C \frac{dP_c}{dt} = 0 + * \f] + * + * ### Local contributions + * + * \f[ + * \mathbf{y}^{e}=\left[\begin{array}{llll}P^{e} & Q^{e} & + * P_{c}^{e} & P_{L}^{e}\end{array}\right]^{T} \f] + * + * \f[ + * \mathbf{E}^{e}=\left[\begin{array}{cccc} + * 0 & -L & 0 & 0 \\ + * 0 & 0 & 0 & 0 \\ + * 0 & 0 & -R_d C & 0 + * \end{array}\right] + * \f] + * + * \f[ + * \mathbf{F}^{e}=\left[\begin{array}{cccc} + * 1 & 0 & 0 & -1 \\ + * 0 & -R_p & -1 & 1 \\ + * 0 & R_d & -1 & 0 + * \end{array}\right] + * \f] + * + * \f[ + * \mathbf{c}^{e}=\left[\begin{array}{c} + * 0 \\ + * 0 \\ + * P_{ref} + * \end{array}\right] + * \f] + * + * ### Parameters + * + * Parameter sequence for constructing this block + * + * * `0` Inductance + * * `1` Proximal resistance + * * `2` Capacitance + * * `3` Distal resistance + * * `4` Distal pressure + * + * ### Internal variables + * + * Names of internal variables in this block's output: + * + * * `pressure_c`: Pressure at the capacitor + * * `pressure_L`: Pressure after the inductance + * + */ +class FourElementWindkesselBC : public Block { + public: + /** + * @brief Construct a new FourElementWindkesselBC object + * + * @param id Global ID of the block + * @param model The model to which the block belongs + */ + FourElementWindkesselBC(int id, Model *model) + : Block(id, model, BlockType::four_element_windkessel_bc, + BlockClass::boundary_condition, + {{"L", InputParameter()}, + {"Rp", InputParameter()}, + {"C", InputParameter()}, + {"Rd", InputParameter()}, + {"Pd", InputParameter(true)}}) {} + + /** + * @brief Set up the degrees of freedom (DOF) of the block + * + * Set \ref global_var_ids and \ref global_eqn_ids of the element based on the + * number of equations and the number of internal variables of the + * element. + * + * @param dofhandler Degree-of-freedom handler to register variables and + * equations at + */ + void setup_dofs(DOFHandler &dofhandler); + + /** + * @brief Update the constant contributions of the element in a sparse + * system + * + * @param system System to update contributions at + * @param parameters Parameters of the model + */ + void update_constant(SparseSystem &system, std::vector ¶meters); + + /** + * @brief Update the time-dependent contributions of the element in a sparse + * system + * + * @param system System to update contributions at + * @param parameters Parameters of the model + */ + void update_time(SparseSystem &system, std::vector ¶meters); + + /** + * @brief Number of triplets of element + * + * Number of triplets that the element contributes to the global system + * (relevant for sparse memory reservation) + */ + TripletsContributions num_triplets{8, 1, 0}; +}; + +#endif // SVZERODSOLVER_MODEL_FOUR_ELEMENT_WINDKESSELBC_HPP_ \ No newline at end of file diff --git a/src/model/Inductance.cpp b/src/model/Inductance.cpp new file mode 100644 index 000000000..4a2e6e620 --- /dev/null +++ b/src/model/Inductance.cpp @@ -0,0 +1,51 @@ +// Copyright (c) Stanford University, The Regents of the University of +// California, and others. +// +// All Rights Reserved. +// +// See Copyright-SimVascular.txt for additional details. +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject +// to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "Inductance.h" + +void Inductance::setup_dofs(DOFHandler &dofhandler) { + Block::setup_dofs_(dofhandler, 2, {}); +} + +void Inductance::update_constant(SparseSystem &system, + std::vector ¶meters) { + double inductance = parameters[global_param_ids[ParamId::INDUCTANCE]]; + + // unknowns: y = [P_in, Q_in, P_out, Q_out] + + // P_{in} - P_{out} - L * \dot{Q}_{in} = 0 + system.F.coeffRef(global_eqn_ids[0], global_var_ids[0]) = 1.0; + system.F.coeffRef(global_eqn_ids[0], global_var_ids[2]) = -1.0; + system.E.coeffRef(global_eqn_ids[0], global_var_ids[3]) = -inductance; + + // Q_{in} - Q_{out} = 0 + system.F.coeffRef(global_eqn_ids[1], global_var_ids[1]) = 1.0; + system.F.coeffRef(global_eqn_ids[1], global_var_ids[3]) = -1.0; +} \ No newline at end of file diff --git a/src/model/Inductance.h b/src/model/Inductance.h new file mode 100644 index 000000000..386459c32 --- /dev/null +++ b/src/model/Inductance.h @@ -0,0 +1,159 @@ +// Copyright (c) Stanford University, The Regents of the University of +// California, and others. +// +// All Rights Reserved. +// +// See Copyright-SimVascular.txt for additional details. +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject +// to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/** + * @file Inductance.h + * @brief model::Inductance source file + */ +#ifndef SVZERODSOLVER_MODEL_INDUCTANCE_HPP_ +#define SVZERODSOLVER_MODEL_INDUCTANCE_HPP_ + +#include + +#include "Block.h" +#include "SparseSystem.h" + +/** + * @brief Simple inductance element for 0D blood flow modeling + * + * Models a pure inductance element relating pressure drop to change in flow. + * + * \f[ + * \begin{circuitikz} \draw + * node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0); + * \draw (1,0) node[anchor=south]{$P_{in}$} + * to [L, l=$L$, *-*] (7,0) + * node[anchor=south]{$P_{out}$}; + * \draw [-latex] (7.2,0) -- (8,0) node[right] {$Q_{out}$}; + * \end{circuitikz} + * \f] + * + * ### Governing equations + * + * \f[ + * P_\text{in}-P_\text{out} - L \dot{Q}_\text{out} = 0 \f] + * + * \f[ + * Q_\text{in}-Q_\text{out} = 0 \f] + * + * ### Local contributions + * + * \f[ + * \mathbf{y}^{e}=\left[\begin{array}{llll}P_{i n} & Q_{in} & + * P_{out} & Q_{out}\end{array}\right]^\text{T} \f] + * + * \f[ + * \mathbf{F}^{e}=\left[\begin{array}{cccc} + * 1 & 0 & -1 & 0 \\ + * 0 & 1 & 0 & -1 + * \end{array}\right] + * \f] + * + * \f[ + * \mathbf{E}^{e}=\left[\begin{array}{cccc} + * 0 & 0 & 0 & -L \\ + * 0 & 0 & 0 & 0 + * \end{array}\right] + * \f] + * + * ### Gradient + * + * Gradient of the equations with respect to the parameters: + * + * \f[ + * \mathbf{J}^{e} = \left[\begin{array}{cccc} + * -\dot{y}_4 \\ + * 0 + * \end{array}\right] + * \f] + * + * ### Parameters + * + * Parameter sequence for constructing this block + * + * * `0` Inductance value + * + * ### Internal variables + * + * This block has no internal variables. + * + */ +class Inductance : public Block { + public: + /** + * @brief Local IDs of the parameters + * + */ + enum ParamId { + INDUCTANCE = 0, + }; + + /** + * @brief Construct a new Inductance object + * + * @param id Global ID of the block + * @param model The model to which the block belongs + */ + Inductance(int id, Model *model) + : Block(id, model, BlockType::inductance, BlockClass::vessel, + {{"L", InputParameter()}}) { + is_vessel = true; + } + + /** + * @brief Set up the degrees of freedom (DOF) of the block + * + * Set \ref global_var_ids and \ref global_eqn_ids of the element based on the + * number of equations and the number of internal variables of the + * element. + * + * @param dofhandler Degree-of-freedom handler to register variables and + * equations at + */ + void setup_dofs(DOFHandler &dofhandler); + + /** + * @brief Update the constant contributions of the element in a sparse + * system + * + * @param system System to update contributions at + * @param parameters Parameters of the model + */ + void update_constant(SparseSystem &system, std::vector ¶meters); + + /** + * @brief Number of triplets of element + * + * Number of triplets that the element contributes to the global system + * (relevant for sparse memory reservation) + */ + TripletsContributions num_triplets{4, 1, 0}; +}; + +#endif // SVZERODSOLVER_MODEL_INDUCTANCE_HPP_ \ No newline at end of file diff --git a/src/model/Model.cpp b/src/model/Model.cpp index 1c51c96ab..b09b54be0 100644 --- a/src/model/Model.cpp +++ b/src/model/Model.cpp @@ -29,6 +29,10 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "Model.h" +#include "ParallelRC.h" +#include "ParallelRL.h" +#include "SerialRC.h" +#include "FourElementWindkesselBC.h" template BlockFactoryFunc block_factory() { @@ -52,10 +56,17 @@ Model::Model() { {"NORMAL_JUNCTION", block_factory()}, {"PRESSURE", block_factory()}, {"RCR", block_factory()}, + {"RDCR", block_factory()}, {"RESISTANCE", block_factory()}, {"resistive_junction", block_factory()}, {"ValveTanh", block_factory()}, - {"ChamberElastanceInductor", block_factory()}}; + {"ChamberElastanceInductor", block_factory()}, + {"Resistance", block_factory()}, + {"Capacitance", block_factory()}, + {"Inductance", block_factory()}, + {"ParallelRC", block_factory()}, + {"ParallelRL", block_factory()}, + {"SerialRC", block_factory()}}; } Model::~Model() {} diff --git a/src/model/Model.h b/src/model/Model.h index 25daf4581..a47b9bde4 100644 --- a/src/model/Model.h +++ b/src/model/Model.h @@ -46,6 +46,7 @@ #include "BlockFactory.h" #include "BloodVessel.h" #include "BloodVesselJunction.h" +#include "Capacitance.h" #include "ChamberElastanceInductor.h" #include "ClosedLoopCoronaryLeftBC.h" #include "ClosedLoopCoronaryRightBC.h" @@ -53,11 +54,13 @@ #include "ClosedLoopRCRBC.h" #include "DOFHandler.h" #include "FlowReferenceBC.h" +#include "Inductance.h" #include "Junction.h" #include "Node.h" #include "OpenLoopCoronaryBC.h" #include "Parameter.h" #include "PressureReferenceBC.h" +#include "Resistance.h" #include "ResistanceBC.h" #include "ResistiveJunction.h" #include "State.h" diff --git a/src/model/ParallelRC.cpp b/src/model/ParallelRC.cpp new file mode 100644 index 000000000..34d80b409 --- /dev/null +++ b/src/model/ParallelRC.cpp @@ -0,0 +1,56 @@ +// Copyright (c) Stanford University, The Regents of the University of +// California, and others. +// +// All Rights Reserved. +// +// See Copyright-SimVascular.txt for additional details. +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject +// to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "ParallelRC.h" + +void ParallelRC::setup_dofs(DOFHandler &dofhandler) { + // 4 equations and 2 internal variables (Q_R and Q_C) + Block::setup_dofs_(dofhandler, 2, {}); +} + +void ParallelRC::update_constant(SparseSystem &system, + std::vector ¶meters) { + double resistance = parameters[global_param_ids[ParamId::RESISTANCE]]; + double capacitance = parameters[global_param_ids[ParamId::CAPACITANCE]]; + const double rc = resistance * capacitance; + + // unknowns: y = [P_in, Q_in, P_out, Q_out] + + // R*C*Q_in - (P_in - P_out) - R*C*(dP_in - dP_out)/dt = 0 + system.E.coeffRef(global_eqn_ids[0], global_var_ids[0]) = -rc; + system.E.coeffRef(global_eqn_ids[0], global_var_ids[2]) = rc; + system.F.coeffRef(global_eqn_ids[0], global_var_ids[1]) = resistance; + system.F.coeffRef(global_eqn_ids[0], global_var_ids[0]) = -1.0; + system.F.coeffRef(global_eqn_ids[0], global_var_ids[2]) = 1.0; + + // Q_in - Q_out = 0 + system.F.coeffRef(global_eqn_ids[1], global_var_ids[1]) = 1.0; + system.F.coeffRef(global_eqn_ids[1], global_var_ids[3]) = -1.0; +} \ No newline at end of file diff --git a/src/model/ParallelRC.h b/src/model/ParallelRC.h new file mode 100644 index 000000000..5feb0c302 --- /dev/null +++ b/src/model/ParallelRC.h @@ -0,0 +1,147 @@ +// Copyright (c) Stanford University, The Regents of the University of +// California, and others. +// +// All Rights Reserved. +// +// See Copyright-SimVascular.txt for additional details. +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject +// to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/** + * @file ParallelRC.h + * @brief model::ParallelRC source file + */ +#ifndef SVZERODSOLVER_MODEL_PARALLEL_RC_HPP_ +#define SVZERODSOLVER_MODEL_PARALLEL_RC_HPP_ + +#include + +#include "Block.h" +#include "SparseSystem.h" + +/** + * @brief Parallel RC circuit element for 0D blood flow modeling + * + * Models a parallel resistor and capacitor with shared pressure at + * both the inlet and outlet. + * + * \f[ + * \begin{circuitikz} \draw + * node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0); + * (1,0) node[anchor=south]{$P_{in}$} + * to [short, -*] (2,0) + * to [R, l=$R$] (5,0) + * to [short, -*] (6,0) + * node[anchor=south]{$P_{out}$} + * (7.2,0) -- (8,0) node[right] {$Q_{out}$}; + * (2,0) to (2,-2) to [C, l=$C$] (6,-2) to (6,0); + * \end{circuitikz} + * \f] + * + * ### Governing equations + * + * \f[ + * P_\text{in}-P_\text{out} = 0 \f] + * + * \f[ + * Q_\text{in} - Q_R - Q_C - Q_\text{out} = 0 \f] + * + * \f[ + * P_\text{in} - P_\text{out} - R \cdot Q_R = 0 \f] + * + * \f[ + * Q_C - C (\dot{P}_\text{in} - \dot{P}_\text{out}) = 0 \f] + * + * ### Local contributions + * + * \f[ + * \mathbf{y}^{e}=\left[\begin{array}{llllll}P_{in} & Q_{in} & + * P_{out} & Q_{out} & Q_R & Q_C\end{array}\right]^\text{T} \f] + * + * ### Parameters + * + * Parameter sequence for constructing this block + * + * * `0` Resistance value + * * `1` Capacitance value + * + * ### Internal variables + * + * This block has two internal variables: Q_R and Q_C. + * + */ +class ParallelRC : public Block { + public: + /** + * @brief Local IDs of the parameters + * + */ + enum ParamId { + RESISTANCE = 0, + CAPACITANCE = 1, + }; + + /** + * @brief Construct a new ParallelRC object + * + * @param id Global ID of the block + * @param model The model to which the block belongs + */ + ParallelRC(int id, Model *model) + : Block(id, model, BlockType::parallel_rc, BlockClass::vessel, + {{"R", InputParameter()}, + {"C", InputParameter()}}) { + is_vessel = true; + } + + /** + * @brief Set up the degrees of freedom (DOF) of the block + * + * Set \ref global_var_ids and \ref global_eqn_ids of the element based on the + * number of equations and the number of internal variables of the + * element. + * + * @param dofhandler Degree-of-freedom handler to register variables and + * equations at + */ + void setup_dofs(DOFHandler &dofhandler); + + /** + * @brief Update the constant contributions of the element in a sparse + * system + * + * @param system System to update contributions at + * @param parameters Parameters of the model + */ + void update_constant(SparseSystem &system, std::vector ¶meters); + + /** + * @brief Number of triplets of element + * + * Number of triplets that the element contributes to the global system + * (relevant for sparse memory reservation) + */ + TripletsContributions num_triplets{10, 1, 0}; +}; + +#endif // SVZERODSOLVER_MODEL_PARALLEL_RC_HPP_ \ No newline at end of file diff --git a/src/model/ParallelRL.cpp b/src/model/ParallelRL.cpp new file mode 100644 index 000000000..1d7a8d670 --- /dev/null +++ b/src/model/ParallelRL.cpp @@ -0,0 +1,54 @@ +// Copyright (c) Stanford University, The Regents of the University of +// California, and others. +// +// All Rights Reserved. +// +// See Copyright-SimVascular.txt for additional details. +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject +// to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "ParallelRL.h" + +void ParallelRL::setup_dofs(DOFHandler &dofhandler) { + // 4 equations and 2 internal variables (Q_R and Q_L) + Block::setup_dofs_(dofhandler, 2, {}); +} + +void ParallelRL::update_constant(SparseSystem &system, + std::vector ¶meters) { + double resistance = parameters[global_param_ids[ParamId::RESISTANCE]]; + double inductance = parameters[global_param_ids[ParamId::INDUCTANCE]]; + + // unknowns: y = [P_in, Q_in, P_out, Q_out] + + // R*Q_in - (P_in - P_out) - L dQ_in/dt = 0 + system.F.coeffRef(global_eqn_ids[0], global_var_ids[1]) = resistance; + system.F.coeffRef(global_eqn_ids[0], global_var_ids[0]) = -1.0; + system.F.coeffRef(global_eqn_ids[0], global_var_ids[2]) = 1.0; + system.E.coeffRef(global_eqn_ids[0], global_var_ids[1]) = -inductance; + + // Q_in - Q_out = 0 + system.F.coeffRef(global_eqn_ids[1], global_var_ids[1]) = 1.0; + system.F.coeffRef(global_eqn_ids[1], global_var_ids[3]) = -1.0; +} \ No newline at end of file diff --git a/src/model/ParallelRL.h b/src/model/ParallelRL.h new file mode 100644 index 000000000..e2cd1f59c --- /dev/null +++ b/src/model/ParallelRL.h @@ -0,0 +1,147 @@ +// Copyright (c) Stanford University, The Regents of the University of +// California, and others. +// +// All Rights Reserved. +// +// See Copyright-SimVascular.txt for additional details. +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject +// to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/** + * @file ParallelRL.h + * @brief model::ParallelRL source file + */ +#ifndef SVZERODSOLVER_MODEL_PARALLEL_RL_HPP_ +#define SVZERODSOLVER_MODEL_PARALLEL_RL_HPP_ + +#include + +#include "Block.h" +#include "SparseSystem.h" + +/** + * @brief Parallel RL circuit element for 0D blood flow modeling + * + * Models a parallel resistor and inductor with shared pressure at + * both the inlet and outlet. + * + * \f[ + * \begin{circuitikz} \draw + * node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0); + * (1,0) node[anchor=south]{$P_{in}$} + * to [short, -*] (2,0) + * to [R, l=$R$] (5,0) + * to [short, -*] (6,0) + * node[anchor=south]{$P_{out}$} + * (7.2,0) -- (8,0) node[right] {$Q_{out}$}; + * (2,0) to (2,-2) to [L, l=$L$] (6,-2) to (6,0); + * \end{circuitikz} + * \f] + * + * ### Governing equations + * + * \f[ + * P_\text{in}-P_\text{out} = 0 \f] + * + * \f[ + * Q_\text{in} - Q_R - Q_L - Q_\text{out} = 0 \f] + * + * \f[ + * P_\text{in} - P_\text{out} - R \cdot Q_R = 0 \f] + * + * \f[ + * P_\text{in} - P_\text{out} - L \cdot \dot{Q}_L = 0 \f] + * + * ### Local contributions + * + * \f[ + * \mathbf{y}^{e}=\left[\begin{array}{llllll}P_{in} & Q_{in} & + * P_{out} & Q_{out} & Q_R & Q_L\end{array}\right]^\text{T} \f] + * + * ### Parameters + * + * Parameter sequence for constructing this block + * + * * `0` Resistance value + * * `1` Inductance value + * + * ### Internal variables + * + * This block has two internal variables: Q_R and Q_L. + * + */ +class ParallelRL : public Block { + public: + /** + * @brief Local IDs of the parameters + * + */ + enum ParamId { + RESISTANCE = 0, + INDUCTANCE = 1, + }; + + /** + * @brief Construct a new ParallelRL object + * + * @param id Global ID of the block + * @param model The model to which the block belongs + */ + ParallelRL(int id, Model *model) + : Block(id, model, BlockType::parallel_rl, BlockClass::vessel, + {{"R", InputParameter()}, + {"L", InputParameter()}}) { + is_vessel = true; + } + + /** + * @brief Set up the degrees of freedom (DOF) of the block + * + * Set \ref global_var_ids and \ref global_eqn_ids of the element based on the + * number of equations and the number of internal variables of the + * element. + * + * @param dofhandler Degree-of-freedom handler to register variables and + * equations at + */ + void setup_dofs(DOFHandler &dofhandler); + + /** + * @brief Update the constant contributions of the element in a sparse + * system + * + * @param system System to update contributions at + * @param parameters Parameters of the model + */ + void update_constant(SparseSystem &system, std::vector ¶meters); + + /** + * @brief Number of triplets of element + * + * Number of triplets that the element contributes to the global system + * (relevant for sparse memory reservation) + */ + TripletsContributions num_triplets{10, 1, 0}; +}; + +#endif // SVZERODSOLVER_MODEL_PARALLEL_RL_HPP_ \ No newline at end of file diff --git a/src/model/Resistance.cpp b/src/model/Resistance.cpp new file mode 100644 index 000000000..726e54335 --- /dev/null +++ b/src/model/Resistance.cpp @@ -0,0 +1,51 @@ +// Copyright (c) Stanford University, The Regents of the University of +// California, and others. +// +// All Rights Reserved. +// +// See Copyright-SimVascular.txt for additional details. +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject +// to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "Resistance.h" + +void Resistance::setup_dofs(DOFHandler &dofhandler) { + Block::setup_dofs_(dofhandler, 2, {}); +} + +void Resistance::update_constant(SparseSystem &system, + std::vector ¶meters) { + double resistance = parameters[global_param_ids[ParamId::RESISTANCE]]; + + // unknowns: y = [P_in, Q_in, P_out, Q_out] + + // P_{in} - P_{out} - R * Q_{in} = 0 + system.F.coeffRef(global_eqn_ids[0], global_var_ids[0]) = 1.0; + system.F.coeffRef(global_eqn_ids[0], global_var_ids[1]) = -resistance; + system.F.coeffRef(global_eqn_ids[0], global_var_ids[2]) = -1.0; + + // Q_{in} - Q_{out} = 0 + system.F.coeffRef(global_eqn_ids[1], global_var_ids[1]) = 1.0; + system.F.coeffRef(global_eqn_ids[1], global_var_ids[3]) = -1.0; +} \ No newline at end of file diff --git a/src/model/Resistance.h b/src/model/Resistance.h new file mode 100644 index 000000000..d270ec015 --- /dev/null +++ b/src/model/Resistance.h @@ -0,0 +1,159 @@ +// Copyright (c) Stanford University, The Regents of the University of +// California, and others. +// +// All Rights Reserved. +// +// See Copyright-SimVascular.txt for additional details. +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject +// to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/** + * @file Resistance.h + * @brief model::Resistance source file + */ +#ifndef SVZERODSOLVER_MODEL_RESISTANCE_HPP_ +#define SVZERODSOLVER_MODEL_RESISTANCE_HPP_ + +#include + +#include "Block.h" +#include "SparseSystem.h" + +/** + * @brief Simple resistance element for 0D blood flow modeling + * + * Models a pure resistance element with pressure drop proportional to flow. + * + * \f[ + * \begin{circuitikz} \draw + * node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0); + * \draw (1,0) node[anchor=south]{$P_{in}$} + * to [R, l=$R$, *-*] (7,0) + * node[anchor=south]{$P_{out}$}; + * \draw [-latex] (7.2,0) -- (8,0) node[right] {$Q_{out}$}; + * \end{circuitikz} + * \f] + * + * ### Governing equations + * + * \f[ + * P_\text{in}-P_\text{out} - R \cdot Q_\text{in} = 0 \f] + * + * \f[ + * Q_\text{in}-Q_\text{out} = 0 \f] + * + * ### Local contributions + * + * \f[ + * \mathbf{y}^{e}=\left[\begin{array}{llll}P_{i n} & Q_{in} & + * P_{out} & Q_{out}\end{array}\right]^\text{T} \f] + * + * \f[ + * \mathbf{F}^{e}=\left[\begin{array}{cccc} + * 1 & -R & -1 & 0 \\ + * 0 & 1 & 0 & -1 + * \end{array}\right] + * \f] + * + * \f[ + * \mathbf{E}^{e}=\left[\begin{array}{cccc} + * 0 & 0 & 0 & 0 \\ + * 0 & 0 & 0 & 0 + * \end{array}\right] + * \f] + * + * ### Gradient + * + * Gradient of the equations with respect to the parameters: + * + * \f[ + * \mathbf{J}^{e} = \left[\begin{array}{cccc} + * -y_2 \\ + * 0 + * \end{array}\right] + * \f] + * + * ### Parameters + * + * Parameter sequence for constructing this block + * + * * `0` Resistance value + * + * ### Internal variables + * + * This block has no internal variables. + * + */ +class Resistance : public Block { + public: + /** + * @brief Local IDs of the parameters + * + */ + enum ParamId { + RESISTANCE = 0, + }; + + /** + * @brief Construct a new Resistance object + * + * @param id Global ID of the block + * @param model The model to which the block belongs + */ + Resistance(int id, Model *model) + : Block(id, model, BlockType::resistance, BlockClass::vessel, + {{"R", InputParameter()}}) { + is_vessel = true; + } + + /** + * @brief Set up the degrees of freedom (DOF) of the block + * + * Set \ref global_var_ids and \ref global_eqn_ids of the element based on the + * number of equations and the number of internal variables of the + * element. + * + * @param dofhandler Degree-of-freedom handler to register variables and + * equations at + */ + void setup_dofs(DOFHandler &dofhandler); + + /** + * @brief Update the constant contributions of the element in a sparse + * system + * + * @param system System to update contributions at + * @param parameters Parameters of the model + */ + void update_constant(SparseSystem &system, std::vector ¶meters); + + /** + * @brief Number of triplets of element + * + * Number of triplets that the element contributes to the global system + * (relevant for sparse memory reservation) + */ + TripletsContributions num_triplets{4, 0, 0}; +}; + +#endif // SVZERODSOLVER_MODEL_RESISTANCE_HPP_ \ No newline at end of file diff --git a/src/model/SerialRC.cpp b/src/model/SerialRC.cpp new file mode 100644 index 000000000..db406c8d3 --- /dev/null +++ b/src/model/SerialRC.cpp @@ -0,0 +1,53 @@ +// Copyright (c) Stanford University, The Regents of the University of +// California, and others. +// +// All Rights Reserved. +// +// See Copyright-SimVascular.txt for additional details. +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject +// to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "SerialRC.h" + +void SerialRC::setup_dofs(DOFHandler &dofhandler) { + Block::setup_dofs_(dofhandler, 2, {}); +} + +void SerialRC::update_constant(SparseSystem &system, + std::vector ¶meters) { + double resistance = parameters[global_param_ids[ParamId::RESISTANCE]]; + double capacitance = parameters[global_param_ids[ParamId::CAPACITANCE]]; + + // unknowns: y = [P_in, Q_in, P_out, Q_out] + + // Resistor: Q_in - C*dP_in/dt + R*C*dQ_in/dt + C*dP_out/dt = 0 + system.F.coeffRef(global_eqn_ids[0], global_var_ids[1]) = 1.0; + system.E.coeffRef(global_eqn_ids[0], global_var_ids[0]) = -capacitance; + system.E.coeffRef(global_eqn_ids[0], global_var_ids[1]) = resistance*capacitance; + system.E.coeffRef(global_eqn_ids[0], global_var_ids[2]) = capacitance; + + // Q_in - Q_out = 0 + system.F.coeffRef(global_eqn_ids[1], global_var_ids[1]) = 1.0; + system.F.coeffRef(global_eqn_ids[1], global_var_ids[3]) = -1.0; +} \ No newline at end of file diff --git a/src/model/SerialRC.h b/src/model/SerialRC.h new file mode 100644 index 000000000..f77f060ff --- /dev/null +++ b/src/model/SerialRC.h @@ -0,0 +1,147 @@ +// Copyright (c) Stanford University, The Regents of the University of +// California, and others. +// +// All Rights Reserved. +// +// See Copyright-SimVascular.txt for additional details. +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject +// to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/** + * @file SerialRC.h + * @brief model::SerialRC source file + */ +#ifndef SVZERODSOLVER_MODEL_SERIAL_RC_HPP_ +#define SVZERODSOLVER_MODEL_SERIAL_RC_HPP_ + +#include + +#include "Block.h" +#include "SparseSystem.h" + +/** + * @brief Serial RC circuit element for 0D blood flow modeling + * + * Models a series resistor and capacitor with shared flow through + * both components. + * + * \f[ + * \begin{circuitikz} \draw + * node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0); + * (1,0) node[anchor=south]{$P_{in}$} + * to [R, l=$R$] (4,0) + * to [C, l=$C$] (7,0) + * node[anchor=south]{$P_{out}$} + * (7.2,0) -- (8,0) node[right] {$Q_{out}$}; + * \end{circuitikz} + * \f] + * + * ### Governing equations + * + * \f[ + * Q_\text{in} - Q_\text{out} = 0 \f] + * + * \f[ + * P_\text{in} - P_\text{mid} - R \cdot Q_\text{in} = 0 \f] + * + * \f[ + * P_\text{mid} - P_\text{out} - \frac{1}{C} \int Q_\text{in} dt = 0 \f] + * + * or equivalently: + * + * \f[ + * Q_\text{in} - C \dot{P}_\text{mid} + C \dot{P}_\text{out} = 0 \f] + * + * ### Local contributions + * + * \f[ + * \mathbf{y}^{e}=\left[\begin{array}{lllll}P_{in} & Q_{in} & + * P_{out} & Q_{out} & P_{mid}\end{array}\right]^\text{T} \f] + * + * ### Parameters + * + * Parameter sequence for constructing this block + * + * * `0` Resistance value + * * `1` Capacitance value + * + * ### Internal variables + * + * This block has one internal variable: P_mid (pressure between R and C). + * + */ +class SerialRC : public Block { + public: + /** + * @brief Local IDs of the parameters + * + */ + enum ParamId { + RESISTANCE = 0, + CAPACITANCE = 1, + }; + + /** + * @brief Construct a new SerialRC object + * + * @param id Global ID of the block + * @param model The model to which the block belongs + */ + SerialRC(int id, Model *model) + : Block(id, model, BlockType::serial_rc, BlockClass::vessel, + {{"R", InputParameter()}, + {"C", InputParameter()}}) { + is_vessel = true; + } + + /** + * @brief Set up the degrees of freedom (DOF) of the block + * + * Set \ref global_var_ids and \ref global_eqn_ids of the element based on the + * number of equations and the number of internal variables of the + * element. + * + * @param dofhandler Degree-of-freedom handler to register variables and + * equations at + */ + void setup_dofs(DOFHandler &dofhandler); + + /** + * @brief Update the constant contributions of the element in a sparse + * system + * + * @param system System to update contributions at + * @param parameters Parameters of the model + */ + void update_constant(SparseSystem &system, std::vector ¶meters); + + /** + * @brief Number of triplets of element + * + * Number of triplets that the element contributes to the global system + * (relevant for sparse memory reservation) + */ + TripletsContributions num_triplets{10, 1, 0}; +}; + +#endif // SVZERODSOLVER_MODEL_SERIAL_RC_HPP_ \ No newline at end of file diff --git a/src/solve/csv_writer.cpp b/src/solve/csv_writer.cpp index 4ad534977..8abcf5d81 100644 --- a/src/solve/csv_writer.cpp +++ b/src/solve/csv_writer.cpp @@ -70,7 +70,7 @@ std::string to_vessel_csv(const std::vector ×, auto block = model.get_block(i); // Extract global solution indices of the block - if (dynamic_cast(block) == nullptr) { + if (!block->is_vessel) { continue; } diff --git a/tests/cases/dirgraph-results/pulsatileFlow_capacitance_directed_graph.dot b/tests/cases/dirgraph-results/pulsatileFlow_capacitance_directed_graph.dot new file mode 100644 index 000000000..d07bef165 --- /dev/null +++ b/tests/cases/dirgraph-results/pulsatileFlow_capacitance_directed_graph.dot @@ -0,0 +1,7 @@ +strict digraph { +BC0_inlet; +V0; +BC0_outlet; +BC0_inlet -> V0; +V0 -> BC0_outlet; +} \ No newline at end of file diff --git a/tests/cases/dirgraph-results/pulsatileFlow_inductance_directed_graph.dot b/tests/cases/dirgraph-results/pulsatileFlow_inductance_directed_graph.dot new file mode 100644 index 000000000..d07bef165 --- /dev/null +++ b/tests/cases/dirgraph-results/pulsatileFlow_inductance_directed_graph.dot @@ -0,0 +1,7 @@ +strict digraph { +BC0_inlet; +V0; +BC0_outlet; +BC0_inlet -> V0; +V0 -> BC0_outlet; +} \ No newline at end of file diff --git a/tests/cases/dirgraph-results/pulsatileFlow_resistance_directed_graph.dot b/tests/cases/dirgraph-results/pulsatileFlow_resistance_directed_graph.dot new file mode 100644 index 000000000..d07bef165 --- /dev/null +++ b/tests/cases/dirgraph-results/pulsatileFlow_resistance_directed_graph.dot @@ -0,0 +1,7 @@ +strict digraph { +BC0_inlet; +V0; +BC0_outlet; +BC0_inlet -> V0; +V0 -> BC0_outlet; +} \ No newline at end of file diff --git a/tests/cases/pulsatileFlow_capacitance.json b/tests/cases/pulsatileFlow_capacitance.json new file mode 100644 index 000000000..c025273a3 --- /dev/null +++ b/tests/cases/pulsatileFlow_capacitance.json @@ -0,0 +1,63 @@ +{ + "description": { + "description of test case" : "pulsatile flow -> Capacitance -> Steady Pressure", + "analytical results" : [ "Boundary conditions:", + "inlet:", + "steady inflow: Q_in = 10.0", + "outlet:", + "zero outflow: Q_out = 0.0", + "Solution:", + "P_in = P_out = Q_in/C * t" + ] + }, + "boundary_conditions": [ + { + "bc_name": "INFLOW", + "bc_type": "FLOW", + "bc_values": { + "Q": [ + 10.0, + 10.0 + ], + "t": [ + 0.0, + 1.0 + ] + } + }, + { + "bc_name": "OUT", + "bc_type": "FLOW", + "bc_values": { + "Q": [ + 0.0, + 0.0 + ], + "t": [ + 0.0, + 1.0 + ] + } + } + ], + "simulation_parameters": { + "number_of_cardiac_cycles": 2, + "number_of_time_pts_per_cardiac_cycle": 11, + "steady_initial": false + }, + "vessels": [ + { + "boundary_conditions": { + "inlet": "INFLOW", + "outlet": "OUT" + }, + "vessel_id": 0, + "vessel_length": 10.0, + "vessel_name": "branch0_seg0", + "zero_d_element_type": "Capacitance", + "zero_d_element_values": { + "C": 0.001 + } + } + ] +} \ No newline at end of file diff --git a/tests/cases/pulsatileFlow_inductance.json b/tests/cases/pulsatileFlow_inductance.json new file mode 100644 index 000000000..9d891f882 --- /dev/null +++ b/tests/cases/pulsatileFlow_inductance.json @@ -0,0 +1,267 @@ +{ + "description": { + "description of test case" : "pulsatile flow -> Inductance -> Steady Pressure", + "analytical results" : [ "Notes:", + "For an inductance with sinusoidal flow Q = Q0*sin(ωt)+Qm", + "and pressure boundary condition P_out = 0,", + "the inlet pressure follows: P_in = P_out + L*dQ/dt", + "Which gives: P_in = L*ω*Q0*cos(ωt)", + "Boundary conditions:", + "inlet:", + "flow rate: Q(t) = 2.5*SIN(2*PI()*t) + 2.2", + "outlet:", + "steady pressure: Pd = 0", + "With ω=2π, Q0=2.5, L=1.0:", + "P_in = 1.0*2π*2.5*cos(2πt)", + "P_in = 15.7*cos(2πt)" + ] + }, + "boundary_conditions": [ + { + "bc_name": "INFLOW", + "bc_type": "FLOW", + "bc_values": { + "Q": [ + 2.2, + 2.35697629882328, + 2.51333308391076, + 2.66845328646431, + 2.82172471791214, + 2.97254248593737, + 3.1203113817117, + 3.26444822891268, + 3.40438418525429, + 3.53956698744749, + 3.66946313073118, + 3.79355997437172, + 3.91136776482172, + 4.02242156855353, + 4.12628310693947, + 4.22254248593737, + 4.31081981375504, + 4.39076670010966, + 4.46206763116505, + 4.52444121472063, + 4.57764129073788, + 4.62145790282158, + 4.65571812682172, + 4.6802867532862, + 4.69506682107068, + 4.7, + 4.69506682107068, + 4.6802867532862, + 4.65571812682172, + 4.62145790282158, + 4.57764129073788, + 4.52444121472063, + 4.46206763116505, + 4.39076670010966, + 4.31081981375504, + 4.22254248593737, + 4.12628310693947, + 4.02242156855353, + 3.91136776482172, + 3.79355997437172, + 3.66946313073118, + 3.53956698744749, + 3.40438418525429, + 3.26444822891268, + 3.1203113817117, + 2.97254248593737, + 2.82172471791214, + 2.66845328646431, + 2.51333308391076, + 2.35697629882328, + 2.2, + 2.04302370117672, + 1.88666691608924, + 1.73154671353569, + 1.57827528208786, + 1.42745751406263, + 1.2796886182883, + 1.13555177108732, + 0.995615814745713, + 0.860433012552509, + 0.730536869268818, + 0.606440025628276, + 0.488632235178278, + 0.377578431446472, + 0.273716893060527, + 0.177457514062632, + 0.089180186244962, + 0.009233299890341, + -0.06206763116505, + -0.124441214720628, + -0.177641290737883, + -0.221457902821577, + -0.255718126821721, + -0.280286753286194, + -0.295066821070679, + -0.3, + -0.295066821070679, + -0.280286753286195, + -0.255718126821721, + -0.221457902821578, + -0.177641290737884, + -0.124441214720628, + -0.062067631165049, + 0.009233299890342, + 0.089180186244962, + 0.177457514062631, + 0.273716893060526, + 0.377578431446471, + 0.488632235178278, + 0.606440025628276, + 0.730536869268817, + 0.860433012552509, + 0.995615814745712, + 1.13555177108732, + 1.27968861828831, + 1.42745751406263, + 1.57827528208786, + 1.73154671353569, + 1.88666691608924, + 2.04302370117672, + 2.2 + ], + "t": [ + 0.0, + 0.01, + 0.02, + 0.03, + 0.04, + 0.05, + 0.06, + 0.07, + 0.08, + 0.09, + 0.1, + 0.11, + 0.12, + 0.13, + 0.14, + 0.15, + 0.16, + 0.17, + 0.18, + 0.19, + 0.2, + 0.21, + 0.22, + 0.23, + 0.24, + 0.25, + 0.26, + 0.27, + 0.28, + 0.29, + 0.3, + 0.31, + 0.32, + 0.33, + 0.34, + 0.35, + 0.36, + 0.37, + 0.38, + 0.39, + 0.4, + 0.41, + 0.42, + 0.43, + 0.44, + 0.45, + 0.46, + 0.47, + 0.48, + 0.49, + 0.5, + 0.51, + 0.52, + 0.53, + 0.54, + 0.55, + 0.56, + 0.57, + 0.58, + 0.59, + 0.6, + 0.61, + 0.62, + 0.63, + 0.64, + 0.65, + 0.66, + 0.67, + 0.68, + 0.69, + 0.7, + 0.71, + 0.72, + 0.73, + 0.74, + 0.75, + 0.76, + 0.77, + 0.78, + 0.79, + 0.8, + 0.81, + 0.82, + 0.83, + 0.84, + 0.85, + 0.86, + 0.87, + 0.88, + 0.89, + 0.9, + 0.91, + 0.92, + 0.93, + 0.94, + 0.95, + 0.96, + 0.97, + 0.98, + 0.99, + 1.0 + ] + } + }, + { + "bc_name": "OUT", + "bc_type": "PRESSURE", + "bc_values": { + "P": [ + 0.0, + 0.0 + ], + "t": [ + 0.0, + 1.0 + ] + } + } + ], + "simulation_parameters": { + "number_of_cardiac_cycles": 2, + "number_of_time_pts_per_cardiac_cycle": 201, + "output_all_cycles": true + }, + "vessels": [ + { + "boundary_conditions": { + "inlet": "INFLOW", + "outlet": "OUT" + }, + "vessel_id": 0, + "vessel_length": 10.0, + "vessel_name": "branch0_seg0", + "zero_d_element_type": "Inductance", + "zero_d_element_values": { + "L": 1.0 + } + } + ] +} \ No newline at end of file diff --git a/tests/cases/pulsatileFlow_resistance.json b/tests/cases/pulsatileFlow_resistance.json new file mode 100644 index 000000000..9dd3651b1 --- /dev/null +++ b/tests/cases/pulsatileFlow_resistance.json @@ -0,0 +1,266 @@ +{ + "description": { + "description of test case" : "pulsatile flow -> Resistance -> Steady Pressure", + "analytical results" : [ "Notes:", + "Let t0 = start of cardiac cycle", + "Notice that the inflow waveform has a period of 1 second", + "Boundary conditions:", + "inlet:", + "flow rate: Q(t) = 2.5*SIN(2*PI()*t) + 2.2", + "outlet:", + "steady pressure: Pd = 0", + "Solutions:", + "At any time t:", + "outlet pressure (at time = t) = Pd = 0", + "inlet pressure (at time = t) = outlet pressure + Q(t) * R = 0 + (2.5*SIN(2*PI()*t) + 2.2) * 100" + ] + }, + "boundary_conditions": [ + { + "bc_name": "INFLOW", + "bc_type": "FLOW", + "bc_values": { + "Q": [ + 2.2, + 2.35697629882328, + 2.51333308391076, + 2.66845328646431, + 2.82172471791214, + 2.97254248593737, + 3.1203113817117, + 3.26444822891268, + 3.40438418525429, + 3.53956698744749, + 3.66946313073118, + 3.79355997437172, + 3.91136776482172, + 4.02242156855353, + 4.12628310693947, + 4.22254248593737, + 4.31081981375504, + 4.39076670010966, + 4.46206763116505, + 4.52444121472063, + 4.57764129073788, + 4.62145790282158, + 4.65571812682172, + 4.6802867532862, + 4.69506682107068, + 4.7, + 4.69506682107068, + 4.6802867532862, + 4.65571812682172, + 4.62145790282158, + 4.57764129073788, + 4.52444121472063, + 4.46206763116505, + 4.39076670010966, + 4.31081981375504, + 4.22254248593737, + 4.12628310693947, + 4.02242156855353, + 3.91136776482172, + 3.79355997437172, + 3.66946313073118, + 3.53956698744749, + 3.40438418525429, + 3.26444822891268, + 3.1203113817117, + 2.97254248593737, + 2.82172471791214, + 2.66845328646431, + 2.51333308391076, + 2.35697629882328, + 2.2, + 2.04302370117672, + 1.88666691608924, + 1.73154671353569, + 1.57827528208786, + 1.42745751406263, + 1.2796886182883, + 1.13555177108732, + 0.995615814745713, + 0.860433012552509, + 0.730536869268818, + 0.606440025628276, + 0.488632235178278, + 0.377578431446472, + 0.273716893060527, + 0.177457514062632, + 0.089180186244962, + 0.009233299890341, + -0.06206763116505, + -0.124441214720628, + -0.177641290737883, + -0.221457902821577, + -0.255718126821721, + -0.280286753286194, + -0.295066821070679, + -0.3, + -0.295066821070679, + -0.280286753286195, + -0.255718126821721, + -0.221457902821578, + -0.177641290737884, + -0.124441214720628, + -0.062067631165049, + 0.009233299890342, + 0.089180186244962, + 0.177457514062631, + 0.273716893060526, + 0.377578431446471, + 0.488632235178278, + 0.606440025628276, + 0.730536869268817, + 0.860433012552509, + 0.995615814745712, + 1.13555177108732, + 1.27968861828831, + 1.42745751406263, + 1.57827528208786, + 1.73154671353569, + 1.88666691608924, + 2.04302370117672, + 2.2 + ], + "t": [ + 0.0, + 0.01, + 0.02, + 0.03, + 0.04, + 0.05, + 0.06, + 0.07, + 0.08, + 0.09, + 0.1, + 0.11, + 0.12, + 0.13, + 0.14, + 0.15, + 0.16, + 0.17, + 0.18, + 0.19, + 0.2, + 0.21, + 0.22, + 0.23, + 0.24, + 0.25, + 0.26, + 0.27, + 0.28, + 0.29, + 0.3, + 0.31, + 0.32, + 0.33, + 0.34, + 0.35, + 0.36, + 0.37, + 0.38, + 0.39, + 0.4, + 0.41, + 0.42, + 0.43, + 0.44, + 0.45, + 0.46, + 0.47, + 0.48, + 0.49, + 0.5, + 0.51, + 0.52, + 0.53, + 0.54, + 0.55, + 0.56, + 0.57, + 0.58, + 0.59, + 0.6, + 0.61, + 0.62, + 0.63, + 0.64, + 0.65, + 0.66, + 0.67, + 0.68, + 0.69, + 0.7, + 0.71, + 0.72, + 0.73, + 0.74, + 0.75, + 0.76, + 0.77, + 0.78, + 0.79, + 0.8, + 0.81, + 0.82, + 0.83, + 0.84, + 0.85, + 0.86, + 0.87, + 0.88, + 0.89, + 0.9, + 0.91, + 0.92, + 0.93, + 0.94, + 0.95, + 0.96, + 0.97, + 0.98, + 0.99, + 1.0 + ] + } + }, + { + "bc_name": "OUT", + "bc_type": "PRESSURE", + "bc_values": { + "P": [ + 0.0, + 0.0 + ], + "t": [ + 0.0, + 1.0 + ] + } + } + ], + "simulation_parameters": { + "number_of_cardiac_cycles": 2, + "number_of_time_pts_per_cardiac_cycle": 201, + "output_all_cycles": true + }, + "vessels": [ + { + "boundary_conditions": { + "inlet": "INFLOW", + "outlet": "OUT" + }, + "vessel_id": 0, + "vessel_length": 10.0, + "vessel_name": "branch0_seg0", + "zero_d_element_type": "Resistance", + "zero_d_element_values": { + "R": 100.0 + } + } + ] +} \ No newline at end of file diff --git a/tests/cases/results/result_pulsatileFlow_capacitance.json b/tests/cases/results/result_pulsatileFlow_capacitance.json new file mode 100644 index 000000000..255c9bfaa --- /dev/null +++ b/tests/cases/results/result_pulsatileFlow_capacitance.json @@ -0,0 +1 @@ +{"name":{"0":"branch0_seg0","1":"branch0_seg0","2":"branch0_seg0","3":"branch0_seg0","4":"branch0_seg0","5":"branch0_seg0","6":"branch0_seg0","7":"branch0_seg0","8":"branch0_seg0","9":"branch0_seg0","10":"branch0_seg0"},"time":{"0":0.0,"1":0.1,"2":0.2,"3":0.3,"4":0.4,"5":0.5,"6":0.6,"7":0.7,"8":0.8,"9":0.9,"10":1.0},"flow_in":{"0":9.990234375,"1":10.0048828125,"2":9.9975585938,"3":10.0012207031,"4":9.9993896484,"5":10.0003051758,"6":9.9998474121,"7":10.0000762939,"8":9.999961853,"9":10.0000190735,"10":9.9999904633},"flow_out":{"0":-0.0,"1":0.0,"2":-0.0,"3":0.0,"4":-0.0,"5":0.0,"6":-0.0,"7":0.0,"8":-0.0,"9":0.0,"10":-0.0},"pressure_in":{"0":4916.6666752,"1":5416.66666496,"2":5916.666667008,"3":6416.6666665984,"4":6916.6666666803,"5":7416.6666666639,"6":7916.6666666672,"7":8416.6666666666,"8":8916.6666666667,"9":9416.6666666667,"10":9916.6666666667},"pressure_out":{"0":4916.6666752,"1":5416.66666496,"2":5916.666667008,"3":6416.6666665984,"4":6916.6666666803,"5":7416.6666666639,"6":7916.6666666672,"7":8416.6666666666,"8":8916.6666666667,"9":9416.6666666667,"10":9916.6666666667}} \ No newline at end of file diff --git a/tests/cases/results/result_pulsatileFlow_inductance.json b/tests/cases/results/result_pulsatileFlow_inductance.json new file mode 100644 index 000000000..5962e8f5f --- /dev/null +++ b/tests/cases/results/result_pulsatileFlow_inductance.json @@ -0,0 +1 @@ +{"name":{"0":"branch0_seg0","1":"branch0_seg0","2":"branch0_seg0","3":"branch0_seg0","4":"branch0_seg0","5":"branch0_seg0","6":"branch0_seg0","7":"branch0_seg0","8":"branch0_seg0","9":"branch0_seg0","10":"branch0_seg0","11":"branch0_seg0","12":"branch0_seg0","13":"branch0_seg0","14":"branch0_seg0","15":"branch0_seg0","16":"branch0_seg0","17":"branch0_seg0","18":"branch0_seg0","19":"branch0_seg0","20":"branch0_seg0","21":"branch0_seg0","22":"branch0_seg0","23":"branch0_seg0","24":"branch0_seg0","25":"branch0_seg0","26":"branch0_seg0","27":"branch0_seg0","28":"branch0_seg0","29":"branch0_seg0","30":"branch0_seg0","31":"branch0_seg0","32":"branch0_seg0","33":"branch0_seg0","34":"branch0_seg0","35":"branch0_seg0","36":"branch0_seg0","37":"branch0_seg0","38":"branch0_seg0","39":"branch0_seg0","40":"branch0_seg0","41":"branch0_seg0","42":"branch0_seg0","43":"branch0_seg0","44":"branch0_seg0","45":"branch0_seg0","46":"branch0_seg0","47":"branch0_seg0","48":"branch0_seg0","49":"branch0_seg0","50":"branch0_seg0","51":"branch0_seg0","52":"branch0_seg0","53":"branch0_seg0","54":"branch0_seg0","55":"branch0_seg0","56":"branch0_seg0","57":"branch0_seg0","58":"branch0_seg0","59":"branch0_seg0","60":"branch0_seg0","61":"branch0_seg0","62":"branch0_seg0","63":"branch0_seg0","64":"branch0_seg0","65":"branch0_seg0","66":"branch0_seg0","67":"branch0_seg0","68":"branch0_seg0","69":"branch0_seg0","70":"branch0_seg0","71":"branch0_seg0","72":"branch0_seg0","73":"branch0_seg0","74":"branch0_seg0","75":"branch0_seg0","76":"branch0_seg0","77":"branch0_seg0","78":"branch0_seg0","79":"branch0_seg0","80":"branch0_seg0","81":"branch0_seg0","82":"branch0_seg0","83":"branch0_seg0","84":"branch0_seg0","85":"branch0_seg0","86":"branch0_seg0","87":"branch0_seg0","88":"branch0_seg0","89":"branch0_seg0","90":"branch0_seg0","91":"branch0_seg0","92":"branch0_seg0","93":"branch0_seg0","94":"branch0_seg0","95":"branch0_seg0","96":"branch0_seg0","97":"branch0_seg0","98":"branch0_seg0","99":"branch0_seg0","100":"branch0_seg0","101":"branch0_seg0","102":"branch0_seg0","103":"branch0_seg0","104":"branch0_seg0","105":"branch0_seg0","106":"branch0_seg0","107":"branch0_seg0","108":"branch0_seg0","109":"branch0_seg0","110":"branch0_seg0","111":"branch0_seg0","112":"branch0_seg0","113":"branch0_seg0","114":"branch0_seg0","115":"branch0_seg0","116":"branch0_seg0","117":"branch0_seg0","118":"branch0_seg0","119":"branch0_seg0","120":"branch0_seg0","121":"branch0_seg0","122":"branch0_seg0","123":"branch0_seg0","124":"branch0_seg0","125":"branch0_seg0","126":"branch0_seg0","127":"branch0_seg0","128":"branch0_seg0","129":"branch0_seg0","130":"branch0_seg0","131":"branch0_seg0","132":"branch0_seg0","133":"branch0_seg0","134":"branch0_seg0","135":"branch0_seg0","136":"branch0_seg0","137":"branch0_seg0","138":"branch0_seg0","139":"branch0_seg0","140":"branch0_seg0","141":"branch0_seg0","142":"branch0_seg0","143":"branch0_seg0","144":"branch0_seg0","145":"branch0_seg0","146":"branch0_seg0","147":"branch0_seg0","148":"branch0_seg0","149":"branch0_seg0","150":"branch0_seg0","151":"branch0_seg0","152":"branch0_seg0","153":"branch0_seg0","154":"branch0_seg0","155":"branch0_seg0","156":"branch0_seg0","157":"branch0_seg0","158":"branch0_seg0","159":"branch0_seg0","160":"branch0_seg0","161":"branch0_seg0","162":"branch0_seg0","163":"branch0_seg0","164":"branch0_seg0","165":"branch0_seg0","166":"branch0_seg0","167":"branch0_seg0","168":"branch0_seg0","169":"branch0_seg0","170":"branch0_seg0","171":"branch0_seg0","172":"branch0_seg0","173":"branch0_seg0","174":"branch0_seg0","175":"branch0_seg0","176":"branch0_seg0","177":"branch0_seg0","178":"branch0_seg0","179":"branch0_seg0","180":"branch0_seg0","181":"branch0_seg0","182":"branch0_seg0","183":"branch0_seg0","184":"branch0_seg0","185":"branch0_seg0","186":"branch0_seg0","187":"branch0_seg0","188":"branch0_seg0","189":"branch0_seg0","190":"branch0_seg0","191":"branch0_seg0","192":"branch0_seg0","193":"branch0_seg0","194":"branch0_seg0","195":"branch0_seg0","196":"branch0_seg0","197":"branch0_seg0","198":"branch0_seg0","199":"branch0_seg0","200":"branch0_seg0","201":"branch0_seg0","202":"branch0_seg0","203":"branch0_seg0","204":"branch0_seg0","205":"branch0_seg0","206":"branch0_seg0","207":"branch0_seg0","208":"branch0_seg0","209":"branch0_seg0","210":"branch0_seg0","211":"branch0_seg0","212":"branch0_seg0","213":"branch0_seg0","214":"branch0_seg0","215":"branch0_seg0","216":"branch0_seg0","217":"branch0_seg0","218":"branch0_seg0","219":"branch0_seg0","220":"branch0_seg0","221":"branch0_seg0","222":"branch0_seg0","223":"branch0_seg0","224":"branch0_seg0","225":"branch0_seg0","226":"branch0_seg0","227":"branch0_seg0","228":"branch0_seg0","229":"branch0_seg0","230":"branch0_seg0","231":"branch0_seg0","232":"branch0_seg0","233":"branch0_seg0","234":"branch0_seg0","235":"branch0_seg0","236":"branch0_seg0","237":"branch0_seg0","238":"branch0_seg0","239":"branch0_seg0","240":"branch0_seg0","241":"branch0_seg0","242":"branch0_seg0","243":"branch0_seg0","244":"branch0_seg0","245":"branch0_seg0","246":"branch0_seg0","247":"branch0_seg0","248":"branch0_seg0","249":"branch0_seg0","250":"branch0_seg0","251":"branch0_seg0","252":"branch0_seg0","253":"branch0_seg0","254":"branch0_seg0","255":"branch0_seg0","256":"branch0_seg0","257":"branch0_seg0","258":"branch0_seg0","259":"branch0_seg0","260":"branch0_seg0","261":"branch0_seg0","262":"branch0_seg0","263":"branch0_seg0","264":"branch0_seg0","265":"branch0_seg0","266":"branch0_seg0","267":"branch0_seg0","268":"branch0_seg0","269":"branch0_seg0","270":"branch0_seg0","271":"branch0_seg0","272":"branch0_seg0","273":"branch0_seg0","274":"branch0_seg0","275":"branch0_seg0","276":"branch0_seg0","277":"branch0_seg0","278":"branch0_seg0","279":"branch0_seg0","280":"branch0_seg0","281":"branch0_seg0","282":"branch0_seg0","283":"branch0_seg0","284":"branch0_seg0","285":"branch0_seg0","286":"branch0_seg0","287":"branch0_seg0","288":"branch0_seg0","289":"branch0_seg0","290":"branch0_seg0","291":"branch0_seg0","292":"branch0_seg0","293":"branch0_seg0","294":"branch0_seg0","295":"branch0_seg0","296":"branch0_seg0","297":"branch0_seg0","298":"branch0_seg0","299":"branch0_seg0","300":"branch0_seg0","301":"branch0_seg0","302":"branch0_seg0","303":"branch0_seg0","304":"branch0_seg0","305":"branch0_seg0","306":"branch0_seg0","307":"branch0_seg0","308":"branch0_seg0","309":"branch0_seg0","310":"branch0_seg0","311":"branch0_seg0","312":"branch0_seg0","313":"branch0_seg0","314":"branch0_seg0","315":"branch0_seg0","316":"branch0_seg0","317":"branch0_seg0","318":"branch0_seg0","319":"branch0_seg0","320":"branch0_seg0","321":"branch0_seg0","322":"branch0_seg0","323":"branch0_seg0","324":"branch0_seg0","325":"branch0_seg0","326":"branch0_seg0","327":"branch0_seg0","328":"branch0_seg0","329":"branch0_seg0","330":"branch0_seg0","331":"branch0_seg0","332":"branch0_seg0","333":"branch0_seg0","334":"branch0_seg0","335":"branch0_seg0","336":"branch0_seg0","337":"branch0_seg0","338":"branch0_seg0","339":"branch0_seg0","340":"branch0_seg0","341":"branch0_seg0","342":"branch0_seg0","343":"branch0_seg0","344":"branch0_seg0","345":"branch0_seg0","346":"branch0_seg0","347":"branch0_seg0","348":"branch0_seg0","349":"branch0_seg0","350":"branch0_seg0","351":"branch0_seg0","352":"branch0_seg0","353":"branch0_seg0","354":"branch0_seg0","355":"branch0_seg0","356":"branch0_seg0","357":"branch0_seg0","358":"branch0_seg0","359":"branch0_seg0","360":"branch0_seg0","361":"branch0_seg0","362":"branch0_seg0","363":"branch0_seg0","364":"branch0_seg0","365":"branch0_seg0","366":"branch0_seg0","367":"branch0_seg0","368":"branch0_seg0","369":"branch0_seg0","370":"branch0_seg0","371":"branch0_seg0","372":"branch0_seg0","373":"branch0_seg0","374":"branch0_seg0","375":"branch0_seg0","376":"branch0_seg0","377":"branch0_seg0","378":"branch0_seg0","379":"branch0_seg0","380":"branch0_seg0","381":"branch0_seg0","382":"branch0_seg0","383":"branch0_seg0","384":"branch0_seg0","385":"branch0_seg0","386":"branch0_seg0","387":"branch0_seg0","388":"branch0_seg0","389":"branch0_seg0","390":"branch0_seg0","391":"branch0_seg0","392":"branch0_seg0","393":"branch0_seg0","394":"branch0_seg0","395":"branch0_seg0","396":"branch0_seg0","397":"branch0_seg0","398":"branch0_seg0","399":"branch0_seg0","400":"branch0_seg0"},"time":{"0":0.0,"1":0.005,"2":0.01,"3":0.015,"4":0.02,"5":0.025,"6":0.03,"7":0.035,"8":0.04,"9":0.045,"10":0.05,"11":0.055,"12":0.06,"13":0.065,"14":0.07,"15":0.075,"16":0.08,"17":0.085,"18":0.09,"19":0.095,"20":0.1,"21":0.105,"22":0.11,"23":0.115,"24":0.12,"25":0.125,"26":0.13,"27":0.135,"28":0.14,"29":0.145,"30":0.15,"31":0.155,"32":0.16,"33":0.165,"34":0.17,"35":0.175,"36":0.18,"37":0.185,"38":0.19,"39":0.195,"40":0.2,"41":0.205,"42":0.21,"43":0.215,"44":0.22,"45":0.225,"46":0.23,"47":0.235,"48":0.24,"49":0.245,"50":0.25,"51":0.255,"52":0.26,"53":0.265,"54":0.27,"55":0.275,"56":0.28,"57":0.285,"58":0.29,"59":0.295,"60":0.3,"61":0.305,"62":0.31,"63":0.315,"64":0.32,"65":0.325,"66":0.33,"67":0.335,"68":0.34,"69":0.345,"70":0.35,"71":0.355,"72":0.36,"73":0.365,"74":0.37,"75":0.375,"76":0.38,"77":0.385,"78":0.39,"79":0.395,"80":0.4,"81":0.405,"82":0.41,"83":0.415,"84":0.42,"85":0.425,"86":0.43,"87":0.435,"88":0.44,"89":0.445,"90":0.45,"91":0.455,"92":0.46,"93":0.465,"94":0.47,"95":0.475,"96":0.48,"97":0.485,"98":0.49,"99":0.495,"100":0.5,"101":0.505,"102":0.51,"103":0.515,"104":0.52,"105":0.525,"106":0.53,"107":0.535,"108":0.54,"109":0.545,"110":0.55,"111":0.555,"112":0.56,"113":0.565,"114":0.57,"115":0.575,"116":0.58,"117":0.585,"118":0.59,"119":0.595,"120":0.6,"121":0.605,"122":0.61,"123":0.615,"124":0.62,"125":0.625,"126":0.63,"127":0.635,"128":0.64,"129":0.645,"130":0.65,"131":0.655,"132":0.66,"133":0.665,"134":0.67,"135":0.675,"136":0.68,"137":0.685,"138":0.69,"139":0.695,"140":0.7,"141":0.705,"142":0.71,"143":0.715,"144":0.72,"145":0.725,"146":0.73,"147":0.735,"148":0.74,"149":0.745,"150":0.75,"151":0.755,"152":0.76,"153":0.765,"154":0.77,"155":0.775,"156":0.78,"157":0.785,"158":0.79,"159":0.795,"160":0.8,"161":0.805,"162":0.81,"163":0.815,"164":0.82,"165":0.825,"166":0.83,"167":0.835,"168":0.84,"169":0.845,"170":0.85,"171":0.855,"172":0.86,"173":0.865,"174":0.87,"175":0.875,"176":0.88,"177":0.885,"178":0.89,"179":0.895,"180":0.9,"181":0.905,"182":0.91,"183":0.915,"184":0.92,"185":0.925,"186":0.93,"187":0.935,"188":0.94,"189":0.945,"190":0.95,"191":0.955,"192":0.96,"193":0.965,"194":0.97,"195":0.975,"196":0.98,"197":0.985,"198":0.99,"199":0.995,"200":1.0,"201":1.005,"202":1.01,"203":1.015,"204":1.02,"205":1.025,"206":1.03,"207":1.035,"208":1.04,"209":1.045,"210":1.05,"211":1.055,"212":1.06,"213":1.065,"214":1.07,"215":1.075,"216":1.08,"217":1.085,"218":1.09,"219":1.095,"220":1.1,"221":1.105,"222":1.11,"223":1.115,"224":1.12,"225":1.125,"226":1.13,"227":1.135,"228":1.14,"229":1.145,"230":1.15,"231":1.155,"232":1.16,"233":1.165,"234":1.17,"235":1.175,"236":1.18,"237":1.185,"238":1.19,"239":1.195,"240":1.2,"241":1.205,"242":1.21,"243":1.215,"244":1.22,"245":1.225,"246":1.23,"247":1.235,"248":1.24,"249":1.245,"250":1.25,"251":1.255,"252":1.26,"253":1.265,"254":1.27,"255":1.275,"256":1.28,"257":1.285,"258":1.29,"259":1.295,"260":1.3,"261":1.305,"262":1.31,"263":1.315,"264":1.32,"265":1.325,"266":1.33,"267":1.335,"268":1.34,"269":1.345,"270":1.35,"271":1.355,"272":1.36,"273":1.365,"274":1.37,"275":1.375,"276":1.38,"277":1.385,"278":1.39,"279":1.395,"280":1.4,"281":1.405,"282":1.41,"283":1.415,"284":1.42,"285":1.425,"286":1.43,"287":1.435,"288":1.44,"289":1.445,"290":1.45,"291":1.455,"292":1.46,"293":1.465,"294":1.47,"295":1.475,"296":1.48,"297":1.485,"298":1.49,"299":1.495,"300":1.5,"301":1.505,"302":1.51,"303":1.515,"304":1.52,"305":1.525,"306":1.53,"307":1.535,"308":1.54,"309":1.545,"310":1.55,"311":1.555,"312":1.56,"313":1.565,"314":1.57,"315":1.575,"316":1.58,"317":1.585,"318":1.59,"319":1.595,"320":1.6,"321":1.605,"322":1.61,"323":1.615,"324":1.62,"325":1.625,"326":1.63,"327":1.635,"328":1.64,"329":1.645,"330":1.65,"331":1.655,"332":1.66,"333":1.665,"334":1.67,"335":1.675,"336":1.68,"337":1.685,"338":1.69,"339":1.695,"340":1.7,"341":1.705,"342":1.71,"343":1.715,"344":1.72,"345":1.725,"346":1.73,"347":1.735,"348":1.74,"349":1.745,"350":1.75,"351":1.755,"352":1.76,"353":1.765,"354":1.77,"355":1.775,"356":1.78,"357":1.785,"358":1.79,"359":1.795,"360":1.8,"361":1.805,"362":1.81,"363":1.815,"364":1.82,"365":1.825,"366":1.83,"367":1.835,"368":1.84,"369":1.845,"370":1.85,"371":1.855,"372":1.86,"373":1.865,"374":1.87,"375":1.875,"376":1.88,"377":1.885,"378":1.89,"379":1.895,"380":1.9,"381":1.905,"382":1.91,"383":1.915,"384":1.92,"385":1.925,"386":1.93,"387":1.935,"388":1.94,"389":1.945,"390":1.95,"391":1.955,"392":1.96,"393":1.965,"394":1.97,"395":1.975,"396":1.98,"397":1.985,"398":1.99,"399":1.995,"400":2.0},"flow_in":{"0":2.200000001,"1":2.2784881489,"2":2.3569762991,"3":2.4351546912,"4":2.513333084,"5":2.5908931852,"6":2.6684532865,"7":2.7450890022,"8":2.8217247179,"9":2.8971336019,"10":2.9725424859,"11":3.0464269338,"12":3.1203113817,"13":3.1923798053,"14":3.2644482289,"15":3.3344162071,"16":3.4043841853,"17":3.4719755864,"18":3.5395669874,"19":3.6045150591,"20":3.6694631307,"21":3.7315115526,"22":3.7935599744,"23":3.8524638696,"24":3.9113677648,"25":3.9668946667,"26":4.0224215686,"27":4.0743523377,"28":4.1262831069,"29":4.1744127964,"30":4.2225424859,"31":4.2666811498,"32":4.3108198138,"33":4.3507932569,"34":4.3907667001,"35":4.4264171656,"36":4.4620676312,"37":4.4932544229,"38":4.5244412147,"39":4.5510412527,"40":4.5776412907,"41":4.5995495968,"42":4.6214579028,"43":4.6385880148,"44":4.6557181268,"45":4.6680024401,"46":4.6802867533,"47":4.6876767872,"48":4.6950668211,"49":4.6975334105,"50":4.7,"51":4.6975334105,"52":4.6950668211,"53":4.6876767872,"54":4.6802867533,"55":4.6680024401,"56":4.6557181268,"57":4.6385880148,"58":4.6214579028,"59":4.5995495968,"60":4.5776412907,"61":4.5510412527,"62":4.5244412147,"63":4.4932544229,"64":4.4620676312,"65":4.4264171656,"66":4.3907667001,"67":4.3507932569,"68":4.3108198138,"69":4.2666811498,"70":4.2225424859,"71":4.1744127964,"72":4.1262831069,"73":4.0743523377,"74":4.0224215686,"75":3.9668946667,"76":3.9113677648,"77":3.8524638696,"78":3.7935599744,"79":3.7315115526,"80":3.6694631307,"81":3.6045150591,"82":3.5395669874,"83":3.4719755864,"84":3.4043841853,"85":3.3344162071,"86":3.2644482289,"87":3.1923798053,"88":3.1203113817,"89":3.0464269338,"90":2.9725424859,"91":2.8971336019,"92":2.8217247179,"93":2.7450890022,"94":2.6684532865,"95":2.5908931852,"96":2.5133330839,"97":2.4351546914,"98":2.3569762988,"99":2.2784881494,"100":2.2,"101":2.1215118506,"102":2.0430237012,"103":1.9648453086,"104":1.8866669161,"105":1.8091068148,"106":1.7315467135,"107":1.6549109978,"108":1.5782752821,"109":1.5028663981,"110":1.4274575141,"111":1.3535730662,"112":1.2796886183,"113":1.2076201947,"114":1.1355517711,"115":1.0655837929,"116":0.9956158147,"117":0.9280244136,"118":0.8604330126,"119":0.7954849409,"120":0.7305368693,"121":0.6684884474,"122":0.6064400256,"123":0.5475361304,"124":0.4886322352,"125":0.4331053333,"126":0.3775784314,"127":0.3256476623,"128":0.2737168931,"129":0.2255872036,"130":0.1774575141,"131":0.1333188502,"132":0.0891801862,"133":0.0492067431,"134":0.0092332999,"135":-0.0264171656,"136":-0.0620676312,"137":-0.0932544229,"138":-0.1244412147,"139":-0.1510412527,"140":-0.1776412907,"141":-0.1995495968,"142":-0.2214579028,"143":-0.2385880148,"144":-0.2557181268,"145":-0.2680024401,"146":-0.2802867533,"147":-0.2876767872,"148":-0.2950668211,"149":-0.2975334105,"150":-0.3,"151":-0.2975334105,"152":-0.2950668211,"153":-0.2876767872,"154":-0.2802867533,"155":-0.2680024401,"156":-0.2557181268,"157":-0.2385880148,"158":-0.2214579028,"159":-0.1995495968,"160":-0.1776412907,"161":-0.1510412527,"162":-0.1244412147,"163":-0.0932544229,"164":-0.0620676312,"165":-0.0264171656,"166":0.0092332999,"167":0.0492067431,"168":0.0891801862,"169":0.1333188502,"170":0.1774575141,"171":0.2255872036,"172":0.2737168931,"173":0.3256476623,"174":0.3775784314,"175":0.4331053333,"176":0.4886322352,"177":0.5475361304,"178":0.6064400256,"179":0.6684884474,"180":0.7305368693,"181":0.7954849409,"182":0.8604330126,"183":0.9280244136,"184":0.9956158147,"185":1.0655837929,"186":1.1355517711,"187":1.2076201947,"188":1.2796886183,"189":1.3535730662,"190":1.4274575141,"191":1.5028663981,"192":1.5782752821,"193":1.6549109978,"194":1.7315467135,"195":1.8091068148,"196":1.8866669161,"197":1.9648453086,"198":2.0430237012,"199":2.1215118506,"200":2.2,"201":2.2784881494,"202":2.3569762988,"203":2.4351546914,"204":2.5133330839,"205":2.5908931852,"206":2.6684532865,"207":2.7450890022,"208":2.8217247179,"209":2.8971336019,"210":2.9725424859,"211":3.0464269338,"212":3.1203113817,"213":3.1923798053,"214":3.2644482289,"215":3.3344162071,"216":3.4043841853,"217":3.4719755864,"218":3.5395669874,"219":3.6045150591,"220":3.6694631307,"221":3.7315115526,"222":3.7935599744,"223":3.8524638696,"224":3.9113677648,"225":3.9668946667,"226":4.0224215686,"227":4.0743523377,"228":4.1262831069,"229":4.1744127964,"230":4.2225424859,"231":4.2666811498,"232":4.3108198138,"233":4.3507932569,"234":4.3907667001,"235":4.4264171656,"236":4.4620676312,"237":4.4932544229,"238":4.5244412147,"239":4.5510412527,"240":4.5776412907,"241":4.5995495968,"242":4.6214579028,"243":4.6385880148,"244":4.6557181268,"245":4.6680024401,"246":4.6802867533,"247":4.6876767872,"248":4.6950668211,"249":4.6975334105,"250":4.7,"251":4.6975334105,"252":4.6950668211,"253":4.6876767872,"254":4.6802867533,"255":4.6680024401,"256":4.6557181268,"257":4.6385880148,"258":4.6214579028,"259":4.5995495968,"260":4.5776412907,"261":4.5510412527,"262":4.5244412147,"263":4.4932544229,"264":4.4620676312,"265":4.4264171656,"266":4.3907667001,"267":4.3507932569,"268":4.3108198138,"269":4.2666811498,"270":4.2225424859,"271":4.1744127964,"272":4.1262831069,"273":4.0743523377,"274":4.0224215686,"275":3.9668946667,"276":3.9113677648,"277":3.8524638696,"278":3.7935599744,"279":3.7315115526,"280":3.6694631307,"281":3.6045150591,"282":3.5395669874,"283":3.4719755864,"284":3.4043841853,"285":3.3344162071,"286":3.2644482289,"287":3.1923798053,"288":3.1203113817,"289":3.0464269338,"290":2.9725424859,"291":2.8971336019,"292":2.8217247179,"293":2.7450890022,"294":2.6684532865,"295":2.5908931852,"296":2.5133330839,"297":2.4351546914,"298":2.3569762988,"299":2.2784881494,"300":2.2,"301":2.1215118506,"302":2.0430237012,"303":1.9648453086,"304":1.8866669161,"305":1.8091068148,"306":1.7315467135,"307":1.6549109978,"308":1.5782752821,"309":1.5028663981,"310":1.4274575141,"311":1.3535730662,"312":1.2796886183,"313":1.2076201947,"314":1.1355517711,"315":1.0655837929,"316":0.9956158147,"317":0.9280244136,"318":0.8604330126,"319":0.7954849409,"320":0.7305368693,"321":0.6684884474,"322":0.6064400256,"323":0.5475361304,"324":0.4886322352,"325":0.4331053333,"326":0.3775784314,"327":0.3256476623,"328":0.2737168931,"329":0.2255872036,"330":0.1774575141,"331":0.1333188502,"332":0.0891801862,"333":0.0492067431,"334":0.0092332999,"335":-0.0264171656,"336":-0.0620676312,"337":-0.0932544229,"338":-0.1244412147,"339":-0.1510412527,"340":-0.1776412907,"341":-0.1995495968,"342":-0.2214579028,"343":-0.2385880148,"344":-0.2557181268,"345":-0.2680024401,"346":-0.2802867533,"347":-0.2876767872,"348":-0.2950668211,"349":-0.2975334105,"350":-0.3,"351":-0.2975334105,"352":-0.2950668211,"353":-0.2876767872,"354":-0.2802867533,"355":-0.2680024401,"356":-0.2557181268,"357":-0.2385880148,"358":-0.2214579028,"359":-0.1995495968,"360":-0.1776412907,"361":-0.1510412527,"362":-0.1244412147,"363":-0.0932544229,"364":-0.0620676312,"365":-0.0264171656,"366":0.0092332999,"367":0.0492067431,"368":0.0891801862,"369":0.1333188502,"370":0.1774575141,"371":0.2255872036,"372":0.2737168931,"373":0.3256476623,"374":0.3775784314,"375":0.4331053333,"376":0.4886322352,"377":0.5475361304,"378":0.6064400256,"379":0.6684884474,"380":0.7305368693,"381":0.7954849409,"382":0.8604330126,"383":0.9280244136,"384":0.9956158147,"385":1.0655837929,"386":1.1355517711,"387":1.2076201947,"388":1.2796886183,"389":1.3535730662,"390":1.4274575141,"391":1.5028663981,"392":1.5782752821,"393":1.6549109978,"394":1.7315467135,"395":1.8091068148,"396":1.8866669161,"397":1.9648453086,"398":2.0430237012,"399":2.1215118506,"400":2.2},"flow_out":{"0":2.200000001,"1":2.2784881489,"2":2.3569762991,"3":2.4351546912,"4":2.513333084,"5":2.5908931852,"6":2.6684532865,"7":2.7450890022,"8":2.8217247179,"9":2.8971336019,"10":2.9725424859,"11":3.0464269338,"12":3.1203113817,"13":3.1923798053,"14":3.2644482289,"15":3.3344162071,"16":3.4043841853,"17":3.4719755864,"18":3.5395669874,"19":3.6045150591,"20":3.6694631307,"21":3.7315115526,"22":3.7935599744,"23":3.8524638696,"24":3.9113677648,"25":3.9668946667,"26":4.0224215686,"27":4.0743523377,"28":4.1262831069,"29":4.1744127964,"30":4.2225424859,"31":4.2666811498,"32":4.3108198138,"33":4.3507932569,"34":4.3907667001,"35":4.4264171656,"36":4.4620676312,"37":4.4932544229,"38":4.5244412147,"39":4.5510412527,"40":4.5776412907,"41":4.5995495968,"42":4.6214579028,"43":4.6385880148,"44":4.6557181268,"45":4.6680024401,"46":4.6802867533,"47":4.6876767872,"48":4.6950668211,"49":4.6975334105,"50":4.7,"51":4.6975334105,"52":4.6950668211,"53":4.6876767872,"54":4.6802867533,"55":4.6680024401,"56":4.6557181268,"57":4.6385880148,"58":4.6214579028,"59":4.5995495968,"60":4.5776412907,"61":4.5510412527,"62":4.5244412147,"63":4.4932544229,"64":4.4620676312,"65":4.4264171656,"66":4.3907667001,"67":4.3507932569,"68":4.3108198138,"69":4.2666811498,"70":4.2225424859,"71":4.1744127964,"72":4.1262831069,"73":4.0743523377,"74":4.0224215686,"75":3.9668946667,"76":3.9113677648,"77":3.8524638696,"78":3.7935599744,"79":3.7315115526,"80":3.6694631307,"81":3.6045150591,"82":3.5395669874,"83":3.4719755864,"84":3.4043841853,"85":3.3344162071,"86":3.2644482289,"87":3.1923798053,"88":3.1203113817,"89":3.0464269338,"90":2.9725424859,"91":2.8971336019,"92":2.8217247179,"93":2.7450890022,"94":2.6684532865,"95":2.5908931852,"96":2.5133330839,"97":2.4351546914,"98":2.3569762988,"99":2.2784881494,"100":2.2,"101":2.1215118506,"102":2.0430237012,"103":1.9648453086,"104":1.8866669161,"105":1.8091068148,"106":1.7315467135,"107":1.6549109978,"108":1.5782752821,"109":1.5028663981,"110":1.4274575141,"111":1.3535730662,"112":1.2796886183,"113":1.2076201947,"114":1.1355517711,"115":1.0655837929,"116":0.9956158147,"117":0.9280244136,"118":0.8604330126,"119":0.7954849409,"120":0.7305368693,"121":0.6684884474,"122":0.6064400256,"123":0.5475361304,"124":0.4886322352,"125":0.4331053333,"126":0.3775784314,"127":0.3256476623,"128":0.2737168931,"129":0.2255872036,"130":0.1774575141,"131":0.1333188502,"132":0.0891801862,"133":0.0492067431,"134":0.0092332999,"135":-0.0264171656,"136":-0.0620676312,"137":-0.0932544229,"138":-0.1244412147,"139":-0.1510412527,"140":-0.1776412907,"141":-0.1995495968,"142":-0.2214579028,"143":-0.2385880148,"144":-0.2557181268,"145":-0.2680024401,"146":-0.2802867533,"147":-0.2876767872,"148":-0.2950668211,"149":-0.2975334105,"150":-0.3,"151":-0.2975334105,"152":-0.2950668211,"153":-0.2876767872,"154":-0.2802867533,"155":-0.2680024401,"156":-0.2557181268,"157":-0.2385880148,"158":-0.2214579028,"159":-0.1995495968,"160":-0.1776412907,"161":-0.1510412527,"162":-0.1244412147,"163":-0.0932544229,"164":-0.0620676312,"165":-0.0264171656,"166":0.0092332999,"167":0.0492067431,"168":0.0891801862,"169":0.1333188502,"170":0.1774575141,"171":0.2255872036,"172":0.2737168931,"173":0.3256476623,"174":0.3775784314,"175":0.4331053333,"176":0.4886322352,"177":0.5475361304,"178":0.6064400256,"179":0.6684884474,"180":0.7305368693,"181":0.7954849409,"182":0.8604330126,"183":0.9280244136,"184":0.9956158147,"185":1.0655837929,"186":1.1355517711,"187":1.2076201947,"188":1.2796886183,"189":1.3535730662,"190":1.4274575141,"191":1.5028663981,"192":1.5782752821,"193":1.6549109978,"194":1.7315467135,"195":1.8091068148,"196":1.8866669161,"197":1.9648453086,"198":2.0430237012,"199":2.1215118506,"200":2.2,"201":2.2784881494,"202":2.3569762988,"203":2.4351546914,"204":2.5133330839,"205":2.5908931852,"206":2.6684532865,"207":2.7450890022,"208":2.8217247179,"209":2.8971336019,"210":2.9725424859,"211":3.0464269338,"212":3.1203113817,"213":3.1923798053,"214":3.2644482289,"215":3.3344162071,"216":3.4043841853,"217":3.4719755864,"218":3.5395669874,"219":3.6045150591,"220":3.6694631307,"221":3.7315115526,"222":3.7935599744,"223":3.8524638696,"224":3.9113677648,"225":3.9668946667,"226":4.0224215686,"227":4.0743523377,"228":4.1262831069,"229":4.1744127964,"230":4.2225424859,"231":4.2666811498,"232":4.3108198138,"233":4.3507932569,"234":4.3907667001,"235":4.4264171656,"236":4.4620676312,"237":4.4932544229,"238":4.5244412147,"239":4.5510412527,"240":4.5776412907,"241":4.5995495968,"242":4.6214579028,"243":4.6385880148,"244":4.6557181268,"245":4.6680024401,"246":4.6802867533,"247":4.6876767872,"248":4.6950668211,"249":4.6975334105,"250":4.7,"251":4.6975334105,"252":4.6950668211,"253":4.6876767872,"254":4.6802867533,"255":4.6680024401,"256":4.6557181268,"257":4.6385880148,"258":4.6214579028,"259":4.5995495968,"260":4.5776412907,"261":4.5510412527,"262":4.5244412147,"263":4.4932544229,"264":4.4620676312,"265":4.4264171656,"266":4.3907667001,"267":4.3507932569,"268":4.3108198138,"269":4.2666811498,"270":4.2225424859,"271":4.1744127964,"272":4.1262831069,"273":4.0743523377,"274":4.0224215686,"275":3.9668946667,"276":3.9113677648,"277":3.8524638696,"278":3.7935599744,"279":3.7315115526,"280":3.6694631307,"281":3.6045150591,"282":3.5395669874,"283":3.4719755864,"284":3.4043841853,"285":3.3344162071,"286":3.2644482289,"287":3.1923798053,"288":3.1203113817,"289":3.0464269338,"290":2.9725424859,"291":2.8971336019,"292":2.8217247179,"293":2.7450890022,"294":2.6684532865,"295":2.5908931852,"296":2.5133330839,"297":2.4351546914,"298":2.3569762988,"299":2.2784881494,"300":2.2,"301":2.1215118506,"302":2.0430237012,"303":1.9648453086,"304":1.8866669161,"305":1.8091068148,"306":1.7315467135,"307":1.6549109978,"308":1.5782752821,"309":1.5028663981,"310":1.4274575141,"311":1.3535730662,"312":1.2796886183,"313":1.2076201947,"314":1.1355517711,"315":1.0655837929,"316":0.9956158147,"317":0.9280244136,"318":0.8604330126,"319":0.7954849409,"320":0.7305368693,"321":0.6684884474,"322":0.6064400256,"323":0.5475361304,"324":0.4886322352,"325":0.4331053333,"326":0.3775784314,"327":0.3256476623,"328":0.2737168931,"329":0.2255872036,"330":0.1774575141,"331":0.1333188502,"332":0.0891801862,"333":0.0492067431,"334":0.0092332999,"335":-0.0264171656,"336":-0.0620676312,"337":-0.0932544229,"338":-0.1244412147,"339":-0.1510412527,"340":-0.1776412907,"341":-0.1995495968,"342":-0.2214579028,"343":-0.2385880148,"344":-0.2557181268,"345":-0.2680024401,"346":-0.2802867533,"347":-0.2876767872,"348":-0.2950668211,"349":-0.2975334105,"350":-0.3,"351":-0.2975334105,"352":-0.2950668211,"353":-0.2876767872,"354":-0.2802867533,"355":-0.2680024401,"356":-0.2557181268,"357":-0.2385880148,"358":-0.2214579028,"359":-0.1995495968,"360":-0.1776412907,"361":-0.1510412527,"362":-0.1244412147,"363":-0.0932544229,"364":-0.0620676312,"365":-0.0264171656,"366":0.0092332999,"367":0.0492067431,"368":0.0891801862,"369":0.1333188502,"370":0.1774575141,"371":0.2255872036,"372":0.2737168931,"373":0.3256476623,"374":0.3775784314,"375":0.4331053333,"376":0.4886322352,"377":0.5475361304,"378":0.6064400256,"379":0.6684884474,"380":0.7305368693,"381":0.7954849409,"382":0.8604330126,"383":0.9280244136,"384":0.9956158147,"385":1.0655837929,"386":1.1355517711,"387":1.2076201947,"388":1.2796886183,"389":1.3535730662,"390":1.4274575141,"391":1.5028663981,"392":1.5782752821,"393":1.6549109978,"394":1.7315467135,"395":1.8091068148,"396":1.8866669161,"397":1.9648453086,"398":2.0430237012,"399":2.1215118506,"400":2.2},"pressure_in":{"0":0.0000178639,"1":29.4330459852,"2":5.8866169569,"3":21.9586298701,"4":11.7499925786,"5":17.7087673519,"6":14.2557800888,"7":15.87242906,"8":15.0496979962,"9":15.0082049214,"10":15.1633683859,"11":14.4469146421,"12":15.0102448109,"13":13.9450189703,"14":14.7332104473,"15":13.4236583942,"16":14.3786291708,"17":12.8598300046,"18":13.9616431961,"19":12.2482812507,"20":13.4879401891,"21":11.5892530539,"22":12.9605517179,"23":10.8847273645,"24":12.3818875573,"25":10.1373109432,"26":11.7543230071,"27":9.3499053444,"28":11.0803600407,"29":8.5256048748,"30":10.3626653896,"31":7.66765907,"32":9.6040733416,"33":6.7794528756,"34":8.8075782188,"35":5.8644913735,"36":7.9763235593,"37":4.9263854286,"38":7.1135899816,"39":3.9688372978,"40":6.2227823107,"41":2.9956259812,"42":5.3074161599,"43":2.0105922979,"44":4.3711040621,"45":1.0176237255,"46":3.4175412135,"47":0.0206390571,"48":2.450490891,"49":-0.9764270641,"50":1.4737696005,"51":-1.9696396738,"52":0.4912320146,"53":-2.9550790156,"54":-0.4932442396,"55":-3.9288560105,"56":-1.4757738841,"57":-4.8871276057,"58":-2.4524793233,"59":-5.826111941,"60":-3.419505947,"61":-6.7421032741,"62":-4.373037343,"63":-7.6314866058,"64":-5.3093103585,"65":-8.4907519463,"66":-6.2246299515,"67":-9.3165081679,"68":-7.115383774,"69":-10.1054963882,"70":-7.9780564273,"71":-10.8546028309,"72":-8.8092433368,"73":-11.5608711153,"74":-9.6056641874,"75":-12.221513923,"76":-10.3641758698,"77":-12.8339239988,"78":-11.081784885,"79":-13.3956844397,"80":-11.7556591581,"81":-13.9045782342,"82":-12.3831392151,"83":-14.3585970107,"84":-12.961748679,"85":-14.7559489646,"86":-13.4892040425,"87":-15.0950659293,"88":-13.9634236802,"89":-15.3746095651,"90":-14.382536064,"91":-15.593476641,"92":-14.7448871487,"93":-15.7508033885,"94":-15.0490469001,"95":-15.8459689108,"96":-15.2938149387,"97":-15.8785976333,"98":-15.4782252767,"99":-15.8485607851,"100":-15.601550131,"101":-15.755976908,"102":-15.6633027945,"103":-15.6012113883,"104":-15.6632395578,"105":-15.3848750147,"106":-15.6013606704,"107":-15.1078215682,"108":-15.47791034,"109":-14.771144452,"110":-15.2933757687,"111":-14.3761723769,"112":-15.0484852301,"113":-13.9244641174,"114":-14.7442051953,"115":-13.4178023594,"116":-14.3817365186,"117":-12.8581866656,"118":-13.9625096982,"119":-12.2478255833,"120":-13.488179231,"121":-11.5891279289,"122":-12.9606170824,"123":-10.8846932812,"124":-12.3819052994,"125":-10.1373017219,"126":-11.7543277929,"127":-9.3499028639,"128":-11.0803613247,"129":-8.5256042109,"130":-10.3626657324,"131":-7.6676588931,"132":-9.6040734328,"133":-6.7794528286,"134":-8.807578243,"135":-5.864491361,"136":-7.9763235657,"137":-4.9263854253,"138":-7.1135899833,"139":-3.968837297,"140":-6.2227823111,"141":-2.995625981,"142":-5.3074161601,"143":-2.0105922979,"144":-4.3711040622,"145":-1.0176237255,"146":-3.4175412135,"147":-0.0206390571,"148":-2.450490891,"149":0.9764270641,"150":-1.4737696005,"151":1.9696396738,"152":-0.4912320146,"153":2.9550790156,"154":0.4932442396,"155":3.9288560105,"156":1.4757738841,"157":4.8871276057,"158":2.4524793233,"159":5.826111941,"160":3.419505947,"161":6.7421032741,"162":4.373037343,"163":7.6314866058,"164":5.3093103585,"165":8.4907519463,"166":6.2246299515,"167":9.3165081679,"168":7.115383774,"169":10.1054963882,"170":7.9780564273,"171":10.8546028309,"172":8.8092433368,"173":11.5608711153,"174":9.6056641874,"175":12.221513923,"176":10.3641758698,"177":12.8339239988,"178":11.081784885,"179":13.3956844397,"180":11.7556591581,"181":13.9045782342,"182":12.3831392151,"183":14.3585970107,"184":12.961748679,"185":14.7559489646,"186":13.4892040425,"187":15.0950659294,"188":13.9634236802,"189":15.3746095651,"190":14.382536064,"191":15.593476641,"192":14.7448871487,"193":15.7508033885,"194":15.0490469001,"195":15.8459689108,"196":15.2938149387,"197":15.8785976333,"198":15.4782252767,"199":15.8485607851,"200":15.601550131,"201":15.755976908,"202":15.6633027945,"203":15.6012113883,"204":15.6632395578,"205":15.3848750147,"206":15.6013606704,"207":15.1078215682,"208":15.47791034,"209":14.771144452,"210":15.2933757687,"211":14.3761723769,"212":15.0484852301,"213":13.9244641174,"214":14.7442051953,"215":13.4178023594,"216":14.3817365186,"217":12.8581866656,"218":13.9625096982,"219":12.2478255833,"220":13.488179231,"221":11.589127929,"222":12.9606170824,"223":10.8846932812,"224":12.3819052994,"225":10.1373017219,"226":11.7543277929,"227":9.3499028639,"228":11.0803613247,"229":8.5256042109,"230":10.3626657324,"231":7.6676588931,"232":9.6040734328,"233":6.7794528286,"234":8.807578243,"235":5.864491361,"236":7.9763235657,"237":4.9263854253,"238":7.1135899833,"239":3.968837297,"240":6.2227823111,"241":2.995625981,"242":5.3074161601,"243":2.0105922979,"244":4.3711040622,"245":1.0176237255,"246":3.4175412135,"247":0.0206390571,"248":2.450490891,"249":-0.9764270641,"250":1.4737696005,"251":-1.9696396738,"252":0.4912320146,"253":-2.9550790156,"254":-0.4932442396,"255":-3.9288560105,"256":-1.4757738841,"257":-4.8871276057,"258":-2.4524793233,"259":-5.826111941,"260":-3.419505947,"261":-6.7421032741,"262":-4.373037343,"263":-7.6314866058,"264":-5.3093103585,"265":-8.4907519463,"266":-6.2246299515,"267":-9.316508168,"268":-7.115383774,"269":-10.1054963882,"270":-7.9780564273,"271":-10.8546028309,"272":-8.8092433368,"273":-11.5608711153,"274":-9.6056641874,"275":-12.221513923,"276":-10.3641758698,"277":-12.8339239988,"278":-11.081784885,"279":-13.3956844397,"280":-11.7556591581,"281":-13.9045782342,"282":-12.3831392151,"283":-14.3585970107,"284":-12.961748679,"285":-14.7559489646,"286":-13.4892040425,"287":-15.0950659293,"288":-13.9634236803,"289":-15.3746095651,"290":-14.382536064,"291":-15.593476641,"292":-14.7448871487,"293":-15.7508033885,"294":-15.0490469001,"295":-15.8459689108,"296":-15.2938149387,"297":-15.8785976333,"298":-15.4782252767,"299":-15.8485607851,"300":-15.601550131,"301":-15.755976908,"302":-15.6633027945,"303":-15.6012113883,"304":-15.6632395578,"305":-15.3848750147,"306":-15.6013606704,"307":-15.1078215682,"308":-15.47791034,"309":-14.771144452,"310":-15.2933757687,"311":-14.3761723769,"312":-15.0484852301,"313":-13.9244641174,"314":-14.7442051953,"315":-13.4178023594,"316":-14.3817365186,"317":-12.8581866656,"318":-13.9625096982,"319":-12.2478255833,"320":-13.488179231,"321":-11.5891279289,"322":-12.9606170824,"323":-10.8846932812,"324":-12.3819052994,"325":-10.1373017219,"326":-11.7543277929,"327":-9.3499028639,"328":-11.0803613247,"329":-8.5256042109,"330":-10.3626657324,"331":-7.6676588931,"332":-9.6040734328,"333":-6.7794528286,"334":-8.807578243,"335":-5.864491361,"336":-7.9763235657,"337":-4.9263854253,"338":-7.1135899833,"339":-3.968837297,"340":-6.2227823111,"341":-2.995625981,"342":-5.3074161601,"343":-2.0105922979,"344":-4.3711040622,"345":-1.0176237255,"346":-3.4175412135,"347":-0.0206390571,"348":-2.450490891,"349":0.9764270641,"350":-1.4737696005,"351":1.9696396738,"352":-0.4912320146,"353":2.9550790156,"354":0.4932442396,"355":3.9288560105,"356":1.4757738841,"357":4.8871276057,"358":2.4524793233,"359":5.826111941,"360":3.419505947,"361":6.7421032741,"362":4.373037343,"363":7.6314866058,"364":5.3093103585,"365":8.4907519463,"366":6.2246299515,"367":9.316508168,"368":7.115383774,"369":10.1054963882,"370":7.9780564273,"371":10.8546028309,"372":8.8092433368,"373":11.5608711153,"374":9.6056641874,"375":12.221513923,"376":10.3641758698,"377":12.8339239988,"378":11.081784885,"379":13.3956844397,"380":11.7556591581,"381":13.9045782342,"382":12.3831392151,"383":14.3585970107,"384":12.961748679,"385":14.7559489646,"386":13.4892040425,"387":15.0950659294,"388":13.9634236803,"389":15.3746095651,"390":14.382536064,"391":15.593476641,"392":14.7448871487,"393":15.7508033885,"394":15.0490469001,"395":15.8459689108,"396":15.2938149387,"397":15.8785976333,"398":15.4782252767,"399":15.8485607851,"400":15.601550131},"pressure_out":{"0":0.0,"1":0.0,"2":0.0,"3":0.0,"4":0.0,"5":0.0,"6":0.0,"7":0.0,"8":0.0,"9":0.0,"10":0.0,"11":0.0,"12":0.0,"13":0.0,"14":0.0,"15":0.0,"16":0.0,"17":0.0,"18":0.0,"19":0.0,"20":0.0,"21":0.0,"22":0.0,"23":0.0,"24":0.0,"25":0.0,"26":0.0,"27":0.0,"28":0.0,"29":0.0,"30":0.0,"31":0.0,"32":0.0,"33":0.0,"34":0.0,"35":0.0,"36":0.0,"37":0.0,"38":0.0,"39":0.0,"40":0.0,"41":0.0,"42":0.0,"43":0.0,"44":0.0,"45":0.0,"46":0.0,"47":0.0,"48":0.0,"49":0.0,"50":0.0,"51":0.0,"52":0.0,"53":0.0,"54":0.0,"55":0.0,"56":0.0,"57":0.0,"58":0.0,"59":0.0,"60":0.0,"61":0.0,"62":0.0,"63":0.0,"64":0.0,"65":0.0,"66":0.0,"67":0.0,"68":0.0,"69":0.0,"70":0.0,"71":0.0,"72":0.0,"73":0.0,"74":0.0,"75":0.0,"76":0.0,"77":0.0,"78":0.0,"79":0.0,"80":0.0,"81":0.0,"82":0.0,"83":0.0,"84":0.0,"85":0.0,"86":0.0,"87":0.0,"88":0.0,"89":0.0,"90":0.0,"91":0.0,"92":0.0,"93":0.0,"94":0.0,"95":0.0,"96":0.0,"97":0.0,"98":0.0,"99":0.0,"100":0.0,"101":0.0,"102":0.0,"103":0.0,"104":0.0,"105":0.0,"106":0.0,"107":0.0,"108":0.0,"109":0.0,"110":0.0,"111":0.0,"112":0.0,"113":0.0,"114":0.0,"115":0.0,"116":0.0,"117":0.0,"118":0.0,"119":0.0,"120":0.0,"121":0.0,"122":0.0,"123":0.0,"124":0.0,"125":0.0,"126":0.0,"127":0.0,"128":0.0,"129":0.0,"130":0.0,"131":0.0,"132":0.0,"133":0.0,"134":0.0,"135":0.0,"136":0.0,"137":0.0,"138":0.0,"139":0.0,"140":0.0,"141":0.0,"142":0.0,"143":0.0,"144":0.0,"145":0.0,"146":0.0,"147":0.0,"148":0.0,"149":0.0,"150":0.0,"151":0.0,"152":0.0,"153":0.0,"154":0.0,"155":0.0,"156":0.0,"157":0.0,"158":0.0,"159":0.0,"160":0.0,"161":0.0,"162":0.0,"163":0.0,"164":0.0,"165":0.0,"166":0.0,"167":0.0,"168":0.0,"169":0.0,"170":0.0,"171":0.0,"172":0.0,"173":0.0,"174":0.0,"175":0.0,"176":0.0,"177":0.0,"178":0.0,"179":0.0,"180":0.0,"181":0.0,"182":0.0,"183":0.0,"184":0.0,"185":0.0,"186":0.0,"187":0.0,"188":0.0,"189":0.0,"190":0.0,"191":0.0,"192":0.0,"193":0.0,"194":0.0,"195":0.0,"196":0.0,"197":0.0,"198":0.0,"199":0.0,"200":0.0,"201":0.0,"202":0.0,"203":0.0,"204":0.0,"205":0.0,"206":0.0,"207":0.0,"208":0.0,"209":0.0,"210":0.0,"211":0.0,"212":0.0,"213":0.0,"214":0.0,"215":0.0,"216":0.0,"217":0.0,"218":0.0,"219":0.0,"220":0.0,"221":0.0,"222":0.0,"223":0.0,"224":0.0,"225":0.0,"226":0.0,"227":0.0,"228":0.0,"229":0.0,"230":0.0,"231":0.0,"232":0.0,"233":0.0,"234":0.0,"235":0.0,"236":0.0,"237":0.0,"238":0.0,"239":0.0,"240":0.0,"241":0.0,"242":0.0,"243":0.0,"244":0.0,"245":0.0,"246":0.0,"247":0.0,"248":0.0,"249":0.0,"250":0.0,"251":0.0,"252":0.0,"253":0.0,"254":0.0,"255":0.0,"256":0.0,"257":0.0,"258":0.0,"259":0.0,"260":0.0,"261":0.0,"262":0.0,"263":0.0,"264":0.0,"265":0.0,"266":0.0,"267":0.0,"268":0.0,"269":0.0,"270":0.0,"271":0.0,"272":0.0,"273":0.0,"274":0.0,"275":0.0,"276":0.0,"277":0.0,"278":0.0,"279":0.0,"280":0.0,"281":0.0,"282":0.0,"283":0.0,"284":0.0,"285":0.0,"286":0.0,"287":0.0,"288":0.0,"289":0.0,"290":0.0,"291":0.0,"292":0.0,"293":0.0,"294":0.0,"295":0.0,"296":0.0,"297":0.0,"298":0.0,"299":0.0,"300":0.0,"301":0.0,"302":0.0,"303":0.0,"304":0.0,"305":0.0,"306":0.0,"307":0.0,"308":0.0,"309":0.0,"310":0.0,"311":0.0,"312":0.0,"313":0.0,"314":0.0,"315":0.0,"316":0.0,"317":0.0,"318":0.0,"319":0.0,"320":0.0,"321":0.0,"322":0.0,"323":0.0,"324":0.0,"325":0.0,"326":0.0,"327":0.0,"328":0.0,"329":0.0,"330":0.0,"331":0.0,"332":0.0,"333":0.0,"334":0.0,"335":0.0,"336":0.0,"337":0.0,"338":0.0,"339":0.0,"340":0.0,"341":0.0,"342":0.0,"343":0.0,"344":0.0,"345":0.0,"346":0.0,"347":0.0,"348":0.0,"349":0.0,"350":0.0,"351":0.0,"352":0.0,"353":0.0,"354":0.0,"355":0.0,"356":0.0,"357":0.0,"358":0.0,"359":0.0,"360":0.0,"361":0.0,"362":0.0,"363":0.0,"364":0.0,"365":0.0,"366":0.0,"367":0.0,"368":0.0,"369":0.0,"370":0.0,"371":0.0,"372":0.0,"373":0.0,"374":0.0,"375":0.0,"376":0.0,"377":0.0,"378":0.0,"379":0.0,"380":0.0,"381":0.0,"382":0.0,"383":0.0,"384":0.0,"385":0.0,"386":0.0,"387":0.0,"388":0.0,"389":0.0,"390":0.0,"391":0.0,"392":0.0,"393":0.0,"394":0.0,"395":0.0,"396":0.0,"397":0.0,"398":0.0,"399":0.0,"400":0.0}} \ No newline at end of file diff --git a/tests/cases/results/result_pulsatileFlow_resistance.json b/tests/cases/results/result_pulsatileFlow_resistance.json new file mode 100644 index 000000000..eeef3f40a --- /dev/null +++ b/tests/cases/results/result_pulsatileFlow_resistance.json @@ -0,0 +1 @@ +{"name":{"0":"branch0_seg0","1":"branch0_seg0","2":"branch0_seg0","3":"branch0_seg0","4":"branch0_seg0","5":"branch0_seg0","6":"branch0_seg0","7":"branch0_seg0","8":"branch0_seg0","9":"branch0_seg0","10":"branch0_seg0","11":"branch0_seg0","12":"branch0_seg0","13":"branch0_seg0","14":"branch0_seg0","15":"branch0_seg0","16":"branch0_seg0","17":"branch0_seg0","18":"branch0_seg0","19":"branch0_seg0","20":"branch0_seg0","21":"branch0_seg0","22":"branch0_seg0","23":"branch0_seg0","24":"branch0_seg0","25":"branch0_seg0","26":"branch0_seg0","27":"branch0_seg0","28":"branch0_seg0","29":"branch0_seg0","30":"branch0_seg0","31":"branch0_seg0","32":"branch0_seg0","33":"branch0_seg0","34":"branch0_seg0","35":"branch0_seg0","36":"branch0_seg0","37":"branch0_seg0","38":"branch0_seg0","39":"branch0_seg0","40":"branch0_seg0","41":"branch0_seg0","42":"branch0_seg0","43":"branch0_seg0","44":"branch0_seg0","45":"branch0_seg0","46":"branch0_seg0","47":"branch0_seg0","48":"branch0_seg0","49":"branch0_seg0","50":"branch0_seg0","51":"branch0_seg0","52":"branch0_seg0","53":"branch0_seg0","54":"branch0_seg0","55":"branch0_seg0","56":"branch0_seg0","57":"branch0_seg0","58":"branch0_seg0","59":"branch0_seg0","60":"branch0_seg0","61":"branch0_seg0","62":"branch0_seg0","63":"branch0_seg0","64":"branch0_seg0","65":"branch0_seg0","66":"branch0_seg0","67":"branch0_seg0","68":"branch0_seg0","69":"branch0_seg0","70":"branch0_seg0","71":"branch0_seg0","72":"branch0_seg0","73":"branch0_seg0","74":"branch0_seg0","75":"branch0_seg0","76":"branch0_seg0","77":"branch0_seg0","78":"branch0_seg0","79":"branch0_seg0","80":"branch0_seg0","81":"branch0_seg0","82":"branch0_seg0","83":"branch0_seg0","84":"branch0_seg0","85":"branch0_seg0","86":"branch0_seg0","87":"branch0_seg0","88":"branch0_seg0","89":"branch0_seg0","90":"branch0_seg0","91":"branch0_seg0","92":"branch0_seg0","93":"branch0_seg0","94":"branch0_seg0","95":"branch0_seg0","96":"branch0_seg0","97":"branch0_seg0","98":"branch0_seg0","99":"branch0_seg0","100":"branch0_seg0","101":"branch0_seg0","102":"branch0_seg0","103":"branch0_seg0","104":"branch0_seg0","105":"branch0_seg0","106":"branch0_seg0","107":"branch0_seg0","108":"branch0_seg0","109":"branch0_seg0","110":"branch0_seg0","111":"branch0_seg0","112":"branch0_seg0","113":"branch0_seg0","114":"branch0_seg0","115":"branch0_seg0","116":"branch0_seg0","117":"branch0_seg0","118":"branch0_seg0","119":"branch0_seg0","120":"branch0_seg0","121":"branch0_seg0","122":"branch0_seg0","123":"branch0_seg0","124":"branch0_seg0","125":"branch0_seg0","126":"branch0_seg0","127":"branch0_seg0","128":"branch0_seg0","129":"branch0_seg0","130":"branch0_seg0","131":"branch0_seg0","132":"branch0_seg0","133":"branch0_seg0","134":"branch0_seg0","135":"branch0_seg0","136":"branch0_seg0","137":"branch0_seg0","138":"branch0_seg0","139":"branch0_seg0","140":"branch0_seg0","141":"branch0_seg0","142":"branch0_seg0","143":"branch0_seg0","144":"branch0_seg0","145":"branch0_seg0","146":"branch0_seg0","147":"branch0_seg0","148":"branch0_seg0","149":"branch0_seg0","150":"branch0_seg0","151":"branch0_seg0","152":"branch0_seg0","153":"branch0_seg0","154":"branch0_seg0","155":"branch0_seg0","156":"branch0_seg0","157":"branch0_seg0","158":"branch0_seg0","159":"branch0_seg0","160":"branch0_seg0","161":"branch0_seg0","162":"branch0_seg0","163":"branch0_seg0","164":"branch0_seg0","165":"branch0_seg0","166":"branch0_seg0","167":"branch0_seg0","168":"branch0_seg0","169":"branch0_seg0","170":"branch0_seg0","171":"branch0_seg0","172":"branch0_seg0","173":"branch0_seg0","174":"branch0_seg0","175":"branch0_seg0","176":"branch0_seg0","177":"branch0_seg0","178":"branch0_seg0","179":"branch0_seg0","180":"branch0_seg0","181":"branch0_seg0","182":"branch0_seg0","183":"branch0_seg0","184":"branch0_seg0","185":"branch0_seg0","186":"branch0_seg0","187":"branch0_seg0","188":"branch0_seg0","189":"branch0_seg0","190":"branch0_seg0","191":"branch0_seg0","192":"branch0_seg0","193":"branch0_seg0","194":"branch0_seg0","195":"branch0_seg0","196":"branch0_seg0","197":"branch0_seg0","198":"branch0_seg0","199":"branch0_seg0","200":"branch0_seg0","201":"branch0_seg0","202":"branch0_seg0","203":"branch0_seg0","204":"branch0_seg0","205":"branch0_seg0","206":"branch0_seg0","207":"branch0_seg0","208":"branch0_seg0","209":"branch0_seg0","210":"branch0_seg0","211":"branch0_seg0","212":"branch0_seg0","213":"branch0_seg0","214":"branch0_seg0","215":"branch0_seg0","216":"branch0_seg0","217":"branch0_seg0","218":"branch0_seg0","219":"branch0_seg0","220":"branch0_seg0","221":"branch0_seg0","222":"branch0_seg0","223":"branch0_seg0","224":"branch0_seg0","225":"branch0_seg0","226":"branch0_seg0","227":"branch0_seg0","228":"branch0_seg0","229":"branch0_seg0","230":"branch0_seg0","231":"branch0_seg0","232":"branch0_seg0","233":"branch0_seg0","234":"branch0_seg0","235":"branch0_seg0","236":"branch0_seg0","237":"branch0_seg0","238":"branch0_seg0","239":"branch0_seg0","240":"branch0_seg0","241":"branch0_seg0","242":"branch0_seg0","243":"branch0_seg0","244":"branch0_seg0","245":"branch0_seg0","246":"branch0_seg0","247":"branch0_seg0","248":"branch0_seg0","249":"branch0_seg0","250":"branch0_seg0","251":"branch0_seg0","252":"branch0_seg0","253":"branch0_seg0","254":"branch0_seg0","255":"branch0_seg0","256":"branch0_seg0","257":"branch0_seg0","258":"branch0_seg0","259":"branch0_seg0","260":"branch0_seg0","261":"branch0_seg0","262":"branch0_seg0","263":"branch0_seg0","264":"branch0_seg0","265":"branch0_seg0","266":"branch0_seg0","267":"branch0_seg0","268":"branch0_seg0","269":"branch0_seg0","270":"branch0_seg0","271":"branch0_seg0","272":"branch0_seg0","273":"branch0_seg0","274":"branch0_seg0","275":"branch0_seg0","276":"branch0_seg0","277":"branch0_seg0","278":"branch0_seg0","279":"branch0_seg0","280":"branch0_seg0","281":"branch0_seg0","282":"branch0_seg0","283":"branch0_seg0","284":"branch0_seg0","285":"branch0_seg0","286":"branch0_seg0","287":"branch0_seg0","288":"branch0_seg0","289":"branch0_seg0","290":"branch0_seg0","291":"branch0_seg0","292":"branch0_seg0","293":"branch0_seg0","294":"branch0_seg0","295":"branch0_seg0","296":"branch0_seg0","297":"branch0_seg0","298":"branch0_seg0","299":"branch0_seg0","300":"branch0_seg0","301":"branch0_seg0","302":"branch0_seg0","303":"branch0_seg0","304":"branch0_seg0","305":"branch0_seg0","306":"branch0_seg0","307":"branch0_seg0","308":"branch0_seg0","309":"branch0_seg0","310":"branch0_seg0","311":"branch0_seg0","312":"branch0_seg0","313":"branch0_seg0","314":"branch0_seg0","315":"branch0_seg0","316":"branch0_seg0","317":"branch0_seg0","318":"branch0_seg0","319":"branch0_seg0","320":"branch0_seg0","321":"branch0_seg0","322":"branch0_seg0","323":"branch0_seg0","324":"branch0_seg0","325":"branch0_seg0","326":"branch0_seg0","327":"branch0_seg0","328":"branch0_seg0","329":"branch0_seg0","330":"branch0_seg0","331":"branch0_seg0","332":"branch0_seg0","333":"branch0_seg0","334":"branch0_seg0","335":"branch0_seg0","336":"branch0_seg0","337":"branch0_seg0","338":"branch0_seg0","339":"branch0_seg0","340":"branch0_seg0","341":"branch0_seg0","342":"branch0_seg0","343":"branch0_seg0","344":"branch0_seg0","345":"branch0_seg0","346":"branch0_seg0","347":"branch0_seg0","348":"branch0_seg0","349":"branch0_seg0","350":"branch0_seg0","351":"branch0_seg0","352":"branch0_seg0","353":"branch0_seg0","354":"branch0_seg0","355":"branch0_seg0","356":"branch0_seg0","357":"branch0_seg0","358":"branch0_seg0","359":"branch0_seg0","360":"branch0_seg0","361":"branch0_seg0","362":"branch0_seg0","363":"branch0_seg0","364":"branch0_seg0","365":"branch0_seg0","366":"branch0_seg0","367":"branch0_seg0","368":"branch0_seg0","369":"branch0_seg0","370":"branch0_seg0","371":"branch0_seg0","372":"branch0_seg0","373":"branch0_seg0","374":"branch0_seg0","375":"branch0_seg0","376":"branch0_seg0","377":"branch0_seg0","378":"branch0_seg0","379":"branch0_seg0","380":"branch0_seg0","381":"branch0_seg0","382":"branch0_seg0","383":"branch0_seg0","384":"branch0_seg0","385":"branch0_seg0","386":"branch0_seg0","387":"branch0_seg0","388":"branch0_seg0","389":"branch0_seg0","390":"branch0_seg0","391":"branch0_seg0","392":"branch0_seg0","393":"branch0_seg0","394":"branch0_seg0","395":"branch0_seg0","396":"branch0_seg0","397":"branch0_seg0","398":"branch0_seg0","399":"branch0_seg0","400":"branch0_seg0"},"time":{"0":0.0,"1":0.005,"2":0.01,"3":0.015,"4":0.02,"5":0.025,"6":0.03,"7":0.035,"8":0.04,"9":0.045,"10":0.05,"11":0.055,"12":0.06,"13":0.065,"14":0.07,"15":0.075,"16":0.08,"17":0.085,"18":0.09,"19":0.095,"20":0.1,"21":0.105,"22":0.11,"23":0.115,"24":0.12,"25":0.125,"26":0.13,"27":0.135,"28":0.14,"29":0.145,"30":0.15,"31":0.155,"32":0.16,"33":0.165,"34":0.17,"35":0.175,"36":0.18,"37":0.185,"38":0.19,"39":0.195,"40":0.2,"41":0.205,"42":0.21,"43":0.215,"44":0.22,"45":0.225,"46":0.23,"47":0.235,"48":0.24,"49":0.245,"50":0.25,"51":0.255,"52":0.26,"53":0.265,"54":0.27,"55":0.275,"56":0.28,"57":0.285,"58":0.29,"59":0.295,"60":0.3,"61":0.305,"62":0.31,"63":0.315,"64":0.32,"65":0.325,"66":0.33,"67":0.335,"68":0.34,"69":0.345,"70":0.35,"71":0.355,"72":0.36,"73":0.365,"74":0.37,"75":0.375,"76":0.38,"77":0.385,"78":0.39,"79":0.395,"80":0.4,"81":0.405,"82":0.41,"83":0.415,"84":0.42,"85":0.425,"86":0.43,"87":0.435,"88":0.44,"89":0.445,"90":0.45,"91":0.455,"92":0.46,"93":0.465,"94":0.47,"95":0.475,"96":0.48,"97":0.485,"98":0.49,"99":0.495,"100":0.5,"101":0.505,"102":0.51,"103":0.515,"104":0.52,"105":0.525,"106":0.53,"107":0.535,"108":0.54,"109":0.545,"110":0.55,"111":0.555,"112":0.56,"113":0.565,"114":0.57,"115":0.575,"116":0.58,"117":0.585,"118":0.59,"119":0.595,"120":0.6,"121":0.605,"122":0.61,"123":0.615,"124":0.62,"125":0.625,"126":0.63,"127":0.635,"128":0.64,"129":0.645,"130":0.65,"131":0.655,"132":0.66,"133":0.665,"134":0.67,"135":0.675,"136":0.68,"137":0.685,"138":0.69,"139":0.695,"140":0.7,"141":0.705,"142":0.71,"143":0.715,"144":0.72,"145":0.725,"146":0.73,"147":0.735,"148":0.74,"149":0.745,"150":0.75,"151":0.755,"152":0.76,"153":0.765,"154":0.77,"155":0.775,"156":0.78,"157":0.785,"158":0.79,"159":0.795,"160":0.8,"161":0.805,"162":0.81,"163":0.815,"164":0.82,"165":0.825,"166":0.83,"167":0.835,"168":0.84,"169":0.845,"170":0.85,"171":0.855,"172":0.86,"173":0.865,"174":0.87,"175":0.875,"176":0.88,"177":0.885,"178":0.89,"179":0.895,"180":0.9,"181":0.905,"182":0.91,"183":0.915,"184":0.92,"185":0.925,"186":0.93,"187":0.935,"188":0.94,"189":0.945,"190":0.95,"191":0.955,"192":0.96,"193":0.965,"194":0.97,"195":0.975,"196":0.98,"197":0.985,"198":0.99,"199":0.995,"200":1.0,"201":1.005,"202":1.01,"203":1.015,"204":1.02,"205":1.025,"206":1.03,"207":1.035,"208":1.04,"209":1.045,"210":1.05,"211":1.055,"212":1.06,"213":1.065,"214":1.07,"215":1.075,"216":1.08,"217":1.085,"218":1.09,"219":1.095,"220":1.1,"221":1.105,"222":1.11,"223":1.115,"224":1.12,"225":1.125,"226":1.13,"227":1.135,"228":1.14,"229":1.145,"230":1.15,"231":1.155,"232":1.16,"233":1.165,"234":1.17,"235":1.175,"236":1.18,"237":1.185,"238":1.19,"239":1.195,"240":1.2,"241":1.205,"242":1.21,"243":1.215,"244":1.22,"245":1.225,"246":1.23,"247":1.235,"248":1.24,"249":1.245,"250":1.25,"251":1.255,"252":1.26,"253":1.265,"254":1.27,"255":1.275,"256":1.28,"257":1.285,"258":1.29,"259":1.295,"260":1.3,"261":1.305,"262":1.31,"263":1.315,"264":1.32,"265":1.325,"266":1.33,"267":1.335,"268":1.34,"269":1.345,"270":1.35,"271":1.355,"272":1.36,"273":1.365,"274":1.37,"275":1.375,"276":1.38,"277":1.385,"278":1.39,"279":1.395,"280":1.4,"281":1.405,"282":1.41,"283":1.415,"284":1.42,"285":1.425,"286":1.43,"287":1.435,"288":1.44,"289":1.445,"290":1.45,"291":1.455,"292":1.46,"293":1.465,"294":1.47,"295":1.475,"296":1.48,"297":1.485,"298":1.49,"299":1.495,"300":1.5,"301":1.505,"302":1.51,"303":1.515,"304":1.52,"305":1.525,"306":1.53,"307":1.535,"308":1.54,"309":1.545,"310":1.55,"311":1.555,"312":1.56,"313":1.565,"314":1.57,"315":1.575,"316":1.58,"317":1.585,"318":1.59,"319":1.595,"320":1.6,"321":1.605,"322":1.61,"323":1.615,"324":1.62,"325":1.625,"326":1.63,"327":1.635,"328":1.64,"329":1.645,"330":1.65,"331":1.655,"332":1.66,"333":1.665,"334":1.67,"335":1.675,"336":1.68,"337":1.685,"338":1.69,"339":1.695,"340":1.7,"341":1.705,"342":1.71,"343":1.715,"344":1.72,"345":1.725,"346":1.73,"347":1.735,"348":1.74,"349":1.745,"350":1.75,"351":1.755,"352":1.76,"353":1.765,"354":1.77,"355":1.775,"356":1.78,"357":1.785,"358":1.79,"359":1.795,"360":1.8,"361":1.805,"362":1.81,"363":1.815,"364":1.82,"365":1.825,"366":1.83,"367":1.835,"368":1.84,"369":1.845,"370":1.85,"371":1.855,"372":1.86,"373":1.865,"374":1.87,"375":1.875,"376":1.88,"377":1.885,"378":1.89,"379":1.895,"380":1.9,"381":1.905,"382":1.91,"383":1.915,"384":1.92,"385":1.925,"386":1.93,"387":1.935,"388":1.94,"389":1.945,"390":1.95,"391":1.955,"392":1.96,"393":1.965,"394":1.97,"395":1.975,"396":1.98,"397":1.985,"398":1.99,"399":1.995,"400":2.0},"flow_in":{"0":2.1999999918,"1":2.2784881535,"2":2.3569762968,"3":2.4351546924,"4":2.5133330834,"5":2.5908931854,"6":2.6684532863,"7":2.7450890023,"8":2.8217247179,"9":2.8971336019,"10":2.9725424859,"11":3.0464269338,"12":3.1203113817,"13":3.1923798053,"14":3.2644482289,"15":3.3344162071,"16":3.4043841853,"17":3.4719755864,"18":3.5395669874,"19":3.6045150591,"20":3.6694631307,"21":3.7315115526,"22":3.7935599744,"23":3.8524638696,"24":3.9113677648,"25":3.9668946667,"26":4.0224215686,"27":4.0743523377,"28":4.1262831069,"29":4.1744127964,"30":4.2225424859,"31":4.2666811498,"32":4.3108198138,"33":4.3507932569,"34":4.3907667001,"35":4.4264171656,"36":4.4620676312,"37":4.4932544229,"38":4.5244412147,"39":4.5510412527,"40":4.5776412907,"41":4.5995495968,"42":4.6214579028,"43":4.6385880148,"44":4.6557181268,"45":4.6680024401,"46":4.6802867533,"47":4.6876767872,"48":4.6950668211,"49":4.6975334105,"50":4.7,"51":4.6975334105,"52":4.6950668211,"53":4.6876767872,"54":4.6802867533,"55":4.6680024401,"56":4.6557181268,"57":4.6385880148,"58":4.6214579028,"59":4.5995495968,"60":4.5776412907,"61":4.5510412527,"62":4.5244412147,"63":4.4932544229,"64":4.4620676312,"65":4.4264171656,"66":4.3907667001,"67":4.3507932569,"68":4.3108198138,"69":4.2666811498,"70":4.2225424859,"71":4.1744127964,"72":4.1262831069,"73":4.0743523377,"74":4.0224215686,"75":3.9668946667,"76":3.9113677648,"77":3.8524638696,"78":3.7935599744,"79":3.7315115526,"80":3.6694631307,"81":3.6045150591,"82":3.5395669874,"83":3.4719755864,"84":3.4043841853,"85":3.3344162071,"86":3.2644482289,"87":3.1923798053,"88":3.1203113817,"89":3.0464269338,"90":2.9725424859,"91":2.8971336019,"92":2.8217247179,"93":2.7450890022,"94":2.6684532865,"95":2.5908931852,"96":2.5133330839,"97":2.4351546914,"98":2.3569762988,"99":2.2784881494,"100":2.2,"101":2.1215118506,"102":2.0430237012,"103":1.9648453086,"104":1.8866669161,"105":1.8091068148,"106":1.7315467135,"107":1.6549109978,"108":1.5782752821,"109":1.5028663981,"110":1.4274575141,"111":1.3535730662,"112":1.2796886183,"113":1.2076201947,"114":1.1355517711,"115":1.0655837929,"116":0.9956158147,"117":0.9280244136,"118":0.8604330126,"119":0.7954849409,"120":0.7305368693,"121":0.6684884474,"122":0.6064400256,"123":0.5475361304,"124":0.4886322352,"125":0.4331053333,"126":0.3775784314,"127":0.3256476623,"128":0.2737168931,"129":0.2255872036,"130":0.1774575141,"131":0.1333188502,"132":0.0891801862,"133":0.0492067431,"134":0.0092332999,"135":-0.0264171656,"136":-0.0620676312,"137":-0.0932544229,"138":-0.1244412147,"139":-0.1510412527,"140":-0.1776412907,"141":-0.1995495968,"142":-0.2214579028,"143":-0.2385880148,"144":-0.2557181268,"145":-0.2680024401,"146":-0.2802867533,"147":-0.2876767872,"148":-0.2950668211,"149":-0.2975334105,"150":-0.3,"151":-0.2975334105,"152":-0.2950668211,"153":-0.2876767872,"154":-0.2802867533,"155":-0.2680024401,"156":-0.2557181268,"157":-0.2385880148,"158":-0.2214579028,"159":-0.1995495968,"160":-0.1776412907,"161":-0.1510412527,"162":-0.1244412147,"163":-0.0932544229,"164":-0.0620676312,"165":-0.0264171656,"166":0.0092332999,"167":0.0492067431,"168":0.0891801862,"169":0.1333188502,"170":0.1774575141,"171":0.2255872036,"172":0.2737168931,"173":0.3256476623,"174":0.3775784314,"175":0.4331053333,"176":0.4886322352,"177":0.5475361304,"178":0.6064400256,"179":0.6684884474,"180":0.7305368693,"181":0.7954849409,"182":0.8604330126,"183":0.9280244136,"184":0.9956158147,"185":1.0655837929,"186":1.1355517711,"187":1.2076201947,"188":1.2796886183,"189":1.3535730662,"190":1.4274575141,"191":1.5028663981,"192":1.5782752821,"193":1.6549109978,"194":1.7315467135,"195":1.8091068148,"196":1.8866669161,"197":1.9648453086,"198":2.0430237012,"199":2.1215118506,"200":2.2,"201":2.2784881494,"202":2.3569762988,"203":2.4351546914,"204":2.5133330839,"205":2.5908931852,"206":2.6684532865,"207":2.7450890022,"208":2.8217247179,"209":2.8971336019,"210":2.9725424859,"211":3.0464269338,"212":3.1203113817,"213":3.1923798053,"214":3.2644482289,"215":3.3344162071,"216":3.4043841853,"217":3.4719755864,"218":3.5395669874,"219":3.6045150591,"220":3.6694631307,"221":3.7315115526,"222":3.7935599744,"223":3.8524638696,"224":3.9113677648,"225":3.9668946667,"226":4.0224215686,"227":4.0743523377,"228":4.1262831069,"229":4.1744127964,"230":4.2225424859,"231":4.2666811498,"232":4.3108198138,"233":4.3507932569,"234":4.3907667001,"235":4.4264171656,"236":4.4620676312,"237":4.4932544229,"238":4.5244412147,"239":4.5510412527,"240":4.5776412907,"241":4.5995495968,"242":4.6214579028,"243":4.6385880148,"244":4.6557181268,"245":4.6680024401,"246":4.6802867533,"247":4.6876767872,"248":4.6950668211,"249":4.6975334105,"250":4.7,"251":4.6975334105,"252":4.6950668211,"253":4.6876767872,"254":4.6802867533,"255":4.6680024401,"256":4.6557181268,"257":4.6385880148,"258":4.6214579028,"259":4.5995495968,"260":4.5776412907,"261":4.5510412527,"262":4.5244412147,"263":4.4932544229,"264":4.4620676312,"265":4.4264171656,"266":4.3907667001,"267":4.3507932569,"268":4.3108198138,"269":4.2666811498,"270":4.2225424859,"271":4.1744127964,"272":4.1262831069,"273":4.0743523377,"274":4.0224215686,"275":3.9668946667,"276":3.9113677648,"277":3.8524638696,"278":3.7935599744,"279":3.7315115526,"280":3.6694631307,"281":3.6045150591,"282":3.5395669874,"283":3.4719755864,"284":3.4043841853,"285":3.3344162071,"286":3.2644482289,"287":3.1923798053,"288":3.1203113817,"289":3.0464269338,"290":2.9725424859,"291":2.8971336019,"292":2.8217247179,"293":2.7450890022,"294":2.6684532865,"295":2.5908931852,"296":2.5133330839,"297":2.4351546914,"298":2.3569762988,"299":2.2784881494,"300":2.2,"301":2.1215118506,"302":2.0430237012,"303":1.9648453086,"304":1.8866669161,"305":1.8091068148,"306":1.7315467135,"307":1.6549109978,"308":1.5782752821,"309":1.5028663981,"310":1.4274575141,"311":1.3535730662,"312":1.2796886183,"313":1.2076201947,"314":1.1355517711,"315":1.0655837929,"316":0.9956158147,"317":0.9280244136,"318":0.8604330126,"319":0.7954849409,"320":0.7305368693,"321":0.6684884474,"322":0.6064400256,"323":0.5475361304,"324":0.4886322352,"325":0.4331053333,"326":0.3775784314,"327":0.3256476623,"328":0.2737168931,"329":0.2255872036,"330":0.1774575141,"331":0.1333188502,"332":0.0891801862,"333":0.0492067431,"334":0.0092332999,"335":-0.0264171656,"336":-0.0620676312,"337":-0.0932544229,"338":-0.1244412147,"339":-0.1510412527,"340":-0.1776412907,"341":-0.1995495968,"342":-0.2214579028,"343":-0.2385880148,"344":-0.2557181268,"345":-0.2680024401,"346":-0.2802867533,"347":-0.2876767872,"348":-0.2950668211,"349":-0.2975334105,"350":-0.3,"351":-0.2975334105,"352":-0.2950668211,"353":-0.2876767872,"354":-0.2802867533,"355":-0.2680024401,"356":-0.2557181268,"357":-0.2385880148,"358":-0.2214579028,"359":-0.1995495968,"360":-0.1776412907,"361":-0.1510412527,"362":-0.1244412147,"363":-0.0932544229,"364":-0.0620676312,"365":-0.0264171656,"366":0.0092332999,"367":0.0492067431,"368":0.0891801862,"369":0.1333188502,"370":0.1774575141,"371":0.2255872036,"372":0.2737168931,"373":0.3256476623,"374":0.3775784314,"375":0.4331053333,"376":0.4886322352,"377":0.5475361304,"378":0.6064400256,"379":0.6684884474,"380":0.7305368693,"381":0.7954849409,"382":0.8604330126,"383":0.9280244136,"384":0.9956158147,"385":1.0655837929,"386":1.1355517711,"387":1.2076201947,"388":1.2796886183,"389":1.3535730662,"390":1.4274575141,"391":1.5028663981,"392":1.5782752821,"393":1.6549109978,"394":1.7315467135,"395":1.8091068148,"396":1.8866669161,"397":1.9648453086,"398":2.0430237012,"399":2.1215118506,"400":2.2},"flow_out":{"0":2.1999999918,"1":2.2784881535,"2":2.3569762968,"3":2.4351546924,"4":2.5133330834,"5":2.5908931854,"6":2.6684532863,"7":2.7450890023,"8":2.8217247179,"9":2.8971336019,"10":2.9725424859,"11":3.0464269338,"12":3.1203113817,"13":3.1923798053,"14":3.2644482289,"15":3.3344162071,"16":3.4043841853,"17":3.4719755864,"18":3.5395669874,"19":3.6045150591,"20":3.6694631307,"21":3.7315115526,"22":3.7935599744,"23":3.8524638696,"24":3.9113677648,"25":3.9668946667,"26":4.0224215686,"27":4.0743523377,"28":4.1262831069,"29":4.1744127964,"30":4.2225424859,"31":4.2666811498,"32":4.3108198138,"33":4.3507932569,"34":4.3907667001,"35":4.4264171656,"36":4.4620676312,"37":4.4932544229,"38":4.5244412147,"39":4.5510412527,"40":4.5776412907,"41":4.5995495968,"42":4.6214579028,"43":4.6385880148,"44":4.6557181268,"45":4.6680024401,"46":4.6802867533,"47":4.6876767872,"48":4.6950668211,"49":4.6975334105,"50":4.7,"51":4.6975334105,"52":4.6950668211,"53":4.6876767872,"54":4.6802867533,"55":4.6680024401,"56":4.6557181268,"57":4.6385880148,"58":4.6214579028,"59":4.5995495968,"60":4.5776412907,"61":4.5510412527,"62":4.5244412147,"63":4.4932544229,"64":4.4620676312,"65":4.4264171656,"66":4.3907667001,"67":4.3507932569,"68":4.3108198138,"69":4.2666811498,"70":4.2225424859,"71":4.1744127964,"72":4.1262831069,"73":4.0743523377,"74":4.0224215686,"75":3.9668946667,"76":3.9113677648,"77":3.8524638696,"78":3.7935599744,"79":3.7315115526,"80":3.6694631307,"81":3.6045150591,"82":3.5395669874,"83":3.4719755864,"84":3.4043841853,"85":3.3344162071,"86":3.2644482289,"87":3.1923798053,"88":3.1203113817,"89":3.0464269338,"90":2.9725424859,"91":2.8971336019,"92":2.8217247179,"93":2.7450890022,"94":2.6684532865,"95":2.5908931852,"96":2.5133330839,"97":2.4351546914,"98":2.3569762988,"99":2.2784881494,"100":2.2,"101":2.1215118506,"102":2.0430237012,"103":1.9648453086,"104":1.8866669161,"105":1.8091068148,"106":1.7315467135,"107":1.6549109978,"108":1.5782752821,"109":1.5028663981,"110":1.4274575141,"111":1.3535730662,"112":1.2796886183,"113":1.2076201947,"114":1.1355517711,"115":1.0655837929,"116":0.9956158147,"117":0.9280244136,"118":0.8604330126,"119":0.7954849409,"120":0.7305368693,"121":0.6684884474,"122":0.6064400256,"123":0.5475361304,"124":0.4886322352,"125":0.4331053333,"126":0.3775784314,"127":0.3256476623,"128":0.2737168931,"129":0.2255872036,"130":0.1774575141,"131":0.1333188502,"132":0.0891801862,"133":0.0492067431,"134":0.0092332999,"135":-0.0264171656,"136":-0.0620676312,"137":-0.0932544229,"138":-0.1244412147,"139":-0.1510412527,"140":-0.1776412907,"141":-0.1995495968,"142":-0.2214579028,"143":-0.2385880148,"144":-0.2557181268,"145":-0.2680024401,"146":-0.2802867533,"147":-0.2876767872,"148":-0.2950668211,"149":-0.2975334105,"150":-0.3,"151":-0.2975334105,"152":-0.2950668211,"153":-0.2876767872,"154":-0.2802867533,"155":-0.2680024401,"156":-0.2557181268,"157":-0.2385880148,"158":-0.2214579028,"159":-0.1995495968,"160":-0.1776412907,"161":-0.1510412527,"162":-0.1244412147,"163":-0.0932544229,"164":-0.0620676312,"165":-0.0264171656,"166":0.0092332999,"167":0.0492067431,"168":0.0891801862,"169":0.1333188502,"170":0.1774575141,"171":0.2255872036,"172":0.2737168931,"173":0.3256476623,"174":0.3775784314,"175":0.4331053333,"176":0.4886322352,"177":0.5475361304,"178":0.6064400256,"179":0.6684884474,"180":0.7305368693,"181":0.7954849409,"182":0.8604330126,"183":0.9280244136,"184":0.9956158147,"185":1.0655837929,"186":1.1355517711,"187":1.2076201947,"188":1.2796886183,"189":1.3535730662,"190":1.4274575141,"191":1.5028663981,"192":1.5782752821,"193":1.6549109978,"194":1.7315467135,"195":1.8091068148,"196":1.8866669161,"197":1.9648453086,"198":2.0430237012,"199":2.1215118506,"200":2.2,"201":2.2784881494,"202":2.3569762988,"203":2.4351546914,"204":2.5133330839,"205":2.5908931852,"206":2.6684532865,"207":2.7450890022,"208":2.8217247179,"209":2.8971336019,"210":2.9725424859,"211":3.0464269338,"212":3.1203113817,"213":3.1923798053,"214":3.2644482289,"215":3.3344162071,"216":3.4043841853,"217":3.4719755864,"218":3.5395669874,"219":3.6045150591,"220":3.6694631307,"221":3.7315115526,"222":3.7935599744,"223":3.8524638696,"224":3.9113677648,"225":3.9668946667,"226":4.0224215686,"227":4.0743523377,"228":4.1262831069,"229":4.1744127964,"230":4.2225424859,"231":4.2666811498,"232":4.3108198138,"233":4.3507932569,"234":4.3907667001,"235":4.4264171656,"236":4.4620676312,"237":4.4932544229,"238":4.5244412147,"239":4.5510412527,"240":4.5776412907,"241":4.5995495968,"242":4.6214579028,"243":4.6385880148,"244":4.6557181268,"245":4.6680024401,"246":4.6802867533,"247":4.6876767872,"248":4.6950668211,"249":4.6975334105,"250":4.7,"251":4.6975334105,"252":4.6950668211,"253":4.6876767872,"254":4.6802867533,"255":4.6680024401,"256":4.6557181268,"257":4.6385880148,"258":4.6214579028,"259":4.5995495968,"260":4.5776412907,"261":4.5510412527,"262":4.5244412147,"263":4.4932544229,"264":4.4620676312,"265":4.4264171656,"266":4.3907667001,"267":4.3507932569,"268":4.3108198138,"269":4.2666811498,"270":4.2225424859,"271":4.1744127964,"272":4.1262831069,"273":4.0743523377,"274":4.0224215686,"275":3.9668946667,"276":3.9113677648,"277":3.8524638696,"278":3.7935599744,"279":3.7315115526,"280":3.6694631307,"281":3.6045150591,"282":3.5395669874,"283":3.4719755864,"284":3.4043841853,"285":3.3344162071,"286":3.2644482289,"287":3.1923798053,"288":3.1203113817,"289":3.0464269338,"290":2.9725424859,"291":2.8971336019,"292":2.8217247179,"293":2.7450890022,"294":2.6684532865,"295":2.5908931852,"296":2.5133330839,"297":2.4351546914,"298":2.3569762988,"299":2.2784881494,"300":2.2,"301":2.1215118506,"302":2.0430237012,"303":1.9648453086,"304":1.8866669161,"305":1.8091068148,"306":1.7315467135,"307":1.6549109978,"308":1.5782752821,"309":1.5028663981,"310":1.4274575141,"311":1.3535730662,"312":1.2796886183,"313":1.2076201947,"314":1.1355517711,"315":1.0655837929,"316":0.9956158147,"317":0.9280244136,"318":0.8604330126,"319":0.7954849409,"320":0.7305368693,"321":0.6684884474,"322":0.6064400256,"323":0.5475361304,"324":0.4886322352,"325":0.4331053333,"326":0.3775784314,"327":0.3256476623,"328":0.2737168931,"329":0.2255872036,"330":0.1774575141,"331":0.1333188502,"332":0.0891801862,"333":0.0492067431,"334":0.0092332999,"335":-0.0264171656,"336":-0.0620676312,"337":-0.0932544229,"338":-0.1244412147,"339":-0.1510412527,"340":-0.1776412907,"341":-0.1995495968,"342":-0.2214579028,"343":-0.2385880148,"344":-0.2557181268,"345":-0.2680024401,"346":-0.2802867533,"347":-0.2876767872,"348":-0.2950668211,"349":-0.2975334105,"350":-0.3,"351":-0.2975334105,"352":-0.2950668211,"353":-0.2876767872,"354":-0.2802867533,"355":-0.2680024401,"356":-0.2557181268,"357":-0.2385880148,"358":-0.2214579028,"359":-0.1995495968,"360":-0.1776412907,"361":-0.1510412527,"362":-0.1244412147,"363":-0.0932544229,"364":-0.0620676312,"365":-0.0264171656,"366":0.0092332999,"367":0.0492067431,"368":0.0891801862,"369":0.1333188502,"370":0.1774575141,"371":0.2255872036,"372":0.2737168931,"373":0.3256476623,"374":0.3775784314,"375":0.4331053333,"376":0.4886322352,"377":0.5475361304,"378":0.6064400256,"379":0.6684884474,"380":0.7305368693,"381":0.7954849409,"382":0.8604330126,"383":0.9280244136,"384":0.9956158147,"385":1.0655837929,"386":1.1355517711,"387":1.2076201947,"388":1.2796886183,"389":1.3535730662,"390":1.4274575141,"391":1.5028663981,"392":1.5782752821,"393":1.6549109978,"394":1.7315467135,"395":1.8091068148,"396":1.8866669161,"397":1.9648453086,"398":2.0430237012,"399":2.1215118506,"400":2.2},"pressure_in":{"0":219.9999991804,"1":227.8488153509,"2":235.6976296774,"3":243.5154692391,"4":251.3333083399,"5":259.0893185444,"6":266.8453286336,"7":274.5089002252,"8":282.172471788,"9":289.7133601941,"10":297.2542485929,"11":304.6426933829,"12":312.031138171,"13":319.2379805313,"14":326.4448228912,"15":333.4416207084,"16":340.4384185254,"17":347.1975586351,"18":353.9566987447,"19":360.4515059089,"20":366.9463130731,"21":373.1511552551,"22":379.3559974372,"23":385.2463869597,"24":391.1367764822,"25":396.6894666688,"26":402.2421568554,"27":407.4352337746,"28":412.6283106939,"29":417.4412796438,"30":422.2542485937,"31":426.6681149846,"32":431.0819813755,"33":435.0793256932,"34":439.076670011,"35":442.6417165637,"36":446.2067631165,"37":449.3254422943,"38":452.4441214721,"39":455.1041252729,"40":457.7641290738,"41":459.954959678,"42":462.1457902822,"43":463.8588014822,"44":465.5718126822,"45":466.8002440054,"46":468.0286753286,"47":468.7676787178,"48":469.5066821071,"49":469.7533410535,"50":470.0,"51":469.7533410535,"52":469.5066821071,"53":468.7676787178,"54":468.0286753286,"55":466.8002440054,"56":465.5718126822,"57":463.8588014822,"58":462.1457902822,"59":459.954959678,"60":457.7641290738,"61":455.1041252729,"62":452.4441214721,"63":449.3254422943,"64":446.2067631165,"65":442.6417165637,"66":439.076670011,"67":435.0793256932,"68":431.0819813755,"69":426.6681149846,"70":422.2542485937,"71":417.4412796438,"72":412.6283106939,"73":407.4352337746,"74":402.2421568554,"75":396.6894666688,"76":391.1367764822,"77":385.2463869597,"78":379.3559974372,"79":373.1511552551,"80":366.9463130731,"81":360.4515059089,"82":353.9566987447,"83":347.1975586351,"84":340.4384185254,"85":333.4416207083,"86":326.4448228913,"87":319.2379805312,"88":312.0311381712,"89":304.6426933825,"90":297.2542485937,"91":289.7133601925,"92":282.1724717912,"93":274.5089002188,"94":266.8453286464,"95":259.0893185188,"96":251.3333083911,"97":243.5154691367,"98":235.6976298823,"99":227.8488149412,"100":220.0,"101":212.1511850588,"102":204.3023701177,"103":196.4845308633,"104":188.6666916089,"105":180.9106814812,"106":173.1546713536,"107":165.4910997812,"108":157.8275282088,"109":150.2866398075,"110":142.7457514063,"111":135.3573066175,"112":127.9688618288,"113":120.7620194688,"114":113.5551771087,"115":106.5583792917,"116":99.5615814746,"117":92.8024413649,"118":86.0433012553,"119":79.5484940911,"120":73.0536869269,"121":66.8488447449,"122":60.6440025628,"123":54.7536130403,"124":48.8632235178,"125":43.3105333312,"126":37.7578431446,"127":32.5647662253,"128":27.3716893061,"129":22.5587203562,"130":17.7457514063,"131":13.3318850154,"132":8.9180186245,"133":4.9206743068,"134":0.923329989,"135":-2.6417165637,"136":-6.2067631165,"137":-9.3254422943,"138":-12.4441214721,"139":-15.1041252729,"140":-17.7641290738,"141":-19.954959678,"142":-22.1457902822,"143":-23.8588014822,"144":-25.5718126822,"145":-26.8002440054,"146":-28.0286753286,"147":-28.7676787178,"148":-29.5066821071,"149":-29.7533410535,"150":-30.0,"151":-29.7533410535,"152":-29.5066821071,"153":-28.7676787178,"154":-28.0286753286,"155":-26.8002440054,"156":-25.5718126822,"157":-23.8588014822,"158":-22.1457902822,"159":-19.954959678,"160":-17.7641290738,"161":-15.1041252729,"162":-12.4441214721,"163":-9.3254422943,"164":-6.2067631165,"165":-2.6417165637,"166":0.923329989,"167":4.9206743068,"168":8.9180186245,"169":13.3318850154,"170":17.7457514063,"171":22.5587203562,"172":27.3716893061,"173":32.5647662253,"174":37.7578431446,"175":43.3105333312,"176":48.8632235178,"177":54.7536130403,"178":60.6440025628,"179":66.8488447449,"180":73.0536869269,"181":79.5484940911,"182":86.0433012553,"183":92.8024413649,"184":99.5615814746,"185":106.5583792917,"186":113.5551771087,"187":120.7620194688,"188":127.9688618288,"189":135.3573066175,"190":142.7457514063,"191":150.2866398075,"192":157.8275282088,"193":165.4910997812,"194":173.1546713536,"195":180.9106814812,"196":188.6666916089,"197":196.4845308633,"198":204.3023701177,"199":212.1511850588,"200":220.0,"201":227.8488149412,"202":235.6976298823,"203":243.5154691367,"204":251.3333083911,"205":259.0893185188,"206":266.8453286464,"207":274.5089002188,"208":282.1724717912,"209":289.7133601925,"210":297.2542485937,"211":304.6426933825,"212":312.0311381712,"213":319.2379805312,"214":326.4448228913,"215":333.4416207083,"216":340.4384185254,"217":347.1975586351,"218":353.9566987447,"219":360.4515059089,"220":366.9463130731,"221":373.1511552551,"222":379.3559974372,"223":385.2463869597,"224":391.1367764822,"225":396.6894666688,"226":402.2421568554,"227":407.4352337747,"228":412.6283106939,"229":417.4412796438,"230":422.2542485937,"231":426.6681149846,"232":431.0819813755,"233":435.0793256932,"234":439.076670011,"235":442.6417165637,"236":446.2067631165,"237":449.3254422943,"238":452.4441214721,"239":455.1041252729,"240":457.7641290738,"241":459.954959678,"242":462.1457902822,"243":463.8588014822,"244":465.5718126822,"245":466.8002440054,"246":468.0286753286,"247":468.7676787178,"248":469.5066821071,"249":469.7533410535,"250":470.0,"251":469.7533410535,"252":469.5066821071,"253":468.7676787178,"254":468.0286753286,"255":466.8002440054,"256":465.5718126822,"257":463.8588014822,"258":462.1457902822,"259":459.954959678,"260":457.7641290738,"261":455.1041252729,"262":452.4441214721,"263":449.3254422943,"264":446.2067631165,"265":442.6417165637,"266":439.076670011,"267":435.0793256932,"268":431.0819813755,"269":426.6681149846,"270":422.2542485937,"271":417.4412796438,"272":412.6283106939,"273":407.4352337746,"274":402.2421568554,"275":396.6894666688,"276":391.1367764822,"277":385.2463869597,"278":379.3559974372,"279":373.1511552551,"280":366.9463130731,"281":360.4515059089,"282":353.9566987447,"283":347.1975586351,"284":340.4384185254,"285":333.4416207083,"286":326.4448228913,"287":319.2379805312,"288":312.0311381712,"289":304.6426933825,"290":297.2542485937,"291":289.7133601925,"292":282.1724717912,"293":274.5089002188,"294":266.8453286464,"295":259.0893185188,"296":251.3333083911,"297":243.5154691367,"298":235.6976298823,"299":227.8488149412,"300":220.0,"301":212.1511850588,"302":204.3023701177,"303":196.4845308633,"304":188.6666916089,"305":180.9106814812,"306":173.1546713536,"307":165.4910997812,"308":157.8275282088,"309":150.2866398075,"310":142.7457514063,"311":135.3573066175,"312":127.9688618288,"313":120.7620194688,"314":113.5551771087,"315":106.5583792917,"316":99.5615814746,"317":92.8024413649,"318":86.0433012553,"319":79.5484940911,"320":73.0536869269,"321":66.8488447449,"322":60.6440025628,"323":54.7536130403,"324":48.8632235178,"325":43.3105333312,"326":37.7578431446,"327":32.5647662253,"328":27.3716893061,"329":22.5587203562,"330":17.7457514063,"331":13.3318850154,"332":8.9180186245,"333":4.9206743068,"334":0.923329989,"335":-2.6417165637,"336":-6.2067631165,"337":-9.3254422943,"338":-12.4441214721,"339":-15.1041252729,"340":-17.7641290738,"341":-19.954959678,"342":-22.1457902822,"343":-23.8588014822,"344":-25.5718126822,"345":-26.8002440054,"346":-28.0286753286,"347":-28.7676787178,"348":-29.5066821071,"349":-29.7533410535,"350":-30.0,"351":-29.7533410535,"352":-29.5066821071,"353":-28.7676787178,"354":-28.0286753286,"355":-26.8002440054,"356":-25.5718126822,"357":-23.8588014822,"358":-22.1457902822,"359":-19.954959678,"360":-17.7641290738,"361":-15.1041252729,"362":-12.4441214721,"363":-9.3254422943,"364":-6.2067631165,"365":-2.6417165637,"366":0.923329989,"367":4.9206743068,"368":8.9180186245,"369":13.3318850154,"370":17.7457514063,"371":22.5587203562,"372":27.3716893061,"373":32.5647662254,"374":37.7578431446,"375":43.3105333312,"376":48.8632235178,"377":54.7536130403,"378":60.6440025628,"379":66.8488447449,"380":73.0536869269,"381":79.5484940911,"382":86.0433012553,"383":92.8024413649,"384":99.5615814746,"385":106.5583792917,"386":113.5551771087,"387":120.7620194688,"388":127.9688618288,"389":135.3573066175,"390":142.7457514063,"391":150.2866398075,"392":157.8275282088,"393":165.4910997812,"394":173.1546713536,"395":180.9106814812,"396":188.6666916089,"397":196.4845308633,"398":204.3023701177,"399":212.1511850588,"400":220.0},"pressure_out":{"0":0.0,"1":0.0,"2":0.0,"3":0.0,"4":0.0,"5":0.0,"6":0.0,"7":0.0,"8":0.0,"9":0.0,"10":0.0,"11":0.0,"12":0.0,"13":0.0,"14":0.0,"15":0.0,"16":0.0,"17":0.0,"18":0.0,"19":0.0,"20":0.0,"21":0.0,"22":0.0,"23":0.0,"24":0.0,"25":0.0,"26":0.0,"27":0.0,"28":0.0,"29":0.0,"30":0.0,"31":0.0,"32":0.0,"33":0.0,"34":0.0,"35":0.0,"36":0.0,"37":0.0,"38":0.0,"39":0.0,"40":0.0,"41":0.0,"42":0.0,"43":0.0,"44":0.0,"45":0.0,"46":0.0,"47":0.0,"48":0.0,"49":0.0,"50":0.0,"51":0.0,"52":0.0,"53":0.0,"54":0.0,"55":0.0,"56":0.0,"57":0.0,"58":0.0,"59":0.0,"60":0.0,"61":0.0,"62":0.0,"63":0.0,"64":0.0,"65":0.0,"66":0.0,"67":0.0,"68":0.0,"69":0.0,"70":0.0,"71":0.0,"72":0.0,"73":0.0,"74":0.0,"75":0.0,"76":0.0,"77":0.0,"78":0.0,"79":0.0,"80":0.0,"81":0.0,"82":0.0,"83":0.0,"84":0.0,"85":0.0,"86":0.0,"87":0.0,"88":0.0,"89":0.0,"90":0.0,"91":0.0,"92":0.0,"93":0.0,"94":0.0,"95":0.0,"96":0.0,"97":0.0,"98":0.0,"99":0.0,"100":0.0,"101":0.0,"102":0.0,"103":0.0,"104":0.0,"105":0.0,"106":0.0,"107":0.0,"108":0.0,"109":0.0,"110":0.0,"111":0.0,"112":0.0,"113":0.0,"114":0.0,"115":0.0,"116":0.0,"117":0.0,"118":0.0,"119":0.0,"120":0.0,"121":0.0,"122":0.0,"123":0.0,"124":0.0,"125":0.0,"126":0.0,"127":0.0,"128":0.0,"129":0.0,"130":0.0,"131":0.0,"132":0.0,"133":0.0,"134":0.0,"135":0.0,"136":0.0,"137":0.0,"138":0.0,"139":0.0,"140":0.0,"141":0.0,"142":0.0,"143":0.0,"144":0.0,"145":0.0,"146":0.0,"147":0.0,"148":0.0,"149":0.0,"150":0.0,"151":0.0,"152":0.0,"153":0.0,"154":0.0,"155":0.0,"156":0.0,"157":0.0,"158":0.0,"159":0.0,"160":0.0,"161":0.0,"162":0.0,"163":0.0,"164":0.0,"165":0.0,"166":0.0,"167":0.0,"168":0.0,"169":0.0,"170":0.0,"171":0.0,"172":0.0,"173":0.0,"174":0.0,"175":0.0,"176":0.0,"177":0.0,"178":0.0,"179":0.0,"180":0.0,"181":0.0,"182":0.0,"183":0.0,"184":0.0,"185":0.0,"186":0.0,"187":0.0,"188":0.0,"189":0.0,"190":0.0,"191":0.0,"192":0.0,"193":0.0,"194":0.0,"195":0.0,"196":0.0,"197":0.0,"198":0.0,"199":0.0,"200":0.0,"201":0.0,"202":0.0,"203":0.0,"204":0.0,"205":0.0,"206":0.0,"207":0.0,"208":0.0,"209":0.0,"210":0.0,"211":0.0,"212":0.0,"213":0.0,"214":0.0,"215":0.0,"216":0.0,"217":0.0,"218":0.0,"219":0.0,"220":0.0,"221":0.0,"222":0.0,"223":0.0,"224":0.0,"225":0.0,"226":0.0,"227":0.0,"228":0.0,"229":0.0,"230":0.0,"231":0.0,"232":0.0,"233":0.0,"234":0.0,"235":0.0,"236":0.0,"237":0.0,"238":0.0,"239":0.0,"240":0.0,"241":0.0,"242":0.0,"243":0.0,"244":0.0,"245":0.0,"246":0.0,"247":0.0,"248":0.0,"249":0.0,"250":0.0,"251":0.0,"252":0.0,"253":0.0,"254":0.0,"255":0.0,"256":0.0,"257":0.0,"258":0.0,"259":0.0,"260":0.0,"261":0.0,"262":0.0,"263":0.0,"264":0.0,"265":0.0,"266":0.0,"267":0.0,"268":0.0,"269":0.0,"270":0.0,"271":0.0,"272":0.0,"273":0.0,"274":0.0,"275":0.0,"276":0.0,"277":0.0,"278":0.0,"279":0.0,"280":0.0,"281":0.0,"282":0.0,"283":0.0,"284":0.0,"285":0.0,"286":0.0,"287":0.0,"288":0.0,"289":0.0,"290":0.0,"291":0.0,"292":0.0,"293":0.0,"294":0.0,"295":0.0,"296":0.0,"297":0.0,"298":0.0,"299":0.0,"300":0.0,"301":0.0,"302":0.0,"303":0.0,"304":0.0,"305":0.0,"306":0.0,"307":0.0,"308":0.0,"309":0.0,"310":0.0,"311":0.0,"312":0.0,"313":0.0,"314":0.0,"315":0.0,"316":0.0,"317":0.0,"318":0.0,"319":0.0,"320":0.0,"321":0.0,"322":0.0,"323":0.0,"324":0.0,"325":0.0,"326":0.0,"327":0.0,"328":0.0,"329":0.0,"330":0.0,"331":0.0,"332":0.0,"333":0.0,"334":0.0,"335":0.0,"336":0.0,"337":0.0,"338":0.0,"339":0.0,"340":0.0,"341":0.0,"342":0.0,"343":0.0,"344":0.0,"345":0.0,"346":0.0,"347":0.0,"348":0.0,"349":0.0,"350":0.0,"351":0.0,"352":0.0,"353":0.0,"354":0.0,"355":0.0,"356":0.0,"357":0.0,"358":0.0,"359":0.0,"360":0.0,"361":0.0,"362":0.0,"363":0.0,"364":0.0,"365":0.0,"366":0.0,"367":0.0,"368":0.0,"369":0.0,"370":0.0,"371":0.0,"372":0.0,"373":0.0,"374":0.0,"375":0.0,"376":0.0,"377":0.0,"378":0.0,"379":0.0,"380":0.0,"381":0.0,"382":0.0,"383":0.0,"384":0.0,"385":0.0,"386":0.0,"387":0.0,"388":0.0,"389":0.0,"390":0.0,"391":0.0,"392":0.0,"393":0.0,"394":0.0,"395":0.0,"396":0.0,"397":0.0,"398":0.0,"399":0.0,"400":0.0}} \ No newline at end of file diff --git a/tests/compute_ref_sol.py b/tests/compute_ref_sol.py index e8369f889..7eaea3459 100644 --- a/tests/compute_ref_sol.py +++ b/tests/compute_ref_sol.py @@ -1,6 +1,7 @@ import os import json import pysvzerod +import argparse def compute_ref_sol(testname): ''' @@ -8,17 +9,11 @@ def compute_ref_sol(testname): :param testname: name of the test case json to compute reference solution for ''' - - # testfiles = [f for f in os.listdir('tests/cases') if os.path.isfile(os.path.join('tests/cases', f))] - - # we only want to test the solver, not the calibrator - # testfiles.remove("steadyFlow_calibration.json") - # compute result - result = pysvzerod.simulate(json.load(open(os.path.join('tests/cases', testname)))) + result = pysvzerod.simulate(json.load(open(os.path.join('cases', testname)))) # save result - result_filename = os.path.join('tests/cases/results', 'result_' + testname) + result_filename = os.path.join('cases', 'results', 'result_' + testname) # save to json with open(result_filename, 'w') as f: @@ -26,4 +21,9 @@ def compute_ref_sol(testname): # print for confirmation print(f'Reference solution for test case {testname} computed and saved to {result_filename}. Please verify that the results are as expected.') - \ No newline at end of file + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description='Compute reference solution for a test case') + parser.add_argument('testname', help='name of the test case json file') + args = parser.parse_args() + compute_ref_sol(args.testname) \ No newline at end of file diff --git a/tests/test_solver.py b/tests/test_solver.py index f5db79329..8fb69e446 100644 --- a/tests/test_solver.py +++ b/tests/test_solver.py @@ -41,7 +41,10 @@ 'steadyFlow_blood_vessel_junction.json', 'valve_tanh.json', 'pulsatileFlow_bifurcationR_RCR_cycle_error.json', - 'pulsatileFlow_R_RCR_mean_derivative_variable.json' + 'pulsatileFlow_R_RCR_mean_derivative_variable.json', + 'pulsatileFlow_resistance.json', + 'pulsatileFlow_capacitance.json', + 'pulsatileFlow_inductance.json' ]) def test_solver(testfile): '''