diff --git a/src/model/BloodVessel.h b/src/model/BloodVessel.h index b2e029e43..fcf9a398d 100644 --- a/src/model/BloodVessel.h +++ b/src/model/BloodVessel.h @@ -112,6 +112,23 @@ * * `2` Inductance * * `3` Stenosis coefficient * + * ### Usage in json configuration file + * + * "vessels": [ + * { + * "vessel_id": 0, + * "vessel_length": 10.0, + * "vessel_name": "branch0_seg0", + * "zero_d_element_type": "BloodVessel", + * "zero_d_element_values": { + * "R_poiseuille": 100.0, + * "C": 1.0e-5, + * "L": 1.0e-6, + * "stenosis_coefficient": 0.0 + * } + * } + * ] + * * ### Internal variables * * This block has no internal variables. diff --git a/src/model/BloodVesselJunction.h b/src/model/BloodVesselJunction.h index 8e4bfa893..7d4025c03 100644 --- a/src/model/BloodVesselJunction.h +++ b/src/model/BloodVesselJunction.h @@ -113,6 +113,40 @@ * * `i+num_outlets` Inductance for inner blood vessel `i` * * `i+2*num_outlets` Stenosis coefficient for inner blood vessel `i` * + * ### Usage in json configuration file + * + * "junctions": [ + * { + * "inlet_vessels": [ + * 0 + * ], + * "junction_name": "J0", + * "junction_type": "BloodVesselJunction", + * "junction_values": { + * "R_poiseuille": [ + * 100, + * 200 + * ], + * "C": [ + * 0.0, + * 0.0 + * ], + * "L": [ + * 0.0, + * 0.0 + * ], + * "stenosis_coefficient": [ + * 0.0, + * 0.0 + * ] + * }, + * "outlet_vessels": [ + * 1, + * 2 + * ] + * } + * ] + * * ### Internal variables * * This block has no internal variables. diff --git a/src/model/ChamberElastanceInductor.h b/src/model/ChamberElastanceInductor.h index 7e398281c..527947cc7 100644 --- a/src/model/ChamberElastanceInductor.h +++ b/src/model/ChamberElastanceInductor.h @@ -109,6 +109,27 @@ * * `5` t_twitch: Twitch time * * `6` Impedance: Impedance of the outflow * + * ### Usage in json configuration file + * + * "chambers": [ + * { + * "type": "ChamberElastanceInductor", + * "name": "ventricle", + * "values": { + * "Emax": 1.057, + * "Emin": 0.091, + * "Vrd": 26.1, + * "Vrs": 18.0, + * "t_active": 0.2, + * "t_twitch": 0.3, + * "Impedance": 0.000351787 + * } + * } + * ], + * "initial_condition": { + * "Vc:ventricle": 96.07 + * } + * * ### Internal variables * * Names of internal variables in this block's output: @@ -119,7 +140,7 @@ class ChamberElastanceInductor : public Block { public: /** - * @brief Construct a new BloodVessel object + * @brief Construct a new ChamberElastanceInductor object * * @param id Global ID of the block * @param model The model to which the block belongs diff --git a/src/model/ChamberSphere.h b/src/model/ChamberSphere.h index 734220d94..b5d460f77 100644 --- a/src/model/ChamberSphere.h +++ b/src/model/ChamberSphere.h @@ -93,6 +93,32 @@ * * `tdias` - Diastole timing parameter \f$t_\text{dias}\f$ * * `steepness` - Activation steepness parameter \f$\gamma\f$ * + * ### Usage in json configuration file + * + * "vessels": [ + * { + * "boundary_conditions": {}, + * "vessel_id": 1, + * "vessel_length": 1.0, + * "vessel_name": "ventricle", + * "zero_d_element_type": "ChamberSphere", + * "zero_d_element_values": { + * "rho" : 1e3, + * "thick0" : 0.01, + * "radius0" : 0.05, + * "W1" : 10e3, + * "W2" : 40, + * "eta" : 10.0, + * "sigma_max" : 185e3, + * "alpha_max": 30.0, + * "alpha_min": -30.0, + * "tsys": 0.170, + * "tdias": 0.484, + * "steepness": 0.005 + * } + * } + * ] + * * ### Internal variables * * Names of internal variables in this block's output: diff --git a/src/model/ClosedLoopCoronaryLeftBC.h b/src/model/ClosedLoopCoronaryLeftBC.h index 6830d0c4f..64a95eddd 100644 --- a/src/model/ClosedLoopCoronaryLeftBC.h +++ b/src/model/ClosedLoopCoronaryLeftBC.h @@ -12,6 +12,22 @@ /** * @brief Left side of closed loop coronary boundary condition * ClosedLoopCoronaryBC. + * + * ### Usage in json configuration file + * + * "boundary_conditions": [ + * { + * "bc_name": "LCA", + * "bc_type": "ClosedLoopCoronaryLeft", + * "bc_values": { + * "Ra": 9.307638231, + * "Ram": 15.124912126, + * "Rv": 33.270958757, + * "Cim": 0.003737025, + * "Ca": 0.000552427 + * } + * } + * ] */ class ClosedLoopCoronaryLeftBC : public ClosedLoopCoronaryBC { public: diff --git a/src/model/ClosedLoopCoronaryRightBC.h b/src/model/ClosedLoopCoronaryRightBC.h index f49457f73..5ec94b13c 100644 --- a/src/model/ClosedLoopCoronaryRightBC.h +++ b/src/model/ClosedLoopCoronaryRightBC.h @@ -12,6 +12,22 @@ /** * @brief Right side of closed loop coronary boundary condition * ClosedLoopCoronaryBC. + * + * ### Usage in json configuration file + * + * "boundary_conditions": [ + * { + * "bc_name": "RCA", + * "bc_type": "ClosedLoopCoronaryRight", + * "bc_values": { + * "Ra": 5.757416349, + * "Ram": 9.355801566, + * "Rv": 20.580381989, + * "Cim": 0.003463134, + * "Ca": 0.001055957 + * } + * } + * ] */ class ClosedLoopCoronaryRightBC : public ClosedLoopCoronaryBC { public: diff --git a/src/model/ClosedLoopHeartPulmonary.h b/src/model/ClosedLoopHeartPulmonary.h index a775c6301..dd9e8841a 100644 --- a/src/model/ClosedLoopHeartPulmonary.h +++ b/src/model/ClosedLoopHeartPulmonary.h @@ -59,6 +59,54 @@ * * `25` Right atrium resting volume * * `26` Left atrium resting volume * + * ### Usage in json configuration file + * + * "closed_loop_blocks": [ + * { + * "outlet_blocks": [ + * "branch0_seg0" + * ], + * "closed_loop_type": "ClosedLoopHeartAndPulmonary", + * "cardiac_cycle_period": 1.0169, + * "parameters": { + * "Tsa": 0.40742, + * "tpwave": 8.976868, + * "Erv_s": 2.125279, + * "Elv_s": 3.125202, + * "iml": 0.509365, + * "imr": 0.806369, + * "Lrv_a": 0.000186865, + * "Rrv_a": 0.035061704, + * "Lra_v": 0.000217032, + * "Rra_v": 0.007887459, + * "Lla_v": 0.000351787, + * "Rla_v": 0.005310825, + * "Rlv_ao": 0.034320234, + * "Llv_a": 0.000110776, + * "Vrv_u": 9.424629, + * "Vlv_u": 5.606007, + * "Rpd": 0.098865401, + * "Cp": 1.090989, + * "Cpa": 0.556854, + * "Kxp_ra": 9.22244, + * "Kxv_ra": 0.004837, + * "Emax_ra": 0.208858, + * "Vaso_ra": 4.848742, + * "Kxp_la": 9.194992, + * "Kxv_la": 0.008067, + * "Emax_la": 0.303119, + * "Vaso_la": 9.355754 + * } + * } + * ], + * "initial_condition": { + * "V_RA:CLH": 38.43, + * "V_RV:CLH": 96.07, + * "V_LA:CLH": 38.43, + * "V_LV:CLH": 96.07, + * "P_pul:CLH": 8.0 + * } + * * ### Internal variables * * Names of internal variables in this block's output: diff --git a/src/model/ClosedLoopRCRBC.h b/src/model/ClosedLoopRCRBC.h index 5d46866f5..d6c4929e4 100644 --- a/src/model/ClosedLoopRCRBC.h +++ b/src/model/ClosedLoopRCRBC.h @@ -82,6 +82,22 @@ * * `1` Capacitance * * `2` Distal resistance * + * ### Usage in json configuration file + * + * "boundary_conditions": [ + * { + * "bc_name": "RCR_aorta", + * "bc_type": "ClosedLoopRCR", + * "bc_values": { + * "_comment_": "R_total = 1.570879*0.948914 = 1.490629075, Rp = + * 0.09*R_total, Rd = 0.91*R_total, C = 0.228215*1.044637", "Rp": 0.134156617, + * "Rd": 1.356472458, + * "C": 0.238401833, + * "closed_loop_outlet": true + * } + * } + * ] + * * ### Internal variables * * Names of internal variables in this block's output: diff --git a/src/model/FlowReferenceBC.h b/src/model/FlowReferenceBC.h index e5c702228..f626c710e 100644 --- a/src/model/FlowReferenceBC.h +++ b/src/model/FlowReferenceBC.h @@ -50,6 +50,25 @@ * * * `0` Flow * + * ### Usage in json configuration file + * + * "boundary_conditions": [ + * { + * "bc_name": "INFLOW", + * "bc_type": "FLOW", + * "bc_values": { + * "Q": [ + * 5.0, + * 5.0 + * ], + * "t": [ + * 0.0, + * 1.0 + * ] + * } + * } + * ] + * * ### Internal variables * * This block has no internal variables. diff --git a/src/model/Junction.h b/src/model/Junction.h index d8b7b0deb..ea82b4d97 100644 --- a/src/model/Junction.h +++ b/src/model/Junction.h @@ -63,6 +63,22 @@ * \underbrace{1}_{P_i} & \dots & \underbrace{1}_{P_j} & \dots\end{array}\right] * \quad \mathrm{with} \quad i \neq j \f] * + * ### Usage in json configuration file + * + * "junctions": [ + * { + * "inlet_vessels": [ + * 0 + * ], + * "junction_name": "J0", + * "junction_type": "NORMAL_JUNCTION", + * "outlet_vessels": [ + * 1, + * 2 + * ] + * } + * ] + * * ### Internal variables * * This block has no internal variables. diff --git a/src/model/OpenLoopCoronaryBC.h b/src/model/OpenLoopCoronaryBC.h index ba710dca3..bb0b772eb 100644 --- a/src/model/OpenLoopCoronaryBC.h +++ b/src/model/OpenLoopCoronaryBC.h @@ -80,6 +80,31 @@ * * `5` Pim: Intramyocardial pressure * * `6` Pv: Venous pressure * + * ### Usage in json configuration file + * + * "boundary_conditions": [ + * { + * "bc_name": "OUT", + * "bc_type": "CORONARY", + * "bc_values": { + * "Ca": 0.0001, + * "Cc": 0.0001, + * "Pim": [ + * 1000.0, + * 1000.0 + * ], + * "P_v": 0.0, + * "Ra1": 100.0, + * "Ra2": 100.0, + * "Rv1": 100.0, + * "t": [ + * 0.0, + * 1.0 + * ] + * } + * } + * ] + * * ### Internal variables * * Names of internal variables in this block's output: diff --git a/src/model/PressureReferenceBC.h b/src/model/PressureReferenceBC.h index 19bbe5373..7a5bda0e6 100644 --- a/src/model/PressureReferenceBC.h +++ b/src/model/PressureReferenceBC.h @@ -51,6 +51,25 @@ * * * `0` Pressure * + * ### Usage in json configuration file + * + * "boundary_conditions": [ + * { + * "bc_name": "OUT", + * "bc_type": "PRESSURE", + * "bc_values": { + * "P": [ + * 1000.0, + * 1000.0 + * ], + * "t": [ + * 0.0, + * 1.0 + * ] + * } + * } + * ] + * * ### Internal variables * * This block has no internal variables. diff --git a/src/model/ResistanceBC.h b/src/model/ResistanceBC.h index f8b56d6cc..d985816b2 100644 --- a/src/model/ResistanceBC.h +++ b/src/model/ResistanceBC.h @@ -50,6 +50,19 @@ * * `0` Resistance * * `1` Distal pressure * + * ### Usage in json configuration file + * + * "boundary_conditions": [ + * { + * "bc_name": "OUT", + * "bc_type": "RESISTANCE", + * "bc_values": { + * "R": 100.0, + * "Pd": 1000.0 + * } + * } + * ] + * * ### Internal variables * * This block has no internal variables. diff --git a/src/model/ValveTanh.h b/src/model/ValveTanh.h index 92a963920..a7820eae3 100644 --- a/src/model/ValveTanh.h +++ b/src/model/ValveTanh.h @@ -102,6 +102,22 @@ * * `3` upstream_block: Name of block connected upstream * * `4` downstream_block: Name of block connected downstream * + * ### Usage in json configuration file + * + * "valves": [ + * { + * "type": "ValveTanh", + * "name": "valve", + * "params": { + * "Rmax": 100000.0, + * "Rmin": 100.0, + * "Steepness": 100.0, + * "upstream_block": "upstream_vessel", + * "downstream_block": "downstream_vessel" + * } + * } + * ] + * * ### Internal variables * * This block has no internal variables. diff --git a/src/model/WindkesselBC.h b/src/model/WindkesselBC.h index 435450a56..3477b00da 100644 --- a/src/model/WindkesselBC.h +++ b/src/model/WindkesselBC.h @@ -76,6 +76,21 @@ * * `2` Distal resistance * * `3` Distal pressure * + * ### Usage in json configuration file + * + * "boundary_conditions": [ + * { + * "bc_name": "OUT", + * "bc_type": "RCR", + * "bc_values": { + * "C": 0.0001, + * "Pd": 0.0, + * "Rd": 1000.0, + * "Rp": 1000.0 + * } + * } + * ] + * * ### Internal variables * * Names of internal variables in this block's output: diff --git a/src/solve/SimulationParameters.h b/src/solve/SimulationParameters.h index 8b2345246..512a5aaac 100644 --- a/src/solve/SimulationParameters.h +++ b/src/solve/SimulationParameters.h @@ -19,6 +19,20 @@ /** * @brief Simulation parameters * + * Each of these can be set from the .json configuration file as part of the + * dict which is keyed by "simulation_parameters". + * + * For example: + * + * "simulation_parameters": { + * "number_of_cardiac_cycles": 30, + * "number_of_time_pts_per_cardiac_cycle": 201, + * "output_all_cycles": true + * } + * + * each parameter in the documentation may be specified using the attribute name + * and a value which takes the type of the attribute. + * */ struct SimulationParameters { // Negative value indicates this has not