forked from ECP-WarpX/WarpX
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added normalization of M magnitude at each iteration of 2nd order al…
…gorithm (#32) * added normalization in 2nd order evolveM and input file for debug * added normalizationto M * test commit #1 * test commit #2 * added field output lines * added python script for viz * turned off LLG-EM coupling * turned off LLG-EM coupling * fixed white space at line end * changed python script name * Delete M time sequence.ipynb duplicate file * clear up no coupling lines * clear up output functions * Delete M_time_sequence.ipynb * Added new line at end of inputs_3d.evolveM2nd * Added new line at the end of WarpX.cpp * make file easier to read Co-authored-by: Andy Nonaka <[email protected]>
- Loading branch information
1 parent
0e1b80b
commit 36b188d
Showing
2 changed files
with
158 additions
and
1 deletion.
There are no files selected for viewing
107 changes: 107 additions & 0 deletions
107
Examples/Tests/Macroscopic_Maxwell/inputs_3d.evolveM2nd
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,107 @@ | ||
################################ | ||
####### GENERAL PARAMETERS ###### | ||
################################# | ||
max_step = 1000 | ||
amr.n_cell = 8 8 8 # number of cells spanning the domain in each coordinate direction at level 0 | ||
amr.max_grid_size = 512 # maximum size of each AMReX box, used to decompose the domain | ||
amr.blocking_factor = 8 | ||
geometry.coord_sys = 0 | ||
geometry.is_periodic = 1 1 1 | ||
|
||
geometry.prob_lo = -1.5e-6 -1.5e-6 -1.5e-6 | ||
geometry.prob_hi = 1.5e-6 1.5e-6 1.5e-6 | ||
|
||
amr.max_level = 0 | ||
|
||
################################# | ||
############ NUMERICS ########### | ||
################################# | ||
warpx.verbose = 0 | ||
warpx.use_filter = 0 | ||
warpx.cfl = 4000 | ||
warpx.do_pml = 0 | ||
warpx.mag_time_scheme_order = 2 # default 1 | ||
particles.nspecies = 0 | ||
|
||
algo.em_solver_medium = macroscopic # vacuum/macroscopic | ||
|
||
algo.macroscopic_sigma_method = laxwendroff # laxwendroff or backwardeuler | ||
macroscopic.sigma_init_style = "parse_sigma_function" # parse or "constant" | ||
macroscopic.sigma_function(x,y,z) = "0.0" | ||
#macroscopic.sigma = 0.0 | ||
|
||
macroscopic.epsilon_init_style = "parse_epsilon_function" # parse or "constant" | ||
macroscopic.epsilon_function(x,y,z) = "8.8541878128e-12" | ||
#macroscopic.epsilon = 8.8541878128e-12 | ||
|
||
macroscopic.mu_init_style = "parse_mu_function" # parse or "constant" | ||
macroscopic.mu_function(x,y,z) = "1.25663706212e-06" | ||
#macroscopic.mu = 1.25663706212e-06 | ||
|
||
#unit conversion: 1 Gauss = (1000/4pi) A/m | ||
macroscopic.mag_Ms_init_style = "parse_mag_Ms_function" # parse or "constant" | ||
macroscopic.mag_Ms_function(x,y,z) = "1.4e5" | ||
#macroscopic.mag_Ms = 1.4e5 # in unit A/m, equal to 1750 Gauss | ||
|
||
macroscopic.mag_alpha_init_style = "parse_mag_alpha_function" # parse or "constant" | ||
macroscopic.mag_alpha_function(x,y,z) = "5e-01" | ||
#macroscopic.mag_alpha = 5e-01 # alpha is unitless, typical values range from 1e-3 ~ 1e-5 | ||
|
||
macroscopic.mag_gamma_init_style = "parse_mag_gamma_function" # parse or "constant" | ||
macroscopic.mag_gamma_function(x,y,z) = "-1.759e11" | ||
#macroscopic.mag_gamma = -1.759e11 # gyromagnetic ratio is constant for electrons in all materials | ||
|
||
macroscopic.mag_max_iter = 100 # maximum number of M iteration in each time step | ||
macroscopic.mag_tol = 0.00001 # M magnitude relative error tolerance compared to previous iteration | ||
macroscopic.mag_normalized_error = 0.1 # if M magnitude relatively changes more than this value, raise a red flag | ||
|
||
################################# | ||
############ FIELDS ############# | ||
################################# | ||
my_constants.pi = 3.14159265359 | ||
my_constants.L = 141.4213562373095e-6 | ||
my_constants.c = 299792458. | ||
my_constants.wavelength = 1.2e-1 | ||
|
||
warpx.E_ext_grid_init_style = parse_E_ext_grid_function | ||
|
||
warpx.Ex_external_grid_function(x,y,z) = 0. | ||
warpx.Ey_external_grid_function(x,y,z) = 0. | ||
#warpx.Ey_external_grid_function(x,y,z) = "1.e5exp(-z2/L2)cos(2piz/wavelength)" | ||
warpx.Ez_external_grid_function(x,y,z) = 0. | ||
|
||
warpx.B_ext_grid_init_style = parse_B_ext_grid_function | ||
warpx.Bx_external_grid_function(x,y,z)= 0.1759 | ||
#warpx.Bx_external_grid_function(x,y,z)= 0. | ||
#warpx.Bx_external_grid_function(x,y,z)= "-1.e5exp(-z2/L2)cos(2piz/wavelength)/c" | ||
warpx.By_external_grid_function(x,y,z)= 0. | ||
warpx.Bz_external_grid_function(x,y,z) = 0. | ||
|
||
#unit conversion: 1 Gauss = 1 Oersted = (1000/4pi) A/m | ||
#calculation of H_bias: H_bias (oe) = frequency / 2.8e6 | ||
|
||
warpx.H_bias_ext_grid_init_style = parse_H_bias_ext_grid_function | ||
warpx.Hx_bias_external_grid_function(x,y,z)= 0. | ||
warpx.Hy_bias_external_grid_function(x,y,z)= 0. | ||
warpx.Hz_bias_external_grid_function(x,y,z)= 3e4 # in A/m, equal to 382 Oersted | ||
#warpx.Hz_bias_external_grid_function(x,y,z)= 0. # in A/m, equal to 382 Oersted | ||
|
||
#warpx.H_bias_ext_grid_init_style = constant | ||
#warpx.Hx_bias_external_grid = 0 | ||
#warpx.Hy_bias_external_grid = 0 | ||
#warpx.Hz_bias_external_grid = 0 | ||
|
||
#warpx.M_ext_grid_init_style = parse_M_ext_grid_function | ||
#warpx.Mx_external_grid_function(x,y,z)= "-1.e5exp(-z2/L2)cos(2piz/wavelength)/c" | ||
#warpx.My_external_grid_function(x,y,z)= 0. | ||
#warpx.Mz_external_grid_function(x,y,z) = 0. | ||
|
||
warpx.M_ext_grid_init_style = constant | ||
warpx.M_external_grid = 140000. 0. 0. | ||
|
||
#Diagnostics | ||
diagnostics.diags_names = plt | ||
plt.period = 100 | ||
plt.diag_type = Full | ||
plt.fields_to_plot = Ex Ey Ez Bx By Bz Mx_xface My_xface Mz_xface Mx_yface My_yface Mz_yface Mx_zface My_zface Mz_zface | ||
plt.plot_raw_fields = 0 |
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