示例#1
0
        static void export_point(Chamber chamber, string filename)
        {
            int z = 5, r = chamber.numOfRNodes - 1;

            using (CsvWriter writer = new CsvWriter(filename + ".csv"))
            {
                CsvRow row;
                row = new CsvRow();
                row.Add("r");
                row.Add("z");
                row.Add("Sc");
                row.Add("aP");
                row.Add("aP0");
                row.Add("aS");
                row.Add("aN");
                row.Add("aW");
                row.Add("aE");
                writer.WriteRow(row);

                row = new CsvRow();
                row.Add(r.ToString());
                row.Add(z.ToString());
                row.Add(chamber.Rho[r, z].Sc.ToString());
                row.Add(chamber.Rho[r, z].aP.ToString());
                row.Add(chamber.Rho[r, z].aP0.ToString());
                row.Add(chamber.Rho[r, z].aS.ToString());
                row.Add(chamber.Rho[r, z].aN.ToString());
                row.Add(chamber.Rho[r, z].aW.ToString());
                row.Add(chamber.Rho[r, z].aE.ToString());
                writer.WriteRow(row);
            }
        }
示例#2
0
        public ConnectingPipes(Chamber from, Chamber to)
        {
            origin      = from;
            destination = to;

            innerRadius = Parameters.pipeID_connectingPipe / 2;
            pipeLength  = Parameters.pipelength_connectingPipe;
        }
示例#3
0
 ////Methods
 //update nodes at every time step
 public static void updateNodeAtNewTimeStep(Chamber chamber)
 {
     foreach (TNodes node in chamber.T)
     {
         node.TP0 = node.TP;
     }
     foreach (RhoNodes node in chamber.Rho)
     {
         node.RhoP0 = node.RhoP;
     }
 }
示例#4
0
        static void export_differenceR(Chamber chamber, string filename)
        {
            using (CsvWriter writer = new CsvWriter(filename + ".csv"))
            {
                CsvRow row;

                for (int r = (chamber.numOfRNodes - 1); r >= 0; r--)
                {
                    row = new CsvRow();
                    for (int z = 0; z < chamber.numOfZNodes; z++)
                    {
                        row.Add((2 * chamber.Rho[r, z].rp / chamber.deltaR).ToString());
                    }
                    writer.WriteRow(row);
                }
            }
        }
示例#5
0
        static void export_Radius(Chamber chamber, string filename)
        {
            using (CsvWriter writer = new CsvWriter(filename + ".csv"))
            {
                CsvRow row;

                for (int r = (chamber.numOfRNodes - 1); r >= 0; r--)
                {
                    row = new CsvRow();
                    for (int z = 0; z < chamber.numOfZNodes; z++)
                    {
                        row.Add((chamber.T[r, z].rp).ToString());
                    }
                    writer.WriteRow(row);
                }
            }
        }
示例#6
0
        static void export_Energy(Chamber chamber, string filename)
        {
            using (CsvWriter writer = new CsvWriter(filename + ".csv"))
            {
                CsvRow row;

                for (int r = (chamber.numOfRNodes - 1); r >= 0; r--)
                {
                    row = new CsvRow();
                    for (int z = 0; z < chamber.numOfZNodes; z++)
                    {
                        row.Add((chamber.T[r, z].density * chamber.T[r, z].volume * chamber.T[r, z].heatCapacity * chamber.T[r, z].TP).ToString("0.00000"));
                    }
                    writer.WriteRow(row);
                }
            }
        }