[cig-commits] commit 2434 by heister to /var/svn/dealii/aspect

dealii.demon at gmail.com dealii.demon at gmail.com
Tue Apr 8 15:04:17 PDT 2014


Revision 2434

add fs parameters and a prm

A   branches/freesurface/cookbooks/future/crameri_benchmark_2.prm
U   branches/freesurface/include/aspect/simulator.h
U   branches/freesurface/source/simulator/freesurface.cc
U   branches/freesurface/source/simulator/parameters.cc


http://www.dealii.org/websvn/revision.php?repname=Aspect+Repository&path=%2F&rev=2434&peg=2434

Diff:
Added: branches/freesurface/cookbooks/future/crameri_benchmark_2.prm
===================================================================
--- branches/freesurface/cookbooks/future/crameri_benchmark_2.prm	                        (rev 0)
+++ branches/freesurface/cookbooks/future/crameri_benchmark_2.prm	2014-04-08 22:04:15 UTC (rev 2434)
@@ -0,0 +1,144 @@
+set Dimension = 2
+set CFL number                             = 0.4
+set End time                               = 2e7
+set Output directory                       = output
+set Resume computation                     = false
+set Start time                             = 0
+set Adiabatic surface temperature          = 0
+set Surface pressure                       = 0
+set Pressure normalization = no
+set Linear solver tolerance = 1.e-6
+set Number of cheap Stokes solver steps    = 0 
+set Use years in output instead of seconds = true
+set Nonlinear solver scheme                = IMPES
+
+subsection Boundary temperature model
+  set Model name = box
+  subsection Box
+    set Top temperature = 0.0
+    set Bottom temperature = 0.0
+  end
+end
+
+
+subsection Discretization
+  set Stokes velocity polynomial degree       = 2
+  set Temperature polynomial degree           = 2
+  set Use locally conservative discretization = false
+  subsection Stabilization parameters
+    set alpha = 2
+    set beta  = 0.078
+    set cR    = 0.5   # default: 0.11
+  end
+end
+
+
+subsection Geometry model
+  set Model name = box
+  subsection Box
+#    set Order=1.0
+#    set Amplitude = 0.0
+    set X extent = 28.e5 
+    set Y extent = 7.e5
+    set X repetitions = 4
+  end
+end
+
+
+subsection Gravity model
+  set Model name = vertical
+  subsection Vertical
+    set Magnitude = 10.0
+  end
+end
+
+
+subsection Initial conditions
+  set Model name = function
+  subsection Function 
+    set Variable names      = x,y
+    set Function expression =  0.0
+  end
+end
+
+
+subsection Material model
+  set Model name = simple
+  subsection Simple model
+    set Reference density             = 3300
+    set Reference specific heat       = 1250
+    set Reference temperature         = 0.0
+    set Thermal conductivity          = 4.7
+    set Thermal expansion coefficient = 4e-5
+    set Viscosity                     = 1.e21
+    set Density differential for compositional field 1 =-100.0
+    set Composition viscosity prefactor = 0.1
+  end
+#  subsection Layered
+#    set Reference density             = 3300
+#    set Reference specific heat       = 1250
+#    set Reference temperature         = 0.0
+#    set Thermal conductivity          = 4.7
+#    set Thermal expansion coefficient = 4e-5
+#    set Viscosity                     = 1.e21
+#    set Density differential for compositional fields = -100.0,.00
+#    set Composition viscosity prefactors = 0.1,100.0
+#  end
+end
+
+
+subsection Mesh refinement
+  set Additional refinement times        =
+  set Initial adaptive refinement        = 2
+  set Initial global refinement          = 5  
+  set Refinement fraction                = 0.3
+  set Coarsening fraction                = 0.05
+  set Strategy                           = density,composition
+  set Refinement criteria scaling factors =
+  set Refinement criteria merge operation = plus
+  set Time steps between mesh refinement = 5
+end
+
+
+subsection Model settings
+  set Include adiabatic heating               = false
+  set Include shear heating                   = false
+  set Radiogenic heating rate                 = 0
+  set Fixed temperature boundary indicators   = 2,3
+  set Prescribed velocity boundary indicators =
+  set Tangential velocity boundary indicators = 0,1
+  set Zero velocity boundary indicators       = 2,
+end
+
+subsection Free surface
+  # A comma separated list of integers denoting those boundaries where there
+  # is a free surface. Set to nothing to disable all free surface
+  # computations.
+  set Free surface boundary indicators = 3
+
+  # Theta from Kaus et al 2010
+  set Free surface stabilization theta = 0.5
+end
+
+
+subsection Compositional fields
+  set Number of fields = 2
+end
+
+subsection Compositional initial conditions
+  set Model name = function
+  subsection Function
+    set Variable names      = x,y
+    set Function expression = if( sqrt( (x-14.e5 )^2 + (y-3.e5)^2) < 5.e4 , 1,0); if( y > 6.e5, 1, 0)
+  end
+end
+
+subsection Postprocess
+  set List of postprocessors = visualization#,topography
+  subsection Visualization
+    set List of output variables = viscosity,density
+    set Number of grouped files       = 1
+    set Output format                 = vtu
+    set Time between graphical output = 1.e6
+  end
+end

Modified: branches/freesurface/include/aspect/simulator.h
===================================================================
--- branches/freesurface/include/aspect/simulator.h	2014-04-08 21:49:59 UTC (rev 2433)
+++ branches/freesurface/include/aspect/simulator.h	2014-04-08 22:04:15 UTC (rev 2434)
@@ -277,6 +277,17 @@
         /**
          * @}
          */
+
+        /**
+         * @name Parameters that have to do with free surface
+         * @{
+         */
+        bool                           free_surface_enabled;
+        std::set<types::boundary_id> free_surface_boundary_indicators;
+        double free_surface_theta;
+        /**
+         * @}
+         */
       };
 
       /**

Modified: branches/freesurface/source/simulator/freesurface.cc
===================================================================
--- branches/freesurface/source/simulator/freesurface.cc	2014-04-08 21:49:59 UTC (rev 2433)
+++ branches/freesurface/source/simulator/freesurface.cc	2014-04-08 22:04:15 UTC (rev 2434)
@@ -36,6 +36,8 @@
 template <int dim>
 void Simulator<dim>::free_surface_execute()
 {
+  if (!parameters.free_surface_enabled)
+    return;
   pcout << "FS: free_surface_execute()" << std::endl;
 
 
@@ -50,6 +52,8 @@
 template <int dim>
 void Simulator<dim>::free_surface_make_constraints()
 {
+  if (!parameters.free_surface_enabled)
+    return;
   pcout << "FS: free_surface_make_constraints()" << std::endl;
 
 mesh_constraints.clear();
@@ -61,6 +65,8 @@
 template <int dim>
 void Simulator<dim>::free_surface_setup_dofs()
 {
+  if (!parameters.free_surface_enabled)
+    return;
   pcout << "FS: free_surface_setup_dofs()" << std::endl;
 
   // these live in the same FE as the velocity variable:

Modified: branches/freesurface/source/simulator/parameters.cc
===================================================================
--- branches/freesurface/source/simulator/parameters.cc	2014-04-08 21:49:59 UTC (rev 2433)
+++ branches/freesurface/source/simulator/parameters.cc	2014-04-08 22:04:15 UTC (rev 2434)
@@ -525,6 +525,18 @@
                          "divided by this maximum.");
     }
     prm.leave_subsection ();
+
+    prm.enter_subsection ("Free surface");
+    {
+      prm.declare_entry ("Free surface boundary indicators", "",
+                              Patterns::List (Patterns::Integer(0, std::numeric_limits<types::boundary_id>::max())),
+                              "A comma separated list of integers denoting those boundaries "
+                              "where there is a free surface. Set to nothing to disable all free surface computations.");
+      prm.declare_entry("Free surface stabilization theta", "0.5",
+                               Patterns::Double(0,1),
+                               "Theta from Kaus et al 2010");
+     }
+    prm.leave_subsection ();
   }
 
 
@@ -785,6 +797,22 @@
                    ExcMessage("Invalid input parameter file: Too many entries in List of normalized fields"));
     }
     prm.leave_subsection ();
+
+    prm.enter_subsection ("Free surface");
+        {
+          std::vector<int> x_free_surface_boundary_indicators
+            = Utilities::string_to_int
+              (Utilities::split_string_list
+               (prm.get ("Free surface boundary indicators")));
+          free_surface_boundary_indicators
+            = std::set<types::boundary_id> (x_free_surface_boundary_indicators.begin(),
+                                              x_free_surface_boundary_indicators.end());
+
+          free_surface_enabled = !free_surface_boundary_indicators.empty();
+
+          free_surface_theta = prm.get_double("Free surface stabilization theta");
+        }
+        prm.leave_subsection ();
   }
 
 


More information about the CIG-COMMITS mailing list