Composition Tests

Cycle Tests

test_in_series_with_no_arguments_gives_an_empty_graph_and_funcs

test_in_series_two_components_creates_a_graph_with_known_edges

test_in_series_cyclic_for_3_calculations_has_the_right_edges

test_in_parallel_of_with_no_comps_gives_empty_graph_and_funcs

test_in_parallel_for_two_paths_with_a_comp_each_has_correct_edges

test_kirchhoffify_of_empty_graphs_makes_empty_graph_and_funcs

test_kirchhoffify_w_2_hydraulic_comps_and_empty_graph_sets_comps_edges_correctly

test_kirchhoffify_given_inertial_components_and_regular_kirchoff_throws

test_kirchhoffify_w_inertial_comps_adds_mdot_and_mdot2

test_kirchhoffify_one_junction_connects_k_to_junction_but_not_vice_versa

test_kirchhoffify_with_ref_mdots_gives_them_the_right_comps_by_example

test_flow_edge_example

test_flow_graph_to_agr_for_2_junctions_2_comps_has_correct_edges

test_flow_graph_to_agr_for_2_junction_and_a_virtual_junction_has_correct_edges

test_flow_edge_example()[source]
test_flow_graph_to_agr_for_2_junction_and_a_virtual_junction_has_correct_edges()[source]
test_flow_graph_to_agr_for_2_junctions_2_comps_has_correct_edges()[source]
test_in_parallel_for_two_paths_with_a_comp_each_has_correct_edges()[source]
test_in_parallel_of_with_no_comps_gives_empty_graph_and_funcs()[source]
test_in_series_cyclic_for_3_calculations_has_the_right_edges()[source]
test_in_series_two_components_creates_a_graph_with_known_edges()[source]
test_in_series_with_no_arguments_gives_an_empty_graph_and_funcs()[source]
test_kirchhoffify_given_inertial_components_and_regular_kirchoff_throws()[source]
test_kirchhoffify_of_empty_graphs_makes_empty_graph_and_funcs()[source]
test_kirchhoffify_one_junction_connects_k_to_junction_but_not_vice_versa()[source]
test_kirchhoffify_w_2_hydraulic_comps_and_empty_graph_sets_comps_edges_correctly()[source]
test_kirchhoffify_w_inertial_comps_adds_mdot_and_mdot2()[source]
test_kirchhoffify_with_ref_mdots_gives_them_the_right_comps_by_example()[source]

Partial States Tests

test_uniform_with_an_example

test_uniform_sets_only_to_given_value

test_uniform_sets_variables_it_is_told_to

test_merge_with_an_example

test_merge_has_union_keys

test_merge_values_appear_in_originals

test_filter_values_with_an_example

test_filter_calculations_with_an_example

class HasVariables(name, *vs)[source]
test_filter_calculations_with_an_example()[source]
test_filter_values_with_an_example()[source]
test_merge_has_union_keys()[source]
Return type:

None

test_merge_values_appear_in_originals()[source]
Return type:

None

test_merge_with_an_example()[source]
test_uniform_sets_only_to_given_value()[source]
Return type:

None

test_uniform_sets_variables_it_is_told_to()[source]
Return type:

None

test_uniform_with_an_example()[source]

Subsystems Tests

test_symmetric_plate_steady_state_has_zero_diff_in_power

test_symmetric_plate_steady_state_has_zero_diff_in_low_mdot

test_point_kinetics_steady_state_follows_analytic_formula

test_point_kinetics_w_input_steady_state_follows_analytic_formula

test_hydraulic_steady_state_is_a_root_for_a_single_loop_case

test_hydraulic_steady_state_is_a_root_for_a_simple_parallel_case

test_hydraulic_steady_state_assumes_0_pressure_drop_for_unsupported_calculations

test_hydraulic_steady_state_uses_strategy_when_provided

test_hydraulic_steady_state_assumes_0_pressure_drop_for_unsupported_calculations()[source]
test_hydraulic_steady_state_is_a_root_for_a_simple_parallel_case()[source]
test_hydraulic_steady_state_is_a_root_for_a_single_loop_case()[source]
test_hydraulic_steady_state_uses_strategy_when_provided()[source]
test_point_kinetics_steady_state_follows_analytic_formula()[source]
Return type:

None

test_point_kinetics_w_input_steady_state_follows_analytic_formula()[source]
Return type:

None

test_symmetric_plate_steady_state_accepts_negative_flow_rate()[source]

Tests whether the function accepts negative flow rate

test_symmetric_plate_steady_state_has_zero_diff_in_low_mdot()[source]
Return type:

None

test_symmetric_plate_steady_state_has_zero_diff_in_power()[source]
Return type:

None

test_symmetric_plate_steady_state_solves_negative_flow_rate()[source]

Tests whether the function solves negative flow rate correctly

Addenda Tests

test_parabolic_FlowResistor_intersects_set_point

test_constant_mdot_FlowResistor_intersects_set_point

test_constant_dp_FlowResistor_intersects_set_point

test_linear_FlowResistor_intersects_set_point

test_constant_FlowResistor_errors_when_superimposed

test_constant_FlowResistor_errors_when_under_imposed

test_Calculation_factory_given_a_simple_example_is_set_up_and_calculates_correctly

Testing different constructors

test_Calculation_factory_given_a_simple_example_is_set_up_and_calculates_correctly()[source]
test_FlowResistor_errors_when_under_imposed()[source]
Return type:

None

test_constant_FlowResistor_errors_when_superimposed()[source]
test_constant_FlowResistor_errors_when_under_imposed()[source]
test_constant_dp_FlowResistor_intersects_set_point()[source]
Return type:

None

test_constant_mdot_FlowResistor_intersects_set_point()[source]
Return type:

None

test_linear_FlowResistor_intersects_set_point()[source]
Return type:

None

test_parabolic_FlowResistor_intersects_set_point()[source]
Return type:

None