public void ConstRelSimuConstructorTest() { Model M = new Model(@"C:\Jacob\Udvikling\NewT2voc\Models\Centrifuge\co2buble.txt"); string Executable = M.simu.Executable; ConstitutiveRelations target = new ConstitutiveRelations(M, EOS.t2eco2m); int k = 2; }
public void CreateRelations(Rock Material) { Model M = new Model(); }
public void ReadOutputFileTest() { Model target = new Model(Dir + @"coarse3d\pumping.txt"); // TODO: Initialize to an appropriate value target.Results.ReadOutputFile(Dir + @"coarse3d\ud.txt"); }
public static void FOFT(string FileName, Model M) { using (StreamReader sr = new StreamReader(FileName)) { List<Element> Cons = null; int nelement = 0; while (!sr.EndOfStream) { string line = sr.ReadLine(); var split = line.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); //First time we are here if (Cons == null) { Cons = new List<Element>(); nelement = (split.Count() - 2) / 6; for (int i = 0; i < nelement; i++) { Cons.Add(M.Elements[int.Parse(split[2 +i*6]) - 1]); Cons[i].TimeData = new List<TSEntry>(); } } TimeSpan Time = TimeSpan.FromSeconds(Double.Parse(split[1])); for (int i = 0; i < nelement; i++) { double[] vals = new double[5]; for (int j = 0; j < 5; j++) { double d = 0; double.TryParse(split[3 + i * 6 + j], out d); vals[j] = d; } Cons[i].TimeData.Add(new TSEntry(Time, vals)); } } } }
public void GetINCONTest() { Model target = new Model(@"C:\Jacob\Udvikling\NewT2voc\DotNetT2VOC\RelPermTemp\co2buble.txt"); int k = 0; for (int i = 0; i < 50; i++) { double sa = i/50.0 + 0.01; for (int j = 0; j < 50; j++) { target.Elements[k].PrimaryVariablesIndex = 7; target.Elements[k].PrimaryVaribles[0] = 3.813E+06; target.Elements[k].PrimaryVaribles[2] = sa; target.Elements[k].PrimaryVaribles[3] = (1 - sa-0.005) * j / 50 + 0.0005; k++; } } for (int i = 0; i < 100; i++) { target.Elements[k].PrimaryVariablesIndex = 4; target.Elements[k].PrimaryVaribles[2] = i/100.0+0.0005; target.Elements[k].PrimaryVaribles[0] = 6e6; target.Elements[k].PrimaryVaribles[3] = 20; k++; } for (int i = 0; i < 100; i++) { target.Elements[k].PrimaryVariablesIndex = 5; target.Elements[k].PrimaryVaribles[2] = i / 100.0 + 0.0005; target.Elements[k].PrimaryVaribles[0] = 101300; target.Elements[k].PrimaryVaribles[3] = 20; k++; } using (StreamWriter sw = new StreamWriter(Path.Combine(target.ModelDirectory,"temp.txt"))) { sw.Write(target.GetINCON()); } }
public void OpenCoftFileTest() { Model target = new Model(@"C:\Jacob\Udvikling\NewT2voc\Models\Centrifuge\centrifuge - Kopi.txt"); target.OpenCoftFile(); }
/// <summary> /// Opens file with flow data for each timestep and attached data to the relevant connections /// </summary> /// <param name="FileName"></param> /// <param name="M"></param> public static void COFT(string FileName, Model M) { using (StreamReader sr = new StreamReader(FileName)) { List<Connection> Cons=null; int nconnect=0; while (!sr.EndOfStream) { string line = sr.ReadLine(); var split = line.Split(new string[]{","},StringSplitOptions.RemoveEmptyEntries); //First time we are here if (Cons == null) { Cons = new List<Connection>(); nconnect = (split.Count() - 2) / 5; for (int i = 0; i < nconnect; i++) { Cons.Add(M.Connections[int.Parse(split[2]) - 1]); Cons[i].Flow = new List<FlowDataEntry>(); } } TimeSpan Time = TimeSpan.FromSeconds(Double.Parse(split[1])); for (int i = 0; i < nconnect; i++) { double[] vals = new double[4]; for (int j = 0; j < 4; j++) { double d = 0; double.TryParse(split[3 + i*5+j], out d); vals[j] =d; } Cons[i].Flow.Add(new FlowDataEntry(Time,vals)); } } } }
public OutputFileParser(Model M) { _model = M; Vectors = new List<TimesOutput>(); }