NickKarpowicz / LightwaveExplorer

An efficient, user-friendly solver for nonlinear light-matter interaction
MIT License
56 stars 8 forks source link

Cannot use previous simulations #42

Open BarthDe opened 2 months ago

BarthDe commented 2 months ago

Hello,

I am currently using Wavelength Explorer for 5th harmonic generation simulations. For this, I would have used the simulations of 2nd and 3rd harmonic as proposed. However, I can’t use my previous simulations, while I load it nothing happens in the application. Do you have a solution so I can continue my simulation?

Thank you very much

NickKarpowicz commented 2 months ago

Hi, I assume these are simulations where they are saved as three separate files, e.g. MySim.txt, MySim_Ext.dat, and MySim_spectrum.dat, right?

The way the new version works is it always wants to load a single file, either a .zip containing all the results or a .txt just containing the input parameters. If you load the old txt format files, it should still put these values into the interface, does that happen?

In order to load all of the results, you can actually just put them into a .zip archive: if you select those three files above on most systems, right click and there should be an option like "Compress" - if you put them in an achive named MySim.zip, they can be loaded normally by the newer versions of LWE. Does this help?

BarthDe commented 2 months ago

Hi,

Thank you very much for your quick answer.

Yes, there are three different files. I succeed to load them. But my question was more on how to load my previous simulation in the pulse 1-2 buffer by using an input field ? How can I have the .bin file of my simulation ? Sorry, my question was not very clear at first.

NickKarpowicz commented 2 months ago

So the way it should work is if you take the file from within the zip archive produced by the simulation with the name MySim_Ext.dat (where MySim is whatever you called the simulation), and load it with the 📁 button in the "Source file" section of the pulse settings.

It should say "Loaded new file into pulse 1 buffer: (path to your _Ext.dat file)".

Then set the "Source" pulldown to LWE.

It should now use your previous result as the input. Note that the grid size (x, y, and time) has to match.

What happens if you do this?

BarthDe commented 2 months ago

Hi,

It works !! I was not using the right file that is why it did not work Thank you for all the advices

BarthDe commented 2 weeks ago

Hello,

I am coming back with new questions. When I save my simulation and I want to use it as an input, I loaded in the buffer as you said. However, to check if it works, I run the simulation with no crystal (z=0) expecting to have the same result than the previous simulation but I get nothing on the grid. Do you have a solution ?

Also, when I charge my previous simulation into the buffer, is it still possible to change the beamwaist, the delay... or are they fixed ?

Thank you very much

NickKarpowicz commented 6 days ago

Could you attach the file you were using? I'd like to try it with that, since when I tested it with a simulation I made, it worked as expected...

BarthDe commented 6 days ago

Yes here it is. I made SHG and I want to do THG with BBO crystal SHG2.zip Thank you