예제 #1
0
        protected override void PlotCurrentState(double physTime, TimestepNumber timestepNo, int susamp)
        {
            var Fields = ArrayTools.Cat <DGField>(this.GradientU, this.Phi, this.u, this.rhs, this.residual, this.uEx, this.uErr);

            if (this.MGColoring != null && this.MGColoring.Length > 0)
            {
                Fields = ArrayTools.Cat <DGField>(Fields, this.MGColoring);
            }
            Tecplot.PlotFields(Fields, "XPoisson" + timestepNo.ToString(), physTime, susamp);
            Tecplot.PlotFields(Fields, "grid" + timestepNo.ToString(), physTime, 0);
        }
예제 #2
0
        /// <summary>
        /// Calculate Nusselt number for Low-Mach number flows.
        /// </summary>
        /// <param name="Timestep"></param>
        /// <param name="GridDat"></param>
        /// <param name="Temperature"></param>
        /// <param name="SolverConf"></param>
        void CalculateNusselt(TimestepNumber Timestep, IGridData GridDat, SinglePhaseField Temperature, SIMPLEControl SolverConf)
        {
            // Initialize calculation of Nusselt number.
            if (NusseltNum == null)
            {
                LowMachSIMPLEControl lowMachConf = SolverConf as LowMachSIMPLEControl;
                NusseltNum = new NusseltNumber(GridDat, Temperature, lowMachConf.EoS, lowMachConf.EdgeTagsNusselt);

                if ((base.MPIRank == 0) && (CurrentSessionInfo.ID != Guid.Empty))
                {
                    LogNusselt = base.DatabaseDriver.FsDriver.GetNewLog("Nusselt", CurrentSessionInfo.ID);
                    LogNusselt.Write("Timestep");
                    for (int bc = 0; bc < NusseltNum.Nusselt.Length; bc++)
                    {
                        LogNusselt.Write("\t" + lowMachConf.EdgeTagsNusselt[bc]);
                    }
                    LogNusselt.WriteLine();
                }
            }

            // Calculate Nusselt number
            NusseltNum.CalculateNusseltNumber();

            // Write result to text file
            if ((base.MPIRank == 0) && (LogNusselt != null))
            {
                LogNusselt.Write(Timestep.ToString());
                for (int bc = 0; bc < NusseltNum.Nusselt.Length; bc++)
                {
                    LogNusselt.Write("\t" + NusseltNum.Nusselt[bc].ToString("0.0000000000E+00", NumberFormatInfo.InvariantInfo));
                }
                LogNusselt.WriteLine();
                LogNusselt.Flush();
            }
        }
예제 #3
0
        protected override void PlotCurrentState(double physTime, TimestepNumber timestepNo, int susamp)
        {
            var Fields = new DGField[] { this.Phi, this.u, this.rhs, this.Residual, this.V[0], this.V[1], this.CutMarker, this.DOFMarker, this.NearMarker };

            Tecplot.PlotFields(Fields, "XdgTimesteppingTest" + timestepNo.ToString(), physTime, susamp);
        }