Skip to content

How to set a plane wave initial condition? #2870

Answered by stevengj
ZhigangPu asked this question in Q&A
Discussion options

You must be logged in to vote

I'm looking for a method to explicitly set the electromagnetic field values at the simulation's start. Is there a straightforward way to achieve this in pymeep?

Yes, you can use the initialize_field method of the simulation class, as described in the manual.

I would greatly appreciate any guidance on how to directly manipulate the E and B fields to create an initial travelling plane wave condition.

Is your whole computational cell filled with a homogeneous material?

  • If so, why are you simulating it, since you have an analytical solution?

  • If not, then a planewave by itself is not a solution of Maxwell's equations, so it's not clear to me what you mean by this "initial condition". I…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@ZhigangPu
Comment options

@stevengj
Comment options

@ZhigangPu
Comment options

@stevengj
Comment options

@ZhigangPu
Comment options

Answer selected by ZhigangPu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2867 on July 23, 2024 21:03.