Skip to content

Commit 35dcfd8

Browse files
authored
Merge pull request #2359 from gassmoeller/release-2.0.1-picks2358
Disable combining particle with free surface
2 parents 9d33e08 + a034c41 commit 35dcfd8

File tree

3 files changed

+145
-0
lines changed

3 files changed

+145
-0
lines changed

source/particle/world.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,13 @@ namespace aspect
826826
"diameter in one time step and therefore skip the layer "
827827
"of ghost cells around the local subdomain."));
828828

829+
AssertThrow(!this->get_parameters().free_surface_enabled,
830+
ExcMessage("Combining particles and a free surface is currently untested "
831+
"and not officially supported. If you disable this assertion make "
832+
"sure you benchmark the particle accuracy, and carefully check for "
833+
"problems related to storing the particle reference coordinates for "
834+
"a deforming mesh."));
835+
829836
prm.enter_subsection("Postprocess");
830837
{
831838
prm.enter_subsection("Particles");

tests/particle_free_surface.prm

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# A test that makes sure that the model crashes with the expected
2+
# error message if particles are combined with a free surface.
3+
4+
# EXPECT FAILURE
5+
6+
set Dimension = 2
7+
set End time = 70
8+
set Use years in output instead of seconds = false
9+
set Pressure normalization = no
10+
11+
subsection Geometry model
12+
set Model name = box
13+
subsection Box
14+
set X extent = 0.9142
15+
set Y extent = 1.0000
16+
end
17+
end
18+
19+
subsection Boundary velocity model
20+
set Tangential velocity boundary indicators = left, right
21+
set Zero velocity boundary indicators = bottom
22+
end
23+
24+
subsection Free surface
25+
set Free surface boundary indicators = top
26+
end
27+
28+
subsection Material model
29+
set Model name = simple
30+
subsection Simple model
31+
set Reference density = 1010
32+
set Viscosity = 1e2
33+
set Thermal expansion coefficient = 0
34+
end
35+
end
36+
37+
subsection Gravity model
38+
set Model name = vertical
39+
subsection Vertical
40+
set Magnitude = 10
41+
end
42+
end
43+
44+
45+
############### Parameters describing the temperature field
46+
# Note: The temperature plays no role in this model
47+
48+
subsection Boundary temperature model
49+
set List of model names = box
50+
end
51+
52+
subsection Initial temperature model
53+
set Model name = function
54+
subsection Function
55+
set Function expression = 0
56+
end
57+
end
58+
59+
60+
############### Parameters describing the compositional field
61+
# Note: The compositional field is what drives the flow
62+
# in this example
63+
64+
subsection Compositional fields
65+
set Number of fields = 1
66+
end
67+
68+
subsection Initial composition model
69+
set Model name = function
70+
subsection Function
71+
set Variable names = x,z
72+
set Function constants = pi=3.1415926
73+
set Function expression = 0.5*(1+tanh((0.2+0.02*cos(pi*x/0.9142)-z)/0.02))
74+
end
75+
end
76+
77+
subsection Material model
78+
subsection Simple model
79+
set Density differential for compositional field 1 = -10
80+
end
81+
end
82+
83+
84+
############### Parameters describing the discretization
85+
86+
subsection Mesh refinement
87+
set Initial adaptive refinement = 0
88+
set Strategy = composition
89+
set Initial global refinement = 4
90+
set Time steps between mesh refinement = 0
91+
set Coarsening fraction = 0.05
92+
set Refinement fraction = 0.3
93+
end
94+
95+
96+
97+
############### Parameters describing what to do with the solution
98+
99+
subsection Postprocess
100+
set List of postprocessors = velocity statistics, composition statistics,particles
101+
102+
subsection Particles
103+
set Number of particles = 10
104+
set Time between data output = 70
105+
set Data output format = vtu
106+
set List of particle properties = velocity,function, initial composition, initial position
107+
108+
subsection Function
109+
set Variable names = x,z
110+
set Function expression = if( (z>0.2+0.02*cos(pi*x/0.9142)) , 0 , 1 )
111+
end
112+
113+
set Particle generator name = uniform box
114+
115+
subsection Generator
116+
subsection Uniform box
117+
set Minimum x = 0.3
118+
set Maximum x = 0.5
119+
set Minimum y = 0.1
120+
set Maximum y = 0.3
121+
end
122+
end
123+
end
124+
end
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
ERROR: Uncaught exception in MPI_InitFinalize on proc 0. Skipping MPI_Finalize() to avoid a deadlock.
3+
4+
5+
Exception 'ExcMessage("Combining particles and a free surface is currently untested " "and not officially supported. If you disable this assertion make " "sure you benchmark the particle accuracy, and carefully check for " "problems related to storing the particle reference coordinates for " "a deforming mesh.")' on rank 0 on processing:
6+
7+
An error occurred in file <world.cc> in function
8+
(line in output replaced by default.sh script)
9+
The violated condition was:
10+
!this->get_parameters().free_surface_enabled
11+
Additional information:
12+
Combining particles and a free surface is currently untested and not officially supported. If you disable this assertion make sure you benchmark the particle accuracy, and carefully check for problems related to storing the particle reference coordinates for a deforming mesh.
13+
14+
Aborting!

0 commit comments

Comments
 (0)