//IParameterExtractor extractor;

        //public BeamLoadFactoryLocator(IParameterExtractor Extractor)
        //{
        //    extractor = Extractor;
        //}
        public IBeamLoadFactory GetLoadFactory(string BeamCaseId, BeamFactoryData data)
        {
            string BoundaryConditionCase = BeamCaseId.Substring(0, 2);
            switch (BoundaryConditionCase)
            {
                //case "C2":
                //    return new BeamWithOverhangLoadFactory(extractor);
                //case "C5":
                //    return new BeamCantileverLoadFactory(extractor);
                //default:
                //    return new BeamLoadFactory(extractor);
                case "C2":
                    return new BeamWithOverhangLoadFactory(data);
                case "C5":
                    return new BeamCantileverLoadFactory(data);
                default:
                    return new BeamLoadFactory(data);
            }

        }
        //IParameterExtractor extractor;

        //public BeamLoadFactoryLocator(IParameterExtractor Extractor)
        //{
        //    extractor = Extractor;
        //}
        public IBeamLoadFactory GetLoadFactory(string BeamCaseId, BeamFactoryData data)
        {
            string BoundaryConditionCase = BeamCaseId.Substring(0, 2);

            switch (BoundaryConditionCase)
            {
            //case "C2":
            //    return new BeamWithOverhangLoadFactory(extractor);
            //case "C5":
            //    return new BeamCantileverLoadFactory(extractor);
            //default:
            //    return new BeamLoadFactory(extractor);
            case "C2":
                return(new BeamWithOverhangLoadFactory(data));

            case "C5":
                return(new BeamCantileverLoadFactory(data));

            default:
                return(new BeamLoadFactory(data));
            }
        }
        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 }
 
            };
        }
Exemple #4
0
        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 }
 
            };
        }
 public BeamInstanceFactory(BeamFactoryData data)
 {
     this.d = data;
 }
        //public BeamCantileverLoadFactory(IParameterExtractor Extractor)
        //    : base(Extractor)
        //{

        //}

        public BeamCantileverLoadFactory(BeamFactoryData data)
            : base(data)
        {

        }
 public BeamInstanceFactory(BeamFactoryData data)
 {
     this.d = data;
 }
        //public BeamWithOverhangLoadFactory(IParameterExtractor Extractor): base(Extractor)
        //{

        //}

        public BeamWithOverhangLoadFactory(BeamFactoryData data)
            : base(data)
        {

        }
        //public BeamWithOverhangLoadFactory(IParameterExtractor Extractor): base(Extractor)
        //{

        //}

        public BeamWithOverhangLoadFactory(BeamFactoryData data)
            : base(data)
        {
        }
Exemple #10
0
        //public BeamCantileverLoadFactory(IParameterExtractor Extractor)
        //    : base(Extractor)
        //{

        //}

        public BeamCantileverLoadFactory(BeamFactoryData data)
            : base(data)
        {
        }
Exemple #11
0
 public BeamLoadFactory(BeamFactoryData data)
 {
     this.d = data;
 }
Exemple #12
0
 public BeamLoadFactory(BeamFactoryData data)
 {
     this.d = data;
 }