-
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
base: evolveM_dev
Are you sure you want to change the base?
Macroscopic pml with mur in H PML #62
Conversation
Co-authored-by: Andy Nonaka <[email protected]>
…L.cpp Co-authored-by: Andy Nonaka <[email protected]>
…r/MacroscopicEvolveHPML.cpp
…arpX into macroscopicPML_mu
…WarpX into macroscopicPML_mu
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.
Thank you @jackieyao0114 for this PR.
In the implementation it looks like we expect the user to ensure mu_r and Ms are consistently initialized in the input file.
If this is the case, can you please add a couple of lines in the documentation explaining this?
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.is_periodic = 1 1 1 |
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.
was there a reason for this to be changed to periodic?
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.
oh no, this is just the residual in the test. I'll change it back
Source/FieldSolver/FiniteDifferenceSolver/MacroscopicEvolveHPML.cpp
Outdated
Show resolved
Hide resolved
Source/FieldSolver/FiniteDifferenceSolver/MacroscopicEvolveHPML.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Andy Nonaka <[email protected]>
The explanation has been added in |
@@ -301,9 +307,17 @@ class FiniteDifferenceSolver | |||
#ifdef WARPX_MAG_LLG | |||
template< typename T_Algo > | |||
void EvolveHPMLCartesian ( |
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.
coud you remove this unused function
@@ -148,6 +148,12 @@ class FiniteDifferenceSolver | |||
void EvolveHPML ( std::array< amrex::MultiFab*, 3 > Hfield, |
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.
delete this function too
Co-authored-by: Revathi Jambunathan <[email protected]>
Co-authored-by: Revathi Jambunathan <[email protected]>
@@ -1236,7 +1238,10 @@ Numerics and algorithms | |||
* ``macroscopic.sigma``, ``macroscopic.epsilon``, ``macroscopic.mu`` (`double`) | |||
To initialize a constant conductivity, permittivity, and permeability of the | |||
computational medium, respectively. The default values are the corresponding values | |||
in vacuum. | |||
in vacuum. | |||
In particular, if `USE_LLG=TRUE` in the GNUMakefile and `mag_Ms` is non-zero, ``macroscopic.mu`` must be set to the vacuum value (``mu0``, i.e. 1.25663706212e-06). |
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)?
Source/FieldSolver/FiniteDifferenceSolver/MacroscopicEvolveHPML.cpp
Outdated
Show resolved
Hide resolved
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.
Approve pending two minor comments.
This PR is to add the macroscopic material property
mu_r
into evolving H field in the PML, especially when Ms=0 such thatmu_r
is essential for phase matching at the interface between the real box and PML box.One sample case of a plane wave traveling in a medium with
mu_r=4
andMs=0
is shown below:The input file used to generate the animation is copied here: