Skip to content

Commit

Permalink
adapt test
Browse files Browse the repository at this point in the history
  • Loading branch information
jdannberg committed Aug 17, 2023
1 parent c6716f1 commit 633c35a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions tests/particle_interpolator_harmonic_average_solkz.prm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
# least squares interpolation from particle properties to
# compositional fields that are flagged as 'particle' advected fields.

# Note that since the test performs harmonic averaging, the density
# values being averaged all have to be positive, which required a
# modification of the original density from the benchmark. Therefore,
# the error in pressure is large (since the pressure no longer
# corresponds to the analytical solution).

set Additional shared libraries = ./libparticle_interpolator_harmonic_average_solkz.so

############### Global parameters
Expand Down Expand Up @@ -72,12 +78,14 @@ subsection Compositional fields
set Mapped particle properties = density_comp:function[0], viscosity_comp:function[1]
end

# The initial condition is adapted from the original solkz benchmark by adding a constant
# value of 1 to keep all properties positive (which is necessary for harmonic averaging)
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)
set Function expression = 1 - sin(2*z) * cos(3*pi*x); exp(log(eta_b)*z)
end
end

Expand All @@ -96,11 +104,13 @@ subsection Postprocess
set Maximum particles per cell = 4096
set Update ghost particles = true

# The initial condition is adapted from the original solkz benchmark by adding a constant
# value of 1 to keep all properties positive (which is necessary for harmonic averaging)
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)
set Function expression = 1 - sin(2*z) * cos(3*pi*x); exp(log(eta_b)*z)
end

set Particle generator name = reference cell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Number of degrees of freedom: 8,164 (2,178+289+1,089+2,304+2,304)

Postprocessing:
Number of advected particles: 4096
Errors u_L1, p_L1, u_L2, p_L2: 1.041640e-06, 1.716573e-03, 1.849065e-06, 3.085735e-03
Errors u_L1, p_L1, u_L2, p_L2: 4.231884e-07, 2.467717e-01, 6.352882e-07, 2.849793e-01

Termination requested by criterion: end time

Expand Down

0 comments on commit 633c35a

Please sign in to comment.