Beispiel #1
0
        public double GetTangentModulus(double ratio)
        {
            double stress = ratio * SoilModel.GetFailureStress();
            var    solver = new NewtonSolver(x => SoilModel.GetDeviatoricStress(x) - stress, 0);
            double eps    = solver.Solve();

            var derivative = new Derivative(x => SoilModel.GetDeviatoricStress(x), DerivativeAccuracy);

            return(derivative.GetFirstDerivative(eps));
        }
Beispiel #2
0
        public double GetSecantModulus(double ratio)
        {
            double stress = ratio * SoilModel.GetFailureStress();
            var    solver = new NewtonSolver(x => SoilModel.GetDeviatoricStress(x) - stress, 0);
            double eps    = solver.Solve();

            if (eps == 0)
            {
                throw new Exception();
            }

            return(stress / eps);
        }