[cig-commits] [commit] master: Minor changes (ad9a2c4)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu May 22 15:35:19 PDT 2014


Repository : https://github.com/geodynamics/aspect

On branch  : master
Link       : https://github.com/geodynamics/aspect/compare/4a5e27e5690a0e0c1e13e19100af7398e37f36b8...d31f4e9435a1c12781f5b673b672cbd29c41c2c2

>---------------------------------------------------------------

commit ad9a2c4b115c206a133fe1e3c356c961fde14019
Author: Siqi Zhang <siqi.zhang at mq.edu.au>
Date:   Wed May 21 10:47:41 2014 -0500

    Minor changes
    
    Revise documents
    Add test prm file


>---------------------------------------------------------------

ad9a2c4b115c206a133fe1e3c356c961fde14019
 source/postprocess/internal_heating_statistics.cc  | 13 +++---
 .../postprocess/visualization/internal_heating.cc  |  8 ++--
 .../radioactive_decay.prm                          | 49 ++++++++++++++++------
 3 files changed, 45 insertions(+), 25 deletions(-)

diff --git a/source/postprocess/internal_heating_statistics.cc b/source/postprocess/internal_heating_statistics.cc
index 8ff9539..2cd61bf 100644
--- a/source/postprocess/internal_heating_statistics.cc
+++ b/source/postprocess/internal_heating_statistics.cc
@@ -40,8 +40,7 @@ namespace aspect
     {
         const HeatingModel::Interface<dim> &heating_model=this->get_heating_model();
 
-      // create a quadrature formula based on the compositional element alone.
-      // be defensive about determining that a compositional field actually exists
+      // create a quadrature formula based on the temperature element alone.
       const QGauss<dim> quadrature_formula (this->get_fe().base_element(this->introspection().base_elements.temperature).degree+1);
       const unsigned int n_q_points = quadrature_formula.size();
 
@@ -62,7 +61,7 @@ namespace aspect
       cell = this->get_dof_handler().begin_active(),
       endc = this->get_dof_handler().end();
 
-      double local_radioactive_heating_integrals;
+      double local_internal_heating_integrals;
       double local_volume;
 
       // compute the integral quantities by quadrature
@@ -83,7 +82,7 @@ namespace aspect
             {
                   for(unsigned c=0;c<this->n_compositional_fields();c++)
                         composition_values_at_q_point[c]=compositional_values[c][q];
-                  local_radioactive_heating_integrals += heating_model.specific_heating_rate(temperature_values[q],
+                  local_internal_heating_integrals += heating_model.specific_heating_rate(temperature_values[q],
                                                                                               pressure_values[q],
                                                                                               composition_values_at_q_point,
                                                                                               quadrature_points[q])*fe_values.JxW(q);
@@ -93,7 +92,7 @@ namespace aspect
       // compute the sum over all processors
       std::vector<double> local_value;
       std::vector<double> global_value;
-      local_value.push_back(local_radioactive_heating_integrals);
+      local_value.push_back(local_internal_heating_integrals);
       local_value.push_back(local_volume);
       Utilities::MPI::sum (local_value,
                            this->get_mpi_communicator(),
@@ -103,7 +102,7 @@ namespace aspect
 
       // finally produce something for the statistics file
       const std::string name("Average radioactive heating rate (W/kg) ");
-      statistics.add_value (name, global_radioactive_heating_integrals/global_volume);
+      statistics.add_value (name, global_internal_heating_integrals/global_volume);
 
       // also make sure that the other columns filled by the this object
       // all show up with sufficient accuracy and in scientific notation
@@ -113,7 +112,7 @@ namespace aspect
 
       std::ostringstream output;
       output.precision(4);
-          output << global_radioactive_heating_integrals/global_volume << " (W//kg) ";
+          output << global_internal_heating_integrals/global_volume << " (W//kg) ";
 
       return std::pair<std::string, std::string> ("Average radioactive heating rate: ",
                                                   output.str());
diff --git a/source/postprocess/visualization/internal_heating.cc b/source/postprocess/visualization/internal_heating.cc
index a65d259..bf20ccf 100644
--- a/source/postprocess/visualization/internal_heating.cc
+++ b/source/postprocess/visualization/internal_heating.cc
@@ -36,7 +36,7 @@ namespace aspect
       InternalHeating<dim>::
       InternalHeating ()
         :
-        DataPostprocessorScalar<dim> ("internal_heating",
+        DataPostprocessorScalar<dim> ("Internal heating rate",
                                       update_values | update_gradients | update_q_points)
       {}
 
@@ -59,12 +59,10 @@ namespace aspect
         Assert (uh[0].size() == dim+2+this->n_compositional_fields(), ExcInternalError());
         Assert (duh[0].size() == dim+2+this->n_compositional_fields(),ExcInternalError());
 
-//        in.position = evaluation_points;
         for (unsigned int q=0; q<n_quadrature_points; ++q)
           {
             double temperature=uh[q][dim+1];
             double pressure   =uh[q][dim];
-            Point<dim> point(evaluation_points[q]);
             std::vector<double> composition(this->n_compositional_fields());
 
             for (unsigned int c=0; c<this->n_compositional_fields(); ++c)
@@ -72,7 +70,7 @@ namespace aspect
             computed_quantities[q](0) = heating_model.specific_heating_rate(temperature,
                                                                             pressure,
                                                                             composition,
-                                                                            point);
+                                                                            evaluation_points[q]);
           }
       }
     }
@@ -90,7 +88,7 @@ namespace aspect
       ASPECT_REGISTER_VISUALIZATION_POSTPROCESSOR(InternalHeating,
                                                   "internal heating",
                                                   "A visualization output object that generates output "
-                                                  "for the internal heating rate.")
+                                                  "for the internal heating rate. Units: W/kg")
     }
   }
 }
