aboutsummaryrefslogtreecommitdiff
path: root/Examples/Modules/embedded_boundary_rotated_cube/inputs_3d
blob: 268655199d7c448d5df207c0ae3b43ae3812b829 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
stop_time = 5.303669113650618e-09
amr.n_cell = 64 64 64
amr.max_grid_size = 128
amr.max_level = 0

geometry.dims = 3
geometry.prob_lo     = -0.8 -0.8 -0.8
geometry.prob_hi     =  0.8  0.8  0.8
warpx.cfl = 1

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

algo.maxwell_solver = ect

my_constants.xmin = -0.5
my_constants.ymin = -0.5
my_constants.zmin = -0.5
my_constants.xmax = 0.5
my_constants.ymax = 0.5
my_constants.zmax = 0.5
my_constants.pi = 3.141592653589793
my_constants.theta = pi/6

warpx.eb_implicit_function = "max(max(max(x+xmin,-(x+xmax)), max(y*cos(-theta)-z*sin(-theta)+ymin,-(y*cos(-theta)-z*sin(-theta)+ymax))), max(y*sin(-theta)+z*cos(-theta)+zmin,-(y*sin(-theta)+z*cos(-theta)+zmax)))"

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.x_cent = 0.
my_constants.y_cent = 0.
my_constants.z_cent = 0.
my_constants.h_2 = (m * pi / Lx) ** 2 + (n * pi / Ly) ** 2 + (p * pi / Lz) ** 2
my_constants.mu_0 = 1.25663706212e-06

warpx.B_ext_grid_init_style = parse_B_ext_grid_function
warpx.Bx_external_grid_function(x,y,z) = -2/h_2 * mu_0 * (m * pi / Lx) * (p * pi / Lz) *
                                          sin(m * pi / Lx * (x - Lx / 2 - x_cent)) *
                                          cos(n * pi / Ly * (y*cos(-theta)-z*sin(-theta) - Ly / 2 - y_cent)) *
                                          cos(p * pi / Lz * (y*sin(-theta)+z*cos(-theta) - Lz / 2 - z_cent))

warpx.By_external_grid_function(x,y,z) = -2/h_2 * mu_0 * (n * pi / Ly) * (p * pi / Lz) *
                                          cos(m * pi / Lx * (x - Lx / 2 - x_cent)) *
                                          sin(n * pi / Ly * (y*cos(-theta)-z*sin(-theta) - Ly / 2 - y_cent)) *
                                          cos(p * pi / Lz * (y*sin(-theta)+z*cos(-theta) - Lz / 2 - z_cent)) *
                                          cos(theta) -
                                          mu_0 *
                                          cos(m * pi / Lx * (x - Lx / 2 - x_cent)) *
                                          cos(n * pi / Ly * (y*cos(-theta)-z*sin(-theta) - Ly / 2 - y_cent)) *
                                          sin(p * pi / Lz * (y*sin(-theta)+z*cos(-theta) - Lz / 2 - z_cent)) *
                                          sin(theta)

warpx.Bz_external_grid_function(x,y,z) = mu_0 *
                                         cos(m * pi / Lx * (x - Lx / 2 - x_cent)) *
                                         cos(n * pi / Ly * (y*cos(-theta)-z*sin(-theta) - Ly / 2 - y_cent)) *
                                         sin(p * pi / Lz * (y*sin(-theta)+z*cos(-theta) - Lz / 2 - z_cent)) *
                                         cos(theta) -
                                         2/h_2 * mu_0 * (n * pi / Ly) * (p * pi / Lz) *
                                         cos(m * pi / Lx * (x - Lx / 2 - x_cent)) *
                                         sin(n * pi / Ly * (y*cos(-theta)-z*sin(-theta) - Ly / 2 - y_cent)) *
                                         cos(p * pi / Lz * (y*sin(-theta)+z*cos(-theta) - Lz / 2 - z_cent)) *
                                         sin(theta)


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