python-meep team mailing list archive
-
python-meep team
-
Mailing list archive
-
Message #00027
Re: Simulating some plants with Python-Meep
Hello Tisham
Nice to hear about this application.
Definitely, I suggest that you create a 2D numpy array with the
dielectrics. Then, you can create a callback class which inherits from
CallbackMatrix2D and interfaces this matrix with the Meep core.
See paragraph 3.3 of the python-meep documentation and related example
in the /samples directory (be sure to store a pointer to the numpy array
as local member variable, to avoid the 'segmentation fault' error : this
is also described in the documentation).
If you have any further questions, you can contact me or post on the
python-meep mailinglist (subscribe first through the launchpad page).
wbr
Emmanuel
On Tue, 2010-09-07 at 00:57 +0930, Tisham Dhar wrote:
> Hi Emmanuel,
>
> I am planning to simulate some plant structures and soil surface using
> MEEP. So far I have written some Python code to procedurally generate
> the plants and display them with matplotlib :
>
> http://pastebin.com/GNKmsPqj.
>
> What would be the best way to incorporate these geometries into a MEEP
> simulation. Producing a 2D array with corresponding dielectrics ?
> The stems and leaves in the plot have minimal width, I can give them
> some width if needed.
>
> Cheers,
>
> Tisham.