-
Notifications
You must be signed in to change notification settings - Fork 112
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
Maxwell 1D (Wave Equation) #1949
Conversation
Review checklistThis checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging. Purpose and scope
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1949 +/- ##
==========================================
- Coverage 96.19% 96.19% -0.00%
==========================================
Files 460 462 +2
Lines 36993 37027 +34
==========================================
+ Hits 35584 35615 +31
- Misses 1409 1412 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks a lot! Could you please request a review from another developer in your area (Aachen/Cologne etc.) and ping Michael or me when you're ready for a final review? |
Thanks for adding this equation system! It opens opportunities for multi-material wave propagation applications between different dielectric materials. Do not forget to add the new equation capability to the landing page of the |
It is clear that the reconstruction of u from v is difficult. But could expand on the second point?
Do you mean that you distribute between magnetic and electric energy? |
Have you considered solving a three-variable first order hyperbolic system that includes the equation |
Can you provide a reference to your 1d Maxwell equations? |
So the initialization?
Yes. |
These are no second derivatives, but meant to indicate the parity of the components of the electric and magnetic field, i.e., if you have |
A possible reference would be https://inria.hal.science/hal-01720293/document equation (1). In the docstring of the equations the currents/sources are set to 0. Only here they are mentioned for completeness. |
Co-authored-by: Simon Candelaresi <[email protected]>
This was actually the main motivation to add such a system to Trixi for me.
Yes, this is actually the reason why I have not put them into the Readme yet. |
Yes. You would need to integrate to get u from v. Maybe your could point that out.
Maybe it is good to point out that energy is being distributed. |
That makes sense. But then the notation is confusing. In the initial wave equation subscripts are derivatives. Now they are components and parities. Maybe you could also mention parities in your description. |
You could maybe use one of the papers from Acosta and Kopriva for the Maxwell's equations on this form. That or the book from Hesthaven "Numerical Methods for Conservation Laws: From Analysis to Algorithms" where he uses the Maxwell's equations as a prototypical example of a linear conservation law. |
Can you approve the PR? Then we are ready to go :) |
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.
Thanks!
Co-authored-by: Hendrik Ranocha <[email protected]>
The CI failure is caused by this PR:
|
I think I found an implementation without CI failures. |
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.
Thanks a lot! This PR be merged when my last comment is addressed and CI passes 👍
Co-authored-by: Hendrik Ranocha <[email protected]>
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.
Thanks!
I always missed a classic wave equation system in Trixi.jl.
The obvious choice would be the standard 1D wave equation
$$u_{tt} - c^2 u_{xx} = 0$$
with first order hyperbolic system
obtained from introducing the variables$v := c u_x$ and $w = -u_t$ .
This system, however, bears two main problems due to the change of variables:
As an alternative which does not bear this difficulties one can consider the Maxwell equations in 1D which simplify to
where$E$ and $B$ field are orthogonal (which I try to denote with the alternating indices).$\lambda_- = -c, \lambda_+ = c$ , identical to the wave equation system.
This system has eigenvalues
I added the typical convergence test and an "application" of a standing wave which distributes energy between magnetic and electric.