aboutsummaryrefslogtreecommitdiff
path: root/Examples/Modules/embedded_boundary_cube/inputs_3d
blob: 4c1841487b1bbaeeff6d10c80e188a63e5f7484c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
stop_time = 1.3342563807926085e-08
amr.n_cell = 48 48 48
amr.max_grid_size = 128
amr.max_level = 0

geometry.coord_sys   = 0
geometry.prob_lo     = -0.8 -0.8 -0.8
geometry.prob_hi     =  0.8  0.8  0.8
warpx.const_dt = 1e-6
warpx.cfl = 1

boundary.field_lo = pec pec pec
boundary.field_hi = pec pec pec

eb2.geom_type = box
eb2.box_lo = -0.5 -0.5 -0.5
eb2.box_hi = 0.5 0.5 0.5
eb2.box_has_fluid_inside = true
# Alternatively one could use parser to build EB
# Note that for amrex EB implicit function, >0 is covered, =0 is boundary and <0 is regular.
# warpx.eb_implicit_function = "max(max(max(x-0.5,-0.5-x), max(y-0.5,-0.5-y)), max(z-0.5,-0.5-z))"

warpx.B_ext_grid_init_style = parse_B_ext_grid_function
my_constants.m = 0
my_constants.n = 1
my_constants.p = 1
my_constants.Lx = 1
my_constants.Ly = 1
my_constants.Lz = 1
my_constants.h_2 = (m * pi / Lx) ** 2 + (n * pi / Ly) ** 2 + (p * pi / Lz) ** 2

warpx.By_external_grid_function(x,y,z) = -2/h_2 * (n * pi / Ly) * (p * pi / Lz) * cos(m * pi / Lx * (x - Lx / 2)) * sin(n * pi / Ly * (y - Ly / 2)) * cos(p * pi / Lz * (z - Lz / 2))*mu0*(x>-Lx/2)*(x<Lx/2)*(y>-Ly/2)*(y<Ly/2)*(z>-Lz/2)*(z<Lz/2)
warpx.Bx_external_grid_function(x,y,z) = -2/h_2 * (m * pi / Lx) * (p * pi / Lz) * sin(m * pi / Lx * (x - Lx / 2)) * cos(n * pi / Ly * (y - Ly / 2)) * cos(p * pi / Lz * (z - Lz / 2))*mu0*(x>-Lx/2)*(x<Lx/2)*(y>-Ly/2)*(y<Ly/2)*(z>-Lz/2)*(z<Lz/2)
warpx.Bz_external_grid_function(x,y,z) = cos(m * pi / Lx * (x - Lx / 2)) * cos(n * pi / Ly * (y - Ly / 2)) * sin(p * pi / Lz * (z - Lz / 2))*mu0*(x>-0.5)*(x<0.5)*(y>-0.5)*(y<0.5)*(z>-0.5)*(z<0.5)

diagnostics.diags_names = diag1
diag1.intervals = 1000
diag1.diag_type = Full
diag1.fields_to_plot = Ex Ey Ez Bx By Bz