Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for bilinear least squares particle interpolation scheme
- Loading branch information
1 parent
dfd3447
commit 6bea2d6
Showing
6 changed files
with
171 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#include "../benchmarks/solkz/compositional_fields/solkz_compositional_fields.cc" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
# A description of the SolKZ benchmark using active particles | ||
# to interpolate both density and viscosity onto the compositional | ||
# fields for which a known solution is available. See the manual | ||
# for more information. | ||
|
||
set Additional shared libraries = ./libparticle_interpolator_bilinear_solkz.so | ||
|
||
############### Global parameters | ||
|
||
set Dimension = 2 | ||
|
||
set Start time = 0 | ||
set End time = 0 | ||
|
||
set Output directory = output | ||
|
||
set Pressure normalization = volume | ||
|
||
############### Parameters describing the model | ||
|
||
subsection Geometry model | ||
set Model name = box | ||
|
||
subsection Box | ||
set X extent = 1 | ||
set Y extent = 1 | ||
end | ||
end | ||
|
||
subsection Model settings | ||
set Prescribed velocity boundary indicators = | ||
set Tangential velocity boundary indicators = left, right, bottom, top | ||
set Zero velocity boundary indicators = | ||
end | ||
|
||
subsection Material model | ||
set Model name = SolKzCompositionalMaterial | ||
end | ||
|
||
subsection Gravity model | ||
set Model name = vertical | ||
end | ||
|
||
############### Parameters describing the temperature field | ||
|
||
subsection Boundary temperature model | ||
set Model name = box | ||
end | ||
|
||
subsection Initial temperature model | ||
set Model name = perturbed box | ||
end | ||
|
||
############### Parameters describing the discretization | ||
|
||
subsection Discretization | ||
set Stokes velocity polynomial degree = 2 | ||
set Use locally conservative discretization = false | ||
set Use discontinuous composition discretization = true | ||
end | ||
|
||
subsection Mesh refinement | ||
set Initial adaptive refinement = 0 | ||
set Initial global refinement = 5 | ||
end | ||
|
||
############### Parameters describing the compositional field | ||
# Note: The compositional field is what drives the flow | ||
# in this example | ||
|
||
subsection Compositional fields | ||
set Number of fields = 2 | ||
set Names of fields = density_comp, viscosity_comp | ||
set Compositional field methods = particles, particles | ||
set Mapped particle properties = density_comp:function[0], viscosity_comp:function[1] | ||
end | ||
|
||
subsection Initial composition model | ||
set Model name = function | ||
subsection Function | ||
set Variable names = x,z | ||
set Function constants = pi=3.1415926, eta_b=1e6 | ||
set Function expression = -1 * sin(2*z) * cos(3*pi*x); exp(log(eta_b)*z) | ||
end | ||
end | ||
|
||
############### Parameters describing what to do with the solution | ||
|
||
subsection Postprocess | ||
set List of postprocessors = particles, SolKzPostprocessor | ||
|
||
subsection Particles | ||
set Number of particles = 16384 | ||
set Time between data output = 0 | ||
set Data output format = vtu | ||
set List of particle properties = function | ||
set Integration scheme = rk2 | ||
set Interpolation scheme = cell average | ||
set Maximum particles per cell = 16384 | ||
set Update ghost particles = true | ||
|
||
subsection Function | ||
set Number of components = 2 | ||
set Variable names = x, z | ||
set Function constants = pi=3.1415926, eta_b=1e6 | ||
set Function expression = -1 * sin(2*z) * cos(3*pi*x); exp(log(eta_b)*z) | ||
end | ||
|
||
set Particle generator name = reference cell | ||
|
||
subsection Generator | ||
subsection Reference cell | ||
set Number of particles per cell per direction = 4 | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
----------------------------------------------------------------------------- | ||
----------------------------------------------------------------------------- | ||
|
||
Loading shared library <./libparticle_interpolator_bilinear_solkz.so> | ||
|
||
Number of active cells: 1,024 (on 6 levels) | ||
Number of degrees of freedom: 32,196 (8,450+1,089+4,225+9,216+9,216) | ||
|
||
*** Timestep 0: t=0 years | ||
Skipping temperature solve because RHS is zero. | ||
Rebuilding Stokes preconditioner... | ||
Solving Stokes system... 46+0 iterations. | ||
|
||
Postprocessing: | ||
Writing particle output: output-particle_interpolator_bilinear_solkz/particles/particles-00000 | ||
Errors u_L1, p_L1, u_L2, p_L2: 2.396693e-07, 3.813761e-04, 3.798509e-07, 1.430329e-03 | ||
|
||
Termination requested by criterion: end time | ||
|
||
|
||
+---------------------------------------------+------------+------------+ | ||
+---------------------------------+-----------+------------+------------+ | ||
+---------------------------------+-----------+------------+------------+ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# 1: Time step number | ||
# 2: Time (years) | ||
# 3: Time step size (years) | ||
# 4: Number of mesh cells | ||
# 5: Number of Stokes degrees of freedom | ||
# 6: Number of temperature degrees of freedom | ||
# 7: Number of degrees of freedom for all compositions | ||
# 8: Iterations for temperature solver | ||
# 9: Iterations for Stokes solver | ||
# 10: Velocity iterations in Stokes preconditioner | ||
# 11: Schur complement iterations in Stokes preconditioner | ||
# 12: Number of advected particles | ||
# 13: Particle file name | ||
0 0.000000000000e+00 0.000000000000e+00 1024 9539 4225 18432 0 46 47 46 16384 output-particle_interpolator_bilinear_solkz/output-particle_interpolator_bilinear_solkz/particles/particles-00000 |