diff --git a/cookbooks/shell_simple_2d.prm b/tests/radioactive_decay.prm
similarity index 53%
copy from cookbooks/shell_simple_2d.prm
copy to tests/radioactive_decay.prm
index bd10ea8..1bf207c 100644
--- a/cookbooks/shell_simple_2d.prm
+++ b/tests/radioactive_decay.prm
@@ -4,7 +4,7 @@
 
 set Dimension                              = 2
 set Use years in output instead of seconds = true
-set End time                               = 1.5e9
+set End time                               = 5e6
 set Output directory                       = output
 
 
@@ -24,19 +24,45 @@ subsection Geometry model
   subsection Spherical shell
     set Inner radius  = 3481000
     set Outer radius  = 6336000
-    set Opening angle = 90
   end
 end
 
+subsection Compositional fields
+  set Number of fields = 1
+end
+
+subsection Compositional initial conditions
+  set Model name = function
+
+  subsection Function
+    set Function constants  = R=6.336e6 ,Rc=300e3
+    set Variable names      = x,y
+    set Function expression = if(R-sqrt(x*x+y*y)<Rc,1,0)
+  end
+end
+
+subsection Heating model
+  set Model name = radioactive decay
+  subsection Radioactive decay
+    set Number of elements    = 2
+    set Heating rate                 = 1e-5  2e-5
+	  set Half decay time              = 5e6   2.5e6
+	  set Initial consentration mantle = 0.0   0.1
+	  set Initial consentration crust  = 0.1   0.0
+    set Crust defined by composition = true
+	set Crust composition number     = 0
+  
+  end
+end
 
 subsection Model settings
   set Zero velocity boundary indicators       = 0
-  set Tangential velocity boundary indicators = 1,2,3
+  set Tangential velocity boundary indicators = 1
   set Prescribed velocity boundary indicators =
 
   set Fixed temperature boundary indicators   = 0,1
 
-  set Include shear heating                   = true
+  set Include shear heating                   = false
 end
 
 
@@ -60,23 +86,20 @@ end
 
 
 subsection Mesh refinement
-  set Initial global refinement          = 5
-  set Initial adaptive refinement        = 4
+  set Initial global refinement          = 4
+  set Initial adaptive refinement        = 0
   set Strategy                           = temperature
-  set Time steps between mesh refinement = 15
+  set Time steps between mesh refinement = 0
 end
 
 
 subsection Postprocess
-  set List of postprocessors = visualization, velocity statistics, temperature statistics, heat flux statistics, depth average
+  set List of postprocessors = visualization , internal heating statistics
 
   subsection Visualization
     set Output format                 = vtu
-    set Time between graphical output = 1e6
+    set List of output variables      = internal heating
+	set Time between graphical output = 1e6
     set Number of grouped files       = 0
   end
-
-  subsection Depth average
-    set Time between graphical output = 1e6
-  end
 end



More information about the CIG-COMMITS mailing list