-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix default probability density function expression
- Loading branch information
1 parent
d91e41b
commit 7419fdc
Showing
6 changed files
with
167 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Changed: The 'random uniform' particle generator no longer uses | ||
the input parameters in the subsection 'Probability density function'. | ||
Instead it uses its own subsection 'Random uniform'. Additionally, | ||
the default parameters of the 'probability density function' generator | ||
have been fixed to allow not specifying a probability density function. | ||
If no function is specified the 'probability density function' generator | ||
now behaves identically to the 'random uniform' generator. | ||
<br> | ||
(Rene Gassmoeller, Qianyi Lu, 2024/10/21) |
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 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 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,93 @@ | ||
# A description of the van Keken et al. benchmark using smooth initial | ||
# conditions instead of the discontinuous ones in | ||
# van-keken-discontinuous.prm. See the manual for more information. | ||
# This test adds particles to the cookbook parameter file, and specifically tests | ||
# the probability density function generator when run with default parameters | ||
# for the probability density function | ||
|
||
set Dimension = 2 | ||
set End time = 70 | ||
set Use years in output instead of seconds = false | ||
|
||
subsection Geometry model | ||
set Model name = box | ||
|
||
subsection Box | ||
set X extent = 0.9142 | ||
set Y extent = 1.0000 | ||
end | ||
end | ||
|
||
subsection Boundary velocity model | ||
set Tangential velocity boundary indicators = left, right | ||
set Zero velocity boundary indicators = bottom, top | ||
end | ||
|
||
subsection Material model | ||
set Model name = simple | ||
|
||
subsection Simple model | ||
set Reference density = 1010 | ||
set Viscosity = 1e2 | ||
set Thermal expansion coefficient = 0 | ||
set Density differential for compositional field 1 = -10 | ||
end | ||
end | ||
|
||
subsection Gravity model | ||
set Model name = vertical | ||
|
||
subsection Vertical | ||
set Magnitude = 10 | ||
end | ||
end | ||
|
||
subsection Initial temperature model | ||
set Model name = function | ||
|
||
subsection Function | ||
set Function expression = 0 | ||
end | ||
end | ||
|
||
subsection Compositional fields | ||
set Number of fields = 1 | ||
end | ||
|
||
subsection Initial composition model | ||
set Model name = function | ||
|
||
subsection Function | ||
set Variable names = x,z | ||
set Function constants = pi=3.1415926 | ||
set Function expression = 0.5*(1+tanh((0.2+0.02*cos(pi*x/0.9142)-z)/0.02)) | ||
end | ||
end | ||
|
||
subsection Mesh refinement | ||
set Initial adaptive refinement = 0 | ||
set Strategy = composition | ||
set Initial global refinement = 2 | ||
set Time steps between mesh refinement = 0 | ||
set Coarsening fraction = 0.05 | ||
set Refinement fraction = 0.3 | ||
end | ||
|
||
subsection Postprocess | ||
set List of postprocessors = particles | ||
|
||
subsection Particles | ||
set Time between data output = 70 | ||
set Data output format = none | ||
end | ||
end | ||
|
||
subsection Particles | ||
set Particle generator name = probability density function | ||
|
||
subsection Generator | ||
subsection Probability density function | ||
set Number of particles = 10 | ||
end | ||
end | ||
end |
26 changes: 26 additions & 0 deletions
26
tests/particle_generator_probability_default_value/screen-output
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,26 @@ | ||
|
||
Number of active cells: 16 (on 3 levels) | ||
Number of degrees of freedom: 349 (162+25+81+81) | ||
|
||
*** Timestep 0: t=0 seconds, dt=0 seconds | ||
Skipping temperature solve because RHS is zero. | ||
Advecting particles... done. | ||
Solving C_1 system ... 0 iterations. | ||
Solving Stokes system (GMG)... 11+0 iterations. | ||
|
||
Postprocessing: | ||
Number of advected particles: 10 | ||
|
||
*** Timestep 1: t=70 seconds, dt=70 seconds | ||
Skipping temperature solve because RHS is zero. | ||
Advecting particles... done. | ||
Solving C_1 system ... 9 iterations. | ||
Solving Stokes system (GMG)... 11+0 iterations. | ||
|
||
Postprocessing: | ||
Number of advected particles: 10 | ||
|
||
Termination requested by criterion: end time | ||
|
||
|
||
|
15 changes: 15 additions & 0 deletions
15
tests/particle_generator_probability_default_value/statistics
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,15 @@ | ||
# 1: Time step number | ||
# 2: Time (seconds) | ||
# 3: Time step size (seconds) | ||
# 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 composition solver 1 | ||
# 10: Iterations for Stokes solver | ||
# 11: Velocity iterations in Stokes preconditioner | ||
# 12: Schur complement iterations in Stokes preconditioner | ||
# 13: Number of advected particles | ||
0 0.000000000000e+00 0.000000000000e+00 16 187 81 81 0 0 10 12 12 10 | ||
1 7.000000000000e+01 7.000000000000e+01 16 187 81 81 0 9 10 12 12 10 |