PaNOSC-ViNYL / SimEx

Start-to-end photon experiment simulation platform
https://simex.readthedocs.io/
GNU General Public License v3.0
26 stars 25 forks source link

PlasmaXRTSCalculator fails in BMA calculation #128

Open CFGrote opened 7 years ago

CFGrote commented 7 years ago

this script:

from SimEx import PlasmaXRTSCalculatorParameters
from SimEx import PlasmaXRTSCalculator

parameters = PlasmaXRTSCalculatorParameters(
                 elements=[['Be', 1, -1]],      # Stochiometry and partial charges
                 photon_energy=4960.0,          # [eV]
                 scattering_angle=30.0,         # [deg]
                 electron_temperature=13.0,     # [eV/kB]
                 electron_density=3.0e23,       # [1/cm**3]
                 ion_temperature=6.0,           # [eV]
                 ion_charge=2.0,
                 mass_density=None,             # [g/cm**3]
                 debye_temperature=None,
                 band_gap=None,
                 energy_range={'min' : -200.0,  # Min. energy/eV to calculate (relative to photon energy)
                               'max' :  200.0,  # Max. energy/eV to calculate (relative to photon energy)
                               'step':    1.0}, # Energy binning/eV.
                 model_Sii='DH',                # Use Debye-Hueckel
                 model_See='BMA',               # Use Born-Mermin
                 model_Sbf='IA',                # Use impulse approximation
                 model_IPL=0.0,                 # No ionization potential lowering.
                 model_Mix=None,                # Use default (advanced mixing).
                 lfc=None,                      # No local field correction.
                 Sbf_norm=None,                 # No normalization of the bound-free spectrum.
                 source_spectrum='GAUSS',        # Source spectrum will be taken from wavefront input.
                 source_spectrum_fwhm=10,     # Not needed here.
                    )
xrts_calculator = PlasmaXRTSCalculator(parameters=parameters,
                                       input_path=source_input,
                                       output_path='Be_xrts.h5')
xrts_calculator.backengine()
xrts_calculator.saveH5()

produces nans in the free electron part (/data/dynamics/Skw_free). Replacing BMA by RPA gives sane results. collfreq looks odd, real part diverges.