-
Notifications
You must be signed in to change notification settings - Fork 26
Esther Hydrocode Tutorial
User tutorial / information for the hydrocode simulations package of Simex, currently utilising the Esther 1-D hydrocode program (that can be obtained upon request).
Input data and output data can be found at https://doi.org/10.5281/zenodo.883106
- Introduction
- Parameters
- How to create a new experiment
- Example - Plastic ablator with Fe foil
- Run Esther
- Utilities
The Esther hydrocode SIMEX package consists of the following python scripts:
- Calculators/EstherExperimentConstruction.py
- Calculators/EstherPhotonMatterInteractor.py
- Parameters/EstherPhotonMatterInteractorParameters.py
- Utilities/RadHydroAnalysis.py
- Utilities/hydro_txt_to_opmd.py
The current version allows the creation of simple target configurations, as described above. The parameters can be set for the first time using the EstherExperimentConstruction.py calculator, which calls upon the parameters class to create the Esther input file.
The materials currently available are listed below with their long name; the long name must be used when setting the material choice (e.g. sample="Iron").
- Aluminium
- Berylium
- CH
- Chromium
- Cobalt
- Copper
- Diamond
- Gold
- Iron
- Iron2*
- Kapton
- Lead
- LiF
- Magnesium
- Molybdenum
- Mylar
- Nickel
- Quartz
- Silicon
- SiliconOxide
- Silver
- Tantalum
- Tin
- Titanium
- Tungsten
- Vanadium
- Water
*2 sesame EOS tables exist for iron.
Parameters are set using the EstherPhotonMatterInteractorParameters.py class
parameters = EstherPhotonMatterInteractorParameters(
number_of_layers={2,3}
ablator={“CH”,”Diamond”,”Kapton”,”Aluminium”}
ablator_thickness={20,50}
sample=”Iron”{Choose from list above}
sample_thickness={4,25}
window={None,”LiF”,”Quartz”}
window_thickness={50,500}
laser_wavelength={1064,527}
laser_pulse={“Flat”,”Ramp”}
laser_pulse_duration={4,20}
laser_intensity={0.1,10}
run_time={5,20}
delta_time={0.01,0.05}
)
An experiment constructor class EstherExperimentConstruction.py exists to store parameters for reuse in iterations of code. This allows quick changes to certain parameters and each input file is saved to user folder.
simName = "Fe-example"
experiment = EstherExperimentConstruction(parameters=parameters,
esther_sims_path=self._simdir,sim_name=simName)
The self._simdir must be set at the start and should contain the root folder for simulation storage.
The EstherExperimentConstruction.py then calls the EstherPhotonMatterInteractor.py class, which serializes and saves all the relevant input files.
# Create parameters.
parameters = EstherPhotonMatterInteractorParameters(
number_of_layers=2,
ablator="CH",
ablator_thickness=50.0,
sample="Iron",
sample_thickness=5.0,
window=None,
window_thickness=0.0,
laser_wavelength=1064.0,
laser_pulse='flat',
laser_pulse_duration=6.0,
laser_intensity=0.33,
run_time=12.0,
delta_time=0.05
)
# Create experiment.
simName = "Fe-example"
experiment = EstherExperimentConstruction(parameters=parameters,
esther_sims_path=self._simdir,
sim_name=simName)
This creates a folder /Fe-Example/ in the root directory that user selected to store input files. The input files are saved in /Fe-Example/1/.
experiment = EstherExperimentConstruction(parameters=parameters,
esther_sims_path=self._simdir,
sim_name=simName)
With the folder /Fe-Example/ already existing in the root directory, the new input files are saved in /Fe-Example/2/.
# Change the sample thickness to 4.0
new_parameters = EstherPhotonMatterInteractorParameters(sample_thickness=4.0,
read_from_file="/Users/richardbriggs/OneDrive/Data/Hydrocode/tmp/HPLF-Fe/2/")
experiment = EstherExperimentConstruction(parameters=new_parameters,
esther_sims_path=self._simdir,
sim_name=simName)
With the folder /Fe-Example/3/ will contain the input files with the sample thickness now adjusted to 4.0 microns.
From the Esther GUI, the input file can be loaded and the simulation launched. The input files must be stored in Esther's local storage folder /ESTHER/ESTHER_entrees/
Output files will be saved to /ESTHER/ESTHER_sorties/
The hydro_txt_to_opmd.py function converts the following .txt files, that are saved in /ESTHER/ESTHER_sorties/SimName/stock_t_m/ folder, to a single h5 format file.
- densite_massique.txt
- position_externe_relative.txt
- pression_hydrostatique.txt
- temperature_du_milieu.txt
- vitesse_moyenne.txt
The function simply takes the directory where the 5 files are stored.
convertTxtToOPMD(esther_dirname="/root/to/ESTHER_sorties/SimName/stock_t_m/")
Achieved with the RadHydroAnalysis.py script
radHydroAnalysis(filename)
where filename is the output.opmd.h5 filename in the simulation directory.

import SimEx
from SimEx.Utilities.IntensityCalc import calculateLaserIntensity
calculateLaserIntensity()
Creates dialogues for entering the Energy, laser spot diameter, and laser pulse length to obtain the laser intensity in TW/cm^2
Energy (J) : 15
Spot size (diameter in um) : 300
Pulse length (ns) : 6
Intensity = 3.53677651315 TW/cm^2
Affichage fichier log - Display log file -
Recommended that this box should remained checked
Mise a jour du fichier log en cours de calcul - Update the log file during calculation.