Exemple #1
0
        private BeamCase GetDistributedLoadCase(LoadBeam load)
        {
            ISingleLoadCaseBeam           beamForceCase      = null;
            ISingleLoadCaseDeflectionBeam beamDeflectionCase = null;

            if (load is LoadDistributedUniform)
            {
                LoadDistributedUniform cl = load as LoadDistributedUniform;
                switch (cl.Case)
                {
                case LoadDistributedSpecialCase.Triangle:
                    DistributedUniformlyIncreasingToEnd b1 = new DistributedUniformlyIncreasingToEnd(beam, cl.Value);    //1D.1
                    beamForceCase      = b1;
                    beamDeflectionCase = b1;
                    break;

                case LoadDistributedSpecialCase.DoubleTriangle:
                    DistributedDoubleTriangle b2 = new DistributedDoubleTriangle(beam, cl.Value);     //1D.2
                    beamForceCase      = b2;
                    beamDeflectionCase = b2;
                    break;

                default:
                    UniformLoad b3 = new UniformLoad(beam, cl.Value);     //1B.1
                    beamForceCase      = b3;
                    beamDeflectionCase = b3;
                    break;
                }
            }

            if (load is LoadDistributedUniformWithEndMoments) //1B.2
            {
                LoadDistributedUniformWithEndMoments cl = load as LoadDistributedUniformWithEndMoments;
                beamForceCase      = new UniformLoadAndEndMoments(beam, cl.Value, cl.M1, cl.M2);
                beamDeflectionCase = null;
            }

            if (load is LoadDistributedGeneral) //1C.1
            {
                LoadDistributedGeneral cl = load as LoadDistributedGeneral;
                beamForceCase      = new UniformPartialLoad(beam, cl.Value, cl.XLocationStart, cl.XLocationEnd - cl.XLocationStart);
                beamDeflectionCase = null;
            }

            return(new BeamCase(beamForceCase, beamDeflectionCase));
        }
        private BeamCase GetDistributedLoadCase(LoadBeam load)
        {
            ISingleLoadCaseBeam beamForceCase = null;
            ISingleLoadCaseDeflectionBeam beamDeflectionCase = null;

            if (load is LoadDistributedUniform)
            {
                LoadDistributedUniform cl = load as LoadDistributedUniform;
                switch (cl.Case)
                {
                    case LoadDistributedSpecialCase.Triangle:
                        DistributedUniformlyIncreasingToEnd b1 = new DistributedUniformlyIncreasingToEnd(beam, cl.Value);//1D.1
                        beamForceCase = b1;
                        beamDeflectionCase = b1;
                        break;
                    case LoadDistributedSpecialCase.DoubleTriangle:
                        DistributedDoubleTriangle b2 = new DistributedDoubleTriangle(beam, cl.Value); //1D.2
                        beamForceCase = b2;
                        beamDeflectionCase = b2;
                        break;
                    default:
                        UniformLoad b3 = new UniformLoad(beam, cl.Value); //1B.1
                        beamForceCase = b3;
                        beamDeflectionCase = b3;
                        break;
                }

            }

            if (load is LoadDistributedUniformWithEndMoments) //1B.2
            {
                LoadDistributedUniformWithEndMoments cl = load as LoadDistributedUniformWithEndMoments;
                beamForceCase = new UniformLoadAndEndMoments(beam, cl.Value, cl.M1, cl.M2);
                beamDeflectionCase = null;
            }

            if (load is LoadDistributedGeneral) //1C.1
            {
                LoadDistributedGeneral cl = load as LoadDistributedGeneral;
                beamForceCase = new UniformPartialLoad(beam, cl.Value, cl.XLocationStart, cl.XLocationEnd - cl.XLocationStart);
                beamDeflectionCase = null;
            }

            return new BeamCase(beamForceCase, beamDeflectionCase);
        }