public override TclCommand[] Translate(StructurePart targetElement, out string elementTag)
        {
            var elm = targetElement as TetrahedronElement;

            var e  = elm.Material.GetMaterialPropertiesAt(0, 0, 0).Ex;
            var nu = elm.Material.GetMaterialPropertiesAt(0, 0, 0).NuXy;


            var buf = new List <TclCommand>();

            var eleTag = TargetGenerator.GetCounter("element");
            //var transTag = TargetGenerator.GetCounter("geomTransf");
            var matTag = TargetGenerator.GetCounter("nDMaterial");

            //var vec = elm.GetTransformationManager().TransformLocalToGlobal(Vector.K).GetUnit();

            buf.Add(new TclCommand("nDMaterial", "ElasticIsotropic", matTag,
                                   e, nu));

            buf.Add(new TclCommand("element", "FourNodeTetrahedron", eleTag,
                                   elm.Nodes[0].GetIndex(),
                                   elm.Nodes[1].GetIndex(),
                                   elm.Nodes[2].GetIndex(),
                                   elm.Nodes[3].GetIndex(),

                                   matTag, 0, 0, 0));

            TargetGenerator.SetCounter("element", eleTag + 1);
            TargetGenerator.SetCounter("nDMaterial", matTag + 1);

            elementTag = eleTag.ToString(CultureInfo.CurrentCulture);

            return(buf.ToArray());
        }
        public override TclCommand[] Translate(StructurePart targetElement, out string elementTag)
        {
            var elm = targetElement as TriangleElement;
            var sec = elm.Section.GetThicknessAt(0);// as Sections.UniformParametric1DSection;
            var mat = elm.Material as Materials.UniformIsotropicMaterial;
            var g   = mat.YoungModulus / (2 * (1 + mat.PoissonRatio));


            var buf = new List <TclCommand>();

            var eleTag = TargetGenerator.GetCounter("element");
            var matTag = TargetGenerator.GetCounter("nDMaterial");

            buf.Add(new TclCommand("nDMaterial", "ElasticIsotropic", matTag, mat.YoungModulus, mat.PoissonRatio));

            buf.Add(new TclCommand("element", "tri31 ", eleTag,
                                   elm.Nodes[0].GetIndex(),
                                   elm.Nodes[1].GetIndex(),
                                   elm.Nodes[2].GetIndex(),
                                   sec,
                                   "PlaneStrain",
                                   matTag));

            TargetGenerator.SetCounter("element", eleTag + 1);
            TargetGenerator.SetCounter("nDMaterial", matTag + 1);

            elementTag = eleTag.ToString(CultureInfo.CurrentCulture);

            return(buf.ToArray());
        }
Exemplo n.º 3
0
        public override TclCommand[] Translate(StructurePart targetElement, out string elementTag)
        {
            var elm = targetElement as BarElement;
            var sec = elm.Section as Sections.UniformParametric1DSection;
            var mat = elm.Material as Materials.UniformIsotropicMaterial;
            var g   = mat.YoungModulus / (2 * (1 + mat.PoissonRatio));


            var buf = new List <TclCommand>();

            var eleTag   = TargetGenerator.GetCounter("element");
            var transTag = TargetGenerator.GetCounter("geomTransf");

            var vec = elm.GetTransformationManager().TransformLocalToGlobal(Vector.K).GetUnit();

            buf.Add(new TclCommand("geomTransf", "Linear ", transTag,
                                   vec.X, vec.Y, vec.Z));

            buf.Add(new TclCommand("element", "elasticBeamColumn", eleTag,
                                   elm.StartNode.GetIndex(),
                                   elm.EndNode.GetIndex(),
                                   sec.A,
                                   mat.YoungModulus
                                   , g
                                   , sec.J,
                                   sec.Iz,
                                   sec.Iy, transTag));

            TargetGenerator.SetCounter("element", eleTag + 1);
            TargetGenerator.SetCounter("geomTransf", transTag + 1);

            elementTag = eleTag.ToString();

            return(buf.ToArray());
        }
        public override TclCommand[] Translate(StructurePart targetElement, out string elementTag)
        {
            var elm = targetElement as TriangleElement;
            var sec = elm.Section.GetThicknessAt(0);// as Sections.UniformParametric1DSection;
            var mat = elm.Material as Materials.UniformIsotropicMaterial;
            var g   = mat.YoungModulus / (2 * (1 + mat.PoissonRatio));


            var buf = new List <TclCommand>();

            var eleTag = TargetGenerator.GetCounter("element");
            var secTag = TargetGenerator.GetCounter("section");

            var vec = elm.GetTransformationManager().TransformLocalToGlobal(Vector.K).GetUnit();

            buf.Add(new TclCommand("section", "ElasticMembranePlateSection", secTag,
                                   mat.YoungModulus, mat.PoissonRatio, sec, 0));

            buf.Add(new TclCommand("element", "ShellDKGT", eleTag,
                                   elm.Nodes[0].GetIndex(),
                                   elm.Nodes[1].GetIndex(),
                                   elm.Nodes[2].GetIndex(),
                                   secTag));

            TargetGenerator.SetCounter("element", eleTag + 1);
            TargetGenerator.SetCounter("section", secTag + 1);

            elementTag = eleTag.ToString(CultureInfo.CurrentCulture);

            return(buf.ToArray());
        }
Exemplo n.º 5
0
        public override TclCommand[] Translate(StructurePart targetElement, out string elementTag)
        {
            var elm = targetElement as Tetrahedral;

            //var sec = elm.Section as Sections.UniformParametric1DSection;

            //var mat = elm.Material as Materials.UniformIsotropicMaterial;
            //var g = mat.YoungModulus / (2 * (1 + mat.PoissonRatio));
            var e = elm.E;


            var buf = new List <TclCommand>();

            var eleTag = TargetGenerator.GetCounter("element");
            //var transTag = TargetGenerator.GetCounter("geomTransf");
            var matTag = TargetGenerator.GetCounter("nDMaterial");

            //var vec = elm.GetTransformationManager().TransformLocalToGlobal(Vector.K).GetUnit();

            buf.Add(new TclCommand("nDMaterial", "ElasticIsotropic", matTag,
                                   elm.E, elm.Nu));

            buf.Add(new TclCommand("element", "FourNodeTetrahedron", eleTag,
                                   elm.Nodes[0].GetIndex(),
                                   elm.Nodes[1].GetIndex(),
                                   elm.Nodes[2].GetIndex(),
                                   elm.Nodes[3].GetIndex(),

                                   matTag, 0, 0, 0));

            TargetGenerator.SetCounter("element", eleTag + 1);
            TargetGenerator.SetCounter("nDMaterial", matTag + 1);

            elementTag = eleTag.ToString(CultureInfo.CurrentCulture);

            return(buf.ToArray());
        }