Exemplo n.º 1
0
        public void CalculateDissociationDecayWidth()
        {
            PrepareJob("CalculateDissociationDecayWidth", BoundWaveStatusTitles);

            try
            {
                QQBoundState boundState = new QQBoundState(GetQQStateParam(), QuantumNumberN)
                {
                    CalculationCancelToken = JobCancelToken,
                    StatusValues           = StatusValues
                };

                boundState.SearchEigenfunction();

                // quit here if process has been aborted
                if (JobCancelToken.IsCancellationRequested)
                {
                    LogMessages.Clear();
                    LogMessages.Append(LogHeader + LogFooter);
                    return;
                }

                UpdateOutputParameters(boundState);

                SetStatusVariables(CrossSectionStatusTitles);

                // calculate decay width and cross section
                DecayWidth decayWidth = new DecayWidth(JobCancelToken, boundState, MaxEnergy_MeV,
                                                       EnergySteps, Temperature_MeV, StatusValues);
                decayWidth.CalculateGammaDiss();

                // quit here if process has been aborted
                if (JobCancelToken.IsCancellationRequested)
                {
                    LogMessages.Clear();
                    LogMessages.Append(LogHeader + LogFooter);
                    return;
                }

                GammaDiss_MeV = decayWidth.GammaDiss_MeV;
                GammaTot_MeV  = GammaDamp_MeV + GammaDiss_MeV;

                LogMessages.Clear();
                LogMessages.AppendLine(LogHeader + "#" + Environment.NewLine + "#");
                LogMessages.AppendLine("Temperature DebyeMass   √<r²>       SoftScale   US_Scale    BoundMass   Energy      GammaDamp   GammaDiss   GammaTot    ");
                LogMessages.AppendLine("(MeV)       (MeV)       (fm)        (Mev)       (Mev)       (MeV)       (MeV)       (MeV)       (MeV)       (MeV)       ");
                LogMessages.AppendLine();
                LogMessages.AppendLine(string.Format("{0,-12}{1,-12}{2,-12}{3,-12}{4,-12}{5,-12}{6,-12}{7,-12}{8,-12}{9,-12}",
                                                     Temperature_MeV.ToString("G6"),
                                                     DebyeMass_MeV.ToString("G6"),
                                                     DisplacementRMS_fm.ToString("G6"),
                                                     SoftScale_MeV.ToString("G6"),
                                                     UltraSoftScale_MeV.ToString("G6"),
                                                     BoundMass_MeV.ToString("G6"),
                                                     Energy_MeV.ToString("G6"),
                                                     GammaDamp_MeV.ToString("G6"),
                                                     GammaDiss_MeV.ToString("G6"),
                                                     GammaTot_MeV.ToString("G6")));
                LogMessages.Append(LogFooter);

                List <string> dataList = new List <string>();
                dataList.Add(LogHeader + "#" + Environment.NewLine + "#");
                dataList.AddRange(CreateWaveFunctionDataList(boundState));
                dataList.Add(string.Empty);
                dataList.Add(string.Empty);
                dataList.AddRange(decayWidth.CrossSectionStringList);
                File.WriteAllLines(YburnConfigFile.OutputPath + DataFileName, dataList);
            }
            catch
            {
                throw;
            }
        }
Exemplo n.º 2
0
 private void CompareResultsWithDataSet(
     QQDataSet dataSet
     )
 {
     LogMessages.Clear();
     LogMessages.AppendLine("Comparison of current results to archived data:");
     LogMessages.AppendLine();
     LogMessages.AppendLine(string.Format("{0,-12}{1,-12}{2,-12}{3,-12}{4,-12}{5,-12}{6,-12}{7,-12}{8,-12}{9,-12}",
                                          "",
                                          "DebyeMass",
                                          "√<r²>",
                                          "SoftScale",
                                          "US_Scale",
                                          "BoundMass",
                                          "Energy",
                                          "GammaDamp",
                                          "GammaDiss",
                                          "GammaTot"));
     LogMessages.AppendLine(string.Format("{0,-12}{1,-12}{2,-12}{3,-12}{4,-12}{5,-12}{6,-12}{7,-12}{8,-12}{9,-12}",
                                          "",
                                          "(MeV)",
                                          "(fm)",
                                          "(Mev)",
                                          "(Mev)",
                                          "(MeV)",
                                          "(MeV)",
                                          "(MeV)",
                                          "(MeV)",
                                          "(MeV)"));
     LogMessages.AppendLine();
     LogMessages.AppendLine(string.Format("{0,-12}{1,-12}{2,-12}{3,-12}{4,-12}{5,-12}{6,-12}{7,-12}{8,-12}{9,-12}",
                                          "Current:",
                                          DebyeMass_MeV.ToString("G6"),
                                          DisplacementRMS_fm.ToString("G6"),
                                          SoftScale_MeV.ToString("G6"),
                                          UltraSoftScale_MeV.ToString("G6"),
                                          BoundMass_MeV.ToString("G6"),
                                          Energy_MeV.ToString("G6"),
                                          GammaDamp_MeV.ToString("G6"),
                                          GammaDiss_MeV.ToString("G6"),
                                          GammaTot_MeV.ToString("G6")));
     LogMessages.AppendLine(string.Format("{0,-12}{1,-12}{2,-12}{3,-12}{4,-12}{5,-12}{6,-12}{7,-12}{8,-12}{9,-12}",
                                          "Archived:",
                                          dataSet.DebyeMass.ToString("G6"),
                                          dataSet.DisplacementRMS.ToString("G6"),
                                          dataSet.SoftScale.ToString("G6"),
                                          dataSet.UltraSoftScale.ToString("G6"),
                                          dataSet.BoundMass.ToString("G6"),
                                          dataSet.Energy.ToString("G6"),
                                          dataSet.GammaDamp.ToString("G6"),
                                          dataSet.GammaDiss.ToString("G6"),
                                          dataSet.GammaTot.ToString("G6")));
     LogMessages.AppendLine(string.Format("{0,-12}{1,-12}{2,-12}{3,-12}{4,-12}{5,-12}{6,-12}{7,-12}{8,-12}{9,-12}",
                                          "Deviation:",
                                          (DebyeMass_MeV / dataSet.DebyeMass - 1).ToString("G3"),
                                          (DisplacementRMS_fm / dataSet.DisplacementRMS - 1).ToString("G3"),
                                          (SoftScale_MeV / dataSet.SoftScale - 1).ToString("G3"),
                                          (UltraSoftScale_MeV / dataSet.UltraSoftScale - 1).ToString("G3"),
                                          (BoundMass_MeV / dataSet.BoundMass - 1).ToString("G3"),
                                          (Energy_MeV / dataSet.Energy - 1).ToString("G3"),
                                          (GammaDamp_MeV / dataSet.GammaDamp - 1).ToString("G3"),
                                          (GammaDiss_MeV / dataSet.GammaDiss - 1).ToString("G3"),
                                          (GammaTot_MeV / dataSet.GammaTot - 1).ToString("G3")));
     LogMessages.AppendLine();
     LogMessages.AppendLine();
 }
Exemplo n.º 3
0
        public void CalculateBoundWaveFunction()
        {
            PrepareJob("CalculateBoundWaveFunction", BoundWaveStatusTitles);

            try
            {
                QQBoundState boundState = new QQBoundState(GetQQStateParam(), QuantumNumberN)
                {
                    CalculationCancelToken = JobCancelToken,
                    StatusValues           = StatusValues,
                    UseFixedAlpha          = UseFixedAlpha
                };

                boundState.SearchEigenfunction();

                // quit here if process has been aborted
                if (JobCancelToken.IsCancellationRequested)
                {
                    LogMessages.Clear();
                    LogMessages.Append(LogHeader + LogFooter);
                    return;
                }

                UpdateOutputParameters(boundState);

                LogMessages.Clear();
                LogMessages.AppendLine(LogHeader + "#" + Environment.NewLine + "#");
                LogMessages.AppendLine(string.Format("{0,-12}{1,-12}{2,-12}{3,-12}{4,-12}{5,-12}{6,-12}{7,-12}",
                                                     "Temperature",
                                                     "DebyeMass",
                                                     "√<r²>",
                                                     "SoftScale",
                                                     "US_Scale",
                                                     "BoundMass",
                                                     "Energy",
                                                     "GammaDamp"));
                LogMessages.AppendLine(string.Format("{0,-12}{1,-12}{2,-12}{3,-12}{4,-12}{5,-12}{6,-12}{7,-12}",
                                                     "(MeV)",
                                                     "(MeV)",
                                                     "(fm)",
                                                     "(Mev)",
                                                     "(Mev)",
                                                     "(MeV)",
                                                     "(MeV)",
                                                     "(MeV)"));
                LogMessages.AppendLine();
                LogMessages.AppendLine(string.Format("{0,-12}{1,-12}{2,-12}{3,-12}{4,-12}{5,-12}{6,-12}{7,-12}",
                                                     Temperature_MeV.ToString("G6"),
                                                     DebyeMass_MeV.ToString("G6"),
                                                     DisplacementRMS_fm.ToString("G6"),
                                                     SoftScale_MeV.ToString("G6"),
                                                     UltraSoftScale_MeV.ToString("G6"),
                                                     BoundMass_MeV.ToString("G6"),
                                                     Energy_MeV.ToString("G6"),
                                                     GammaDamp_MeV.ToString("G6")));
                LogMessages.Append(LogFooter);

                List <string> dataList = new List <string>();
                dataList.Add(LogHeader + "#" + Environment.NewLine + "#");
                dataList.AddRange(CreateWaveFunctionDataList(boundState));
                File.WriteAllLines(YburnConfigFile.OutputPath + DataFileName, dataList);
            }
            catch
            {
                throw;
            }
        }