forked from ECP-WarpX/WarpX
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Macroscopic pml with mur in H PML #62
Open
jackieyao0114
wants to merge
37
commits into
RevathiJambunathan:evolveM_dev
Choose a base branch
from
jackieyao0114:macroscopicPML_mu
base: evolveM_dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
2e46b50
initialize and allocate macro pml mfs
RevathiJambunathan 97abb25
add level when initializing PML constructor
RevathiJambunathan 63bbf84
change to public so we can call from PML constructor
RevathiJambunathan 955e67d
Add new file for macroscopic evolveE pml account for material
RevathiJambunathan 3f5e7b0
initialize macro PML and call macro PML
RevathiJambunathan 86c452f
fix typo
RevathiJambunathan c786179
add relevant header
RevathiJambunathan 0946ea0
fix eol whitespace
RevathiJambunathan 397f387
Apply suggestions from code review
RevathiJambunathan 01510f5
Update Source/FieldSolver/FiniteDifferenceSolver/MacroscopicEvolveEPM…
RevathiJambunathan c852c39
added macroscopic mu in MacroscopicEvolveHPML
jackieyao0114 c3af5e0
removed printing residual in Source/FieldSolver/FiniteDifferenceSolve…
jackieyao0114 167cb6b
Merge branch 'evolveM_dev' into macroscopicPML_mu
ajnonaka 27f2198
Merge branch 'evolveM_dev' of https://github.com/RevathiJambunathan/W…
jackieyao0114 7689f47
updated ncomp in Source/FieldSolver/FiniteDifferenceSolver/Macroscopi…
jackieyao0114 ead2324
Merge branch 'macroscopicPML_mu' of https://github.com/jackieyao0114/…
jackieyao0114 d479e63
EOL fix
jackieyao0114 7cab0d7
fixed pml setup in Examples/Tests/Macroscopic_Maxwell/inputs_3d_noMs
jackieyao0114 cd52411
Apply suggestions from code review (annotations in code)
jackieyao0114 edac43e
clarified mur and Ms requirement in Docs/source/running_cpp/parameter…
jackieyao0114 643f04d
Update Examples/Tests/Macroscopic_Maxwell/inputs_3d_noMs
jackieyao0114 3034b3f
Update Docs/source/running_cpp/parameters.rst
jackieyao0114 a9aba04
removed part of EvolveHPML residual
jackieyao0114 993e834
removed more EvolveHPML residual
jackieyao0114 61fe0dc
removed Source/FieldSolver/FiniteDifferenceSolver/EvolveHPML.cpp
jackieyao0114 117a3a0
initialize H_indexType
ajnonaka 8f9716f
Update Source/FieldSolver/FiniteDifferenceSolver/MacroscopicEvolveHPM…
ajnonaka 537495b
cleanup only
ajnonaka 13ad49e
clean up inputs files (no functional changes)
ajnonaka 94e089f
add Ms at boundary test. sync up inputs files
ajnonaka f1ce428
set alpha and gamma
ajnonaka fa0ea39
Merge branch 'evolveM_dev' into macroscopicPML_mu
ajnonaka fa24235
added Examples/Tests/Macroscopic_Maxwell/inputs_3d_LLG_MsBoundary
jackieyao0114 b5d3d03
Merge branch 'macroscopicPML_mu' of https://github.com/jackieyao0114/…
jackieyao0114 461796e
added Examples/Tests/Macroscopic_Maxwell/inputs_3d_LLG_MsBoundary
jackieyao0114 acf07ae
Merge branch 'macroscopicPML_mu' of https://github.com/jackieyao0114/…
jackieyao0114 c2146c9
Merge branch 'evolveM_dev' into macroscopicPML_mu
ajnonaka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
73 changes: 73 additions & 0 deletions
73
Examples/Tests/Macroscopic_Maxwell/inputs_3d_LLG_MsBoundary
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,73 @@ | ||
# This is a E+H (use USE_LLG=TRUE) simulation of a | ||
# plane wave in a periodic domain | ||
################################ | ||
####### GENERAL PARAMETERS ###### | ||
################################# | ||
max_step = 1000 | ||
amr.n_cell = 16 16 128 | ||
amr.max_grid_size = 32 | ||
amr.blocking_factor = 16 | ||
geometry.coord_sys = 0 | ||
geometry.is_periodic = 1 1 0 | ||
geometry.prob_lo = -16.e-6 -16.e-6 -128.e-6 | ||
geometry.prob_hi = 16.e-6 16.e-6 128.e-6 | ||
amr.max_level = 0 | ||
|
||
################################# | ||
############ NUMERICS ########### | ||
################################# | ||
warpx.verbose = 0 | ||
warpx.use_filter = 0 | ||
warpx.cfl = 0.9 | ||
warpx.do_pml = 1 | ||
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.epsilon_init_style = "parse_epsilon_function" # parse or "constant" | ||
macroscopic.epsilon_function(x,y,z) = "epsilon_r*8.8541878128e-12" | ||
macroscopic.mu_init_style = "parse_mu_function" # parse or "constant" | ||
macroscopic.mu_function(x,y,z) = "mu_r*1.25663706212e-06" | ||
particles.nspecies = 0 | ||
|
||
################################# | ||
############ FIELDS ############# | ||
################################# | ||
my_constants.mu_r = 4 | ||
my_constants.epsilon_r = 1 | ||
my_constants.pi = 3.14159265359 | ||
my_constants.L = 141.4213562373095e-6 | ||
my_constants.c = 299792458. | ||
my_constants.wavelength = 64.e-6 | ||
|
||
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) = "1.e7*exp(-z**2/L**2)*cos(2*pi*z/wavelength * sqrt(epsilon_r*mu_r))" | ||
warpx.Ez_external_grid_function(x,y,z) = 0. | ||
|
||
warpx.H_ext_grid_init_style = parse_H_ext_grid_function | ||
warpx.Hx_external_grid_function(x,y,z) = "-1.e7*exp(-z**2/L**2)*cos(2*pi*z/wavelength * sqrt(epsilon_r*mu_r)) / sqrt( mu_r*1.25663706212e-06 / (epsilon_r*8.8541878128e-12) )" | ||
warpx.Hy_external_grid_function(x,y,z) = 0. | ||
warpx.Hz_external_grid_function(x,y,z) = 0. | ||
|
||
# If you want to use a USE_LLG build with Ms=0 everywhere, uncomment these settings | ||
warpx.mag_M_normalization = 1 | ||
macroscopic.mag_Ms_init_style = parse_mag_Ms_function | ||
macroscopic.mag_Ms_function(x,y,z) = "1.4e5 * (z>64e-6)" | ||
|
||
macroscopic.mag_alpha_init_style = "parse_mag_alpha_function" # parse or "constant" | ||
macroscopic.mag_alpha_function(x,y,z) = "0.0058 * (z>64e-6)" # alpha is unitless, calculated from linewidth Delta_H = 40 Oersted | ||
|
||
macroscopic.mag_gamma_init_style = "parse_mag_gamma_function" # parse or "constant" | ||
macroscopic.mag_gamma_function(x,y,z) = "-1.759e11 * (z>64e-6)" # gyromagnetic ratio is constant for electrons in all materials | ||
|
||
warpx.M_ext_grid_init_style = parse_M_ext_grid_function | ||
warpx.Mx_external_grid_function(x,y,z)= 0. | ||
warpx.My_external_grid_function(x,y,z)= "1.4e5 * (z>64e-6)" | ||
warpx.Mz_external_grid_function(x,y,z) = 0. | ||
|
||
# Diagnostics | ||
diagnostics.diags_names = plt | ||
plt.period = 10 | ||
plt.fields_to_plot = Ex Ey Ez Hx Hy Hz Bx By Bz Mx_xface My_xface Mz_xface Mx_yface My_yface Mz_yface Mx_zface My_zface Mz_zface | ||
plt.diag_type = Full |
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
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we actually enforcing this in the code with an Abort(), or warning with a Warn(), or neither? Is it more accurate to say that the value of mu_r in regions where Ms != 0 simply doesn't matter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Operationally, it is true that the value of mu_r in regions where Ms != 0 simply doesn't matter. But I'm concerned this might be misleading. Maybe a warning should be added in the next PR (together with this document)?