IAnalysisBeam GetBeam(double L, double a, double P) { BeamFactoryData dat = new BeamFactoryData(L, P, 0, 0, a, 0, 0, 0, 0, 0, 0, 29000, 510); //W18X35 string BeamCaseId = "C3A_2"; BeamLoadFactoryLocator loc = new BeamLoadFactoryLocator(); IBeamLoadFactory loadFactory = loc.GetLoadFactory(BeamCaseId, dat); LoadBeam load = loadFactory.GetLoad(BeamCaseId); BeamInstanceFactory beamFactory = new BeamInstanceFactory(dat); IAnalysisBeam bm = beamFactory.CreateBeamInstance(BeamCaseId, load, null); return(bm); }
IAnalysisBeam GetBeam (double L, double w) { BeamFactoryData dat = new BeamFactoryData(L, 0, 0, w, 0, 0, 0, 0, 0, 0, 0,29000,510); //W18X35 string BeamCaseId = "C1B_1"; BeamLoadFactoryLocator loc = new BeamLoadFactoryLocator(); IBeamLoadFactory loadFactory = loc.GetLoadFactory(BeamCaseId,dat); LoadBeam load = loadFactory.GetLoad(BeamCaseId); BeamInstanceFactory beamFactory = new BeamInstanceFactory(dat); IAnalysisBeam bm = beamFactory.CreateBeamInstance(BeamCaseId, load, null); return bm; }
public static Dictionary <string, object> BeamDeflections(string BeamDeflectionCaseId, double L, double P, double M, double w, double E, double I, double a_load = 0, double b_load = 0, double c_load = 0, double P1 = 0, double P2 = 0, double M1 = 0, double M2 = 0) { //Default values double Delta_max = 0; //Calculation logic: BeamFactoryData dat = new BeamFactoryData(L, P, M, w, a_load, b_load, c_load, P1, P2, M1, M2, E, I); BeamLoadFactoryLocator loc = new BeamLoadFactoryLocator(); IBeamLoadFactory loadFactory = loc.GetLoadFactory(BeamDeflectionCaseId, dat); LoadBeam load = loadFactory.GetLoad(BeamDeflectionCaseId); BeamInstanceFactory beamFactory = new BeamInstanceFactory(dat); IAnalysisBeam bm = beamFactory.CreateBeamInstance(BeamDeflectionCaseId, load, null); Delta_max = bm.GetMaximumDeflection(); return(new Dictionary <string, object> { { "Delta_max", Delta_max } }); }
public static Dictionary <string, object> BeamForces(string BeamForcesCaseId, double L, double X = 0, double P = 0, double M = 0, double w = 0, double a_load = 0, double b_load = 0, double c_load = 0, double P1 = 0, double P2 = 0, double M1 = 0, double M2 = 0) { //Default values double M_max = 0; double M_min = 0; double V_max = 0; double M_x = 0; double V_x = 0; //Calculation logic: BeamFactoryData dat = new BeamFactoryData(L, P, M, w, a_load, b_load, c_load, P1, P2, M1, M2); BeamLoadFactoryLocator loc = new BeamLoadFactoryLocator(); IBeamLoadFactory loadFactory = loc.GetLoadFactory(BeamForcesCaseId, dat); LoadBeam load = loadFactory.GetLoad(BeamForcesCaseId); BeamInstanceFactory beamFactory = new BeamInstanceFactory(dat); IAnalysisBeam bm = beamFactory.CreateBeamInstance(BeamForcesCaseId, load, null); M_x = bm.GetMoment(X); V_x = bm.GetShear(X); M_max = bm.GetMomentMaximum().Value; M_min = bm.GetMomentMinimum().Value; V_max = bm.GetShearMaximumValue().Value; return(new Dictionary <string, object> { { "M_max", M_max } , { "M_min", M_min } , { "V_max", V_max } , { "M_x", M_x } , { "V_x", V_x } }); }