Skip to content

Conversation

@FilipeFcp
Copy link
Contributor

Hi all,

This is the PF example adapted to Tidy3D.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2025

Spell Check Report

TFLNTidy3d.ipynb:

Cell 28, Line 3: 'Pockels'
  > To calculate the Pockels effect, we apply an electric field along the LiNbO₃ cut direction to perturb the optical medium. First, we normalize the field by the applied voltage and shift its coordinates so they align with the optical simulation, where the dielectric waveguide is centered at y = 0.
Cell 30, Line 1: 'Pockels'
  > The normalized electric field is applied to the LiNbO₃ crystal along its z-axis, following the Pockels effect model:
Cell 31, Line 6: 'Pockels'
  > # Calculate refractive index variation from Pockels effect

Checked 1 notebook(s). Found spelling errors in 1 file(s).
Generated by GitHub Action run: https://github.com/flexcompute/tidy3d-notebooks/actions/runs/19041809282

Copy link
Contributor

@yuanshen-flexcompute yuanshen-flexcompute left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Here are my comments:

  • In preamble (first cell), the link for "mode simulation" currently links to API page. I think maybe it should link to our tutorial, like (https://www.flexcompute.com/tidy3d/examples/notebooks/ModeSolver/)?
  • Cell [2] and onwards: since the code cells are quite large, I suggest to include additional lines of comments to describe what each logical grouping of code is doing. For example "Defining structures", "Defining grid specification" etc. The comment doesn't have to be that detailed, but I think it helps the reader parse the large code cells a bit better.
  • Cell [3]: I suggest modifying last line to _=mode_solver_opt.plot() to suppress the Jupyter cell printing the matplotlib axes.
  • Cell [5]: Maybe add a little more comment on the mode solver result? Like what are the important quantities in the result that motivated the mode solver.
  • Cell [6]: I usually define LossyMetalMedium like metal=td.LossyMetalMedium(conductivity=41, frequency_range=(f_min, f_max)) where f_min, f_max is the RF frequency range. I usually leave the fit_param untouched (default).
  • Cell [7]: For the overall RF grid spec, you can use min_steps_per_sim_size when the simulation is sub-wavelength to better control the grid size (instead of min_steps_per_wvl). I usually start with values between 30-100.
  • Cell [14]: Perhaps a bit more explanation about what each block of code is doing? In particular, I think readers might be interested in the purpose of the MeshOverrideStructure and why the mesh needs to be so dense
  • Since you re-calculate the CPW mode in the V-pi L section, is it necessary to calculate the original CPW mode without MZM in the first place? I think you could probably skip straight to the CPW mode with MZM. For basic CPW mode calculation, you could probably just refer readers to the separate tutorial (https://www.flexcompute.com/tidy3d/examples/notebooks/CPWRFPhotonics1/).
  • Cell [19]: There is a commented-out line that could probably be cleaned up
  • Cell [19]: Again, could probably add _= to the final line to prevent printing of matplotlib object
  • Cell [19]: If I understand correctly, the plot is supposed to show the shifted RF field? If so, I suggest to zoom into the region around y=0, and overlay the optical waveguide structure into the plot to make the overlap calculation clearer.
  • For the calculation using the Pockels effect, could we include relevant equation(s) in the text to make the calculation clearer to the reader?
  • Cell [20]: Again, I suggest to zoom into the y=0 region overlap with optical waveguide.
  • Cell [21]: I am not entirely clear on the purpose of eps_o_array based on the comment
  • Cell [21]: Could we also make it clearer to the reader that we are calculating n_eff as a function of applied voltage, with the assumption that RF field strength scales with voltage? I am not sure that it is explicitly mentioned anywhere

Thanks for this notebook!

@FilipeFcp
Copy link
Contributor Author

Thanks @yuanshen-flexcompute for the careful revision.
I have addressed all comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants