-
Dear community, I'm seeking assistance with setting an initial condition for a travelling plane wave in pymeep. While the tutorials extensively cover the usage of the Source class, I'm specifically interested in directly initializing the E and B fields within the simulation. The documentation seems to focus primarily on source-based field generation, but 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? I would greatly appreciate any guidance on how to directly manipulate the E and B fields to create an initial travelling plane wave condition. Perhaps there's a function or method I've overlooked? Best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Yes, you can use the
Is your whole computational cell filled with a homogeneous material?
|
Beta Was this translation helpful? Give feedback.
Yes, you can use the
initialize_field
method of the simulation class, as described in the manual.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…