Example #1
0
        public string GetINCON()
        {
            StringBuilder outp = new StringBuilder();

            outp.AppendLine("INCON");

            foreach (var el in Elements)
            {
                outp.Append(el.Name + "           " + el.Porosity.ToString("0.00000000E+00"));
                if (el.PrimaryVariablesIndex.HasValue)
                {
                    outp.AppendLine(" " + el.PrimaryVariablesIndex.ToString());
                }
                else
                {
                    outp.AppendLine();
                }
                outp.AppendLine(ReaderUtilities.JoinIntoString(el.PrimaryVaribles, 20));
            }
            return(outp.ToString());
        }
Example #2
0
        public override string ToString()
        {
            StringBuilder Output = new StringBuilder();


            Output.AppendLine("ROCKS----1----*----2----*----3----*----4----*----5----*----6----*----7----*----8");

            foreach (var r in this)
            {
                Output.Append(r.Name);
                int writemore = 0;
                if (r.RelativePermeabilityModel > 0)
                {
                    if (r.CapillaryPressureModel > 0)
                    {
                        writemore = 2;
                        Output.Append("    2");
                    }
                    else
                    {
                        writemore = 1;
                        Output.Append("    1");
                    }
                }
                else
                {
                    Output.Append("    0");
                }

                Output.AppendLine(ReaderUtilities.JoinIntoString(new double[] { r.Density, r.Porosity, r.PermX, r.PermY, r.PermZ, r.WetHeatConductivity, r.HeatCapacity }, 10));

                Output.AppendLine(ReaderUtilities.JoinIntoString(new double[] { r.Compressibility }, 10));
                if (writemore > 0)
                {
                    if (r.RelativePermeabilityModel > 9)
                    {
                        Output.Append("   ");
                    }
                    else
                    {
                        Output.Append("    ");
                    }
                    Output.Append(r.RelativePermeabilityModel);
                    Output.Append("     ");
                    Output.AppendLine(ReaderUtilities.JoinIntoString(r.RelativePermebilityParameters, 10));
                }

                if (writemore > 1)
                {
                    if (r.CapillaryPressureModel > 9)
                    {
                        Output.Append("   ");
                    }
                    else
                    {
                        Output.Append("    ");
                    }
                    Output.Append(r.CapillaryPressureModel);
                    Output.Append("     ");
                    Output.AppendLine(ReaderUtilities.JoinIntoString(r.CapillaryPressureParameters, 10));
                }
            }
            Output.AppendLine();
            Output.AppendLine();
            return(Output.ToString());
        }