Exemple #1
0
def test_soil_type_iterative():
    """Test the soil type update process on a nonlinear property."""
    mod_reduc = site.NonlinearProperty('', [0.01, 1.], [1, 0])
    damping = site.NonlinearProperty('', [0.01, 1.], [0, 10])

    st = site.SoilType('', 18.0, mod_reduc, damping)
    l = site.Layer(st, 2., 500.)

    strain = 0.1
    l.strain = strain

    assert_approx_equal(l.strain.value, strain)
    assert_approx_equal(l.shear_mod.value, 0.5 * l.initial_shear_mod)
    assert_approx_equal(l.damping.value, 5.0)
Exemple #2
0
def test_soil_type_iterative():
    """Test the soil type update process on a nonlinear property."""
    mod_reduc = site.NonlinearProperty('', [0.0001, 0.01], [1, 0])
    damping = site.NonlinearProperty('', [0.0001, 0.01], [0, 0.10])

    st = site.SoilType('', 18.0, mod_reduc, damping)
    layer = site.Layer(st, 2., 500.)

    strain = 0.001
    layer.strain = strain

    assert_allclose(layer.strain, strain)
    assert_allclose(layer.shear_mod, 0.5 * layer.initial_shear_mod)
    assert_allclose(layer.damping, 0.05)
Exemple #3
0
def nlp():
    """Simple nonlinear property."""
    return site.NonlinearProperty('', [0.01, 1], [0., 1.])
Exemple #4
0
def nlp():
    """Create an example NonlinearProperty."""
    return site.NonlinearProperty('', [0.01, 1], [0., 1.])