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)); }
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); }