aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Example/Langmuir/inputs.multi.2d.rt27
1 files changed, 18 insertions, 9 deletions
diff --git a/Example/Langmuir/inputs.multi.2d.rt b/Example/Langmuir/inputs.multi.2d.rt
index 03e68f231..ce4cd37ea 100644
--- a/Example/Langmuir/inputs.multi.2d.rt
+++ b/Example/Langmuir/inputs.multi.2d.rt
@@ -15,9 +15,9 @@ amr.plot_int = 20 # How often to write plotfiles. "<= 0" means no plotfiles.
# Geometry
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 1 # Is periodic?
-geometry.prob_lo = -20.e-6 -20.e-6 # physical domain
-geometry.prob_hi = 20.e-6 20.e-6
+geometry.is_periodic = 1 1 # Is periodic?
+geometry.prob_lo = -20.e-6 -20.e-6 # physical domain
+geometry.prob_hi = 20.e-6 20.e-6
warpx.serialize_ics = 1
@@ -38,6 +38,13 @@ interpolation.noz = 1
# CFL
warpx.cfl = 1.0
+# Parameters for the plasma wave
+constants.use_my_constants = 1
+constants.constant_names = epsilon kp k
+constants.constant_values = 0.01 376357.71524190728 314159.2653589793
+# Note: kp is calculated in SI for a density of 4e24 (i.e. 2e24 electrons + 2e24 positrons)
+# k is calculated so as to have 2 periods within the 40e-6 wide box.
+
# Particles
particles.nspecies = 2
particles.species_names = electrons positrons
@@ -55,9 +62,10 @@ electrons.zmax = 20.e-6
electrons.profile = constant
electrons.density = 2.e24 # number of electrons per m^3
-electrons.momentum_distribution_type = "custom"
-# See CustomMomentumProb for a definition of the parameters
-electrons.custom_momentum_params = -0.01 4.e24 2 2 2
+electrons.momentum_distribution_type = parse_momentum_function
+electrons.momentum_function_ux(x,y,z) = "epsilon * k/kp * sin(k*x) * cos(k*y) * cos(k*z)"
+electrons.momentum_function_uy(x,y,z) = "epsilon * k/kp * cos(k*x) * sin(k*y) * cos(k*z)"
+electrons.momentum_function_uz(x,y,z) = "epsilon * k/kp * cos(k*x) * cos(k*y) * sin(k*z)"
positrons.charge = q_e
positrons.mass = m_e
@@ -72,6 +80,7 @@ positrons.zmax = 20.e-6
positrons.profile = constant
positrons.density = 2.e24 # number of positrons per m^3
-positrons.momentum_distribution_type = "custom"
-# See CustomMomentumProb for a definition of the parameters
-positrons.custom_momentum_params = 0.01 4.e24 2 2 2
+positrons.momentum_distribution_type = parse_momentum_function
+positrons.momentum_function_ux(x,y,z) = "-epsilon * k/kp * sin(k*x) * cos(k*y) * cos(k*z)"
+positrons.momentum_function_uy(x,y,z) = "-epsilon * k/kp * cos(k*x) * sin(k*y) * cos(k*z)"
+positrons.momentum_function_uz(x,y,z) = "-epsilon * k/kp * cos(k*x) * cos(k*y) * sin(k*z)"