Tuple <double, double> CalP(double NeutralDist, bool isVert = true) { double center = isVert ? PlasticCenterY : PlasticCenterX; double top = isVert ? OuterLine.Ymax() : OuterLine.Xmax(); double na = center + NeutralDist; int steps = PreRebars.Count; double F = 0.0, M = 0.0; double dz, zi; double phi = -Conc.Epsu / (top - na); double epsi, sigmai; double Fi, Mi; for (int i = 0; i < steps; i++) { zi = isVert ? PreRebars[i].Center.Y : PreRebars[i].Center.X; dz = zi - na; epsi = dz * phi; sigmai = PrestressProperty.GetSigma(epsi); Fi = sigmai * PreRebars[i].Area; Mi = Fi * (zi - center); F += Fi; M += Mi; } return(new Tuple <double, double>(F, M)); }