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); } }
public ConnectingPipes(Chamber from, Chamber to) { origin = from; destination = to; innerRadius = Parameters.pipeID_connectingPipe / 2; pipeLength = Parameters.pipelength_connectingPipe; }
////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; } }
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); } } }
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); } } }
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); } } }