Hi Juan,
I have a question regarding the access of the simulation result and for visualization of data.
I would like to directly visualize the data in the Python script using matplotlib or similar without having to use the external plotting software like VisIt, as given in the manual.
Based on the 1D capacitor example, plotting the Potential across the capacitor seems straight forward, accessing the x-coordinate and Potential using
get_node_model_values(device=device, region=region, name=‘x’)
and
get_node_model_values(device=device, region=region, name=‘Potential’)
and then plot the Data in what ever way desired.
same goes for the Electric FIeld, with
get_edge_model_values(device=device, region=region, name=‘ElectricFIeld’)
of course taking into account that one is now dealing with values on the edges of the mesh, rather than on the node.
My question now is how to deal with accessing e.g. the Potential in case of the 2D capacitor example, as shown in Figure 16.1 in the Manual? This should of course by 2D data, but if I use
get_node_model_values(device=device, region=region, name=‘Potential’)
after running the 2D capacitor example, the result seems to be a 1D array.
What am I doing wrong?
Furthermore: is there a way to obtain the mesh layout directly in Python for plotting?
Thank you for your help!