def test_default_setup(): scour = ScourProtectionDesign(config_min_defined) scour.run() assert scour.phi == 33.5 assert scour.equilibrium == 1.3 assert scour.rock_density == 2600
def test_total_cost(config): scour = ScourProtectionDesign(config_min_defined) scour.run() cost = (config["plant"]["num_turbines"] * config["scour_protection_design"]["cost_per_tonne"] * scour.scour_protection_tonnes) assert scour.total_cost == pytest.approx(cost, rel=1e-8)
def test_fully_defined_setup(): scour = ScourProtectionDesign(config_fully_defined) scour.run() design = config_fully_defined["scour_protection_design"] assert scour.phi == design["soil_friction_angle"] assert scour.equilibrium == design["scour_depth_equilibrium"] assert scour.rock_density == design["rock_density"]
def test_design_result(): scour = ScourProtectionDesign(config_min_defined) scour.run() assert scour.design_result == { "scour_protection": { "tons_per_substructure": scour.scour_protection_tonnes } }
def test_tonnes_per_substructure(config, expected): scour = ScourProtectionDesign(config) scour.run() assert scour.scour_protection_tonnes == expected