Modeling of the stress-strain behaviour in hard soils and soft rocks