Use Pint and unit-free variable names in concrete-beam
Convert input parsing to Pint (matching the other calculations), carry units in the YAML values, and drop unit suffixes from input keys, local variables, results keys, the Typst sheet, and tests.
This commit is contained in:
parent
27a9cdd707
commit
8f91baee41
6 changed files with 176 additions and 165 deletions
|
|
@ -23,24 +23,24 @@ def result():
|
|||
|
||||
def test_example_demands(result):
|
||||
v = result["values"]
|
||||
assert v["self_weight_klf"] == pytest.approx(0.1)
|
||||
assert v["wu_klf"] == pytest.approx(0.7325)
|
||||
assert v["Mu_kipft"] == pytest.approx(23.44)
|
||||
assert v["Vu_kip"] == pytest.approx(5.86)
|
||||
assert v["self_weight"] == pytest.approx(0.1)
|
||||
assert v["wu"] == pytest.approx(0.7325)
|
||||
assert v["Mu"] == pytest.approx(23.44)
|
||||
assert v["Vu"] == pytest.approx(5.86)
|
||||
|
||||
|
||||
def test_example_flexure(result):
|
||||
v = result["values"]
|
||||
assert v["a_in"] == pytest.approx(1.823529, rel=1e-5)
|
||||
assert v["a"] == pytest.approx(1.823529, rel=1e-5)
|
||||
assert v["et"] == pytest.approx(0.010283, rel=1e-3)
|
||||
assert v["phi"] == pytest.approx(0.9)
|
||||
assert v["phiMn_kipft"] == pytest.approx(23.961176, rel=1e-5)
|
||||
assert v["phiMn"] == pytest.approx(23.961176, rel=1e-5)
|
||||
assert result["checks"]["flexure"]["ok"] is True
|
||||
|
||||
|
||||
def test_example_min_steel_and_shear(result):
|
||||
v = result["values"]
|
||||
assert v["As_min_in2"] == pytest.approx(0.253333, rel=1e-4)
|
||||
assert v["phiVc_kip"] == pytest.approx(6.244016, rel=1e-4)
|
||||
assert v["As_min"] == pytest.approx(0.253333, rel=1e-4)
|
||||
assert v["phiVc"] == pytest.approx(6.244016, rel=1e-4)
|
||||
assert result["checks"]["minimum_steel"]["ok"] is True
|
||||
assert result["checks"]["shear"]["ok"] is True
|
||||
|
|
|
|||
Loading…
Reference in a new issue