internal static StringBuilder wBend(AnalyticElement ae)
        {
            StringBuilder sb   = new StringBuilder();
            string        twox = "  ";

            //New line
            sb.Append(twox);
            //Radius
            sb.Append(FLO(ae.BendRadius, 13, 1, 3));
            sb.Append(FLO(0, 13, 0, 6));
            sb.Append("     -2.02020");
            sb.Append(FLO(ae.To.Number - 1, 13, 0, 4));
            sb.Append(FLO(0, 13, 0, 6));
            sb.Append(FLO(ae.To.Number - 2, 13, 0, 4));
            sb.AppendLine();

            //New line
            sb.Append(twox);
            sb.Append(FLO(0, 13, 0, 6, 3));
            //Wallthk
            sb.Append(FLO(ae.WallThk, 13, 1, 5));
            sb.Append(FLO(0, 13, 0, 6, 2));
            sb.AppendLine();

            //New line
            sb.Append(twox);
            sb.Append(FLO(0, 13, 0, 6));
            sb.AppendLine();

            return(sb);
        }
        internal static StringBuilder wReducer(AnalyticElement ae)
        {
            StringBuilder sb   = new StringBuilder();
            string        twox = "  ";

            //New line
            sb.Append(twox);
            //Second oDia
            sb.Append(FLO(ae.secondODia, 13, 1, 3));
            //Second Wthk
            sb.Append(FLO(ae.secondWallThk, 13, 1, 3));
            //Rest
            sb.Append(FLO(0, 13, 0, 6, 3));
            sb.AppendLine();

            return(sb);
        }
        internal static StringBuilder wTee(AnalyticElement ae)
        {
            StringBuilder sb   = new StringBuilder();
            string        twox = "  ";

            //New line
            sb.Append(twox);
            //Node number
            sb.Append(FLO(ae.To.Number, 13, 0, 4));
            //Tee type, 3 = welded tee - the type I use normally
            sb.Append(FLO(3, 13, 0, 5));
            sb.Append(FLO(0, 13, 0, 6, 4));
            sb.AppendLine();

            //New line
            sb.Append(twox);
            sb.Append(FLO(0, 13, 0, 6, 6));
            sb.AppendLine();

            //New line
            sb.Append(twox);
            sb.Append(FLO(0, 13, 0, 6, 6));
            sb.AppendLine();

            //New line
            sb.Append(twox);
            sb.Append(FLO(0, 13, 0, 6, 4));
            sb.Append(FLO(9999.99, 13, 2, 2, 2));
            sb.AppendLine();

            //New line
            sb.Append(twox);
            sb.Append(FLO(0, 13, 0, 6, 6));
            sb.AppendLine();

            //New line
            sb.Append(twox);
            sb.Append(FLO(0, 13, 0, 6, 6));
            sb.AppendLine();

            //New line
            sb.Append(twox);
            sb.Append(FLO(0, 13, 0, 6, 6));
            sb.AppendLine();

            //New line
            sb.Append(twox);
            sb.Append(FLO(0, 13, 0, 6, 6));
            sb.AppendLine();

            //New line
            sb.Append(twox);
            sb.Append(FLO(0, 13, 0, 6, 4));
            sb.Append(FLO(9999.99, 13, 2, 2, 2));
            sb.AppendLine();

            //New line
            sb.Append(twox);
            sb.Append(FLO(0, 13, 0, 6, 6));
            sb.AppendLine();

            return(sb);
        }
        internal StringBuilder wElement(AnalyticElement ae)
        {
            string        twox = "  ";
            StringBuilder sb   = new StringBuilder();

            //New line
            sb.Append(twox);
            //From number
            sb.Append(FLO(ae.From.Number, 13, 0, 2));
            //To number
            sb.Append(FLO(ae.To.Number, 13, 0, 2));
            //Delta X
            sb.Append(FLO(ae.To.X - ae.From.X, 13, 2, 4));
            //Delta Y
            sb.Append(FLO(ae.To.Y - ae.From.Y, 13, 2, 4));
            //Delta Z
            sb.Append(FLO(ae.To.Z - ae.From.Z, 13, 2, 4));
            //Actual diameter
            sb.AppendLine(FLO(ae.oDia, 13, 1, 5));

            //New line
            sb.Append(twox);
            //Wall thickness
            sb.Append(FLO(ae.WallThk, 13, 1, 5));
            //Insulation thickness
            sb.Append(FLO(ae.InsulationThk, 13, 0, 3));
            //Corrosion Allowance //TODO: Implement #$ ELEMENTS: Corrosion Allowance
            //Thermal Expansion (or Temperature #1) //TODO: Implement #$ ELEMENTS: Temperature 1-3
            sb.Append(FLO(0, 13, 0, 6, 4));
            sb.AppendLine();

            //New line
            sb.Append(twox);
            //Thermal Expansion (or Temperature #4-#9)
            sb.Append(FLO(0, 13, 0, 6, 6));
            sb.AppendLine();

            //New line
            sb.Append(twox);
            //Thermal Expansion (or Pressure #1-#6) //TODO: Implement #$ ELEMENTS: Pressure 1-6
            sb.Append(FLO(0, 13, 0, 6, 6));
            sb.AppendLine();

            //New line
            sb.Append(twox);
            //Thermal Expansion (or Pressure #7-#9)
            //Elastic Modulus (cold) //Should be specified by material
            //Poisoon's Ratio //Should be specified by material
            //Pipe Density //Should be specified by material???
            sb.Append(FLO(0, 13, 0, 6, 6));
            sb.AppendLine();

            //New line
            sb.Append(twox);
            //Insulation Density
            sb.Append(FLO(136.158, 13, 3, 3)); //TODO: Implement Insulation Density
            //Fluid Density
            sb.Append(FLO(999.556, 13, 3, 3));
            //Minus Mill Tolerance
            //Plus Mill Tolerance
            //Seam weld
            sb.Append(FLO(0, 13, 0, 6, 3));
            //Hydro Pressure
            sb.AppendLine(FLO(0, 13, 0, 6)); //TODO: Implement Hydro Pressure

            //New line
            sb.Append(twox);
            //Elastic Modulus (Hot #1-#6)
            sb.Append(FLO(0, 13, 0, 6, 6));
            sb.AppendLine();

            //New line
            sb.Append(twox);
            //Elastic Modulus (Hot #7-#9)
            //"wL" factor
            //Element Orientation Angle (To End)
            //Element Orientation Angle (From End)
            sb.Append(FLO(0, 13, 0, 6, 6));
            sb.AppendLine();

            //New line
            sb.Append(twox);
            //Cladding thickness
            sb.Append(FLO(1, 13, 0, 6));
            //Cladding Density
            sb.Append(FLO(2700, 13, 0, 6));
            //Insulation + Cladding Weight/length
            //Refractory Thickness
            //Refractory Density
            sb.Append(FLO(0, 13, 0, 6, 3));
            sb.AppendLine();

            //ELEMENT NAME
            //New line
            sb.Append(twox);
            sb.AppendLine(INT(0, 10));

            //POINTERS TO AUXILIARY DATA ARRAYS
            //New line
            sb.Append(twox);

            //Bend aux field
            if (ae.Type == ElemType.Elbow)
            {
                Data.Counter_Bends++;
                sb.Append(FLO(Data.Counter_Bends, 13, 0, 0));
                _06_BEND.Append(wBend(ae));
            }
            else
            {
                sb.Append(FLO(0, 13, 0, 0));
            }

            sb.Append(FLO(0, 13, 0, 0, 5));
            sb.AppendLine();

            sb.Append(twox);
            sb.Append(FLO(0, 13, 0, 0, 4));
            //Tee aux field
            if (ae.Type == ElemType.Tee)
            {
                Data.Counter_Intersection++;
                sb.Append(FLO(Data.Counter_Intersection, 13, 0, 0));
                _16_SIFTEES.Append(wTee(ae));
            }
            else
            {
                sb.Append(FLO(0, 13, 0, 0));
            }
            sb.Append(FLO(0, 13, 0, 0));
            sb.AppendLine();

            sb.Append(twox);
            //Reducer aux field
            if (ae.Type == ElemType.Transition)
            {
                Data.Counter_Reducers++;
                sb.Append(FLO(Data.Counter_Reducers, 13, 0, 0));
                _17_REDUCERS.Append(wReducer(ae));
            }
            else
            {
                sb.Append(FLO(0, 13, 0, 0));
            }

            sb.Append(FLO(0, 13, 0, 0, 2));
            sb.AppendLine();

            return(sb);
        }