-
Notifications
You must be signed in to change notification settings - Fork 77
2018 Impedance Spectroscopy on homojunction model
Submitted on arXiv on may 2018, published on Energy & Environmental Science on march 2019.
Check out the 2018-EIS
branch of this repository or download directly just this branch.
git checkout 2018-EIS
Open MATLAB and set this as the working directory.
In MATLAB, generate stabilised solutions with equilibrate:
>> [sol_eq, sol_eq_SR, sol_i_eq, sol_i_eq_SR, ssol_eq, ssol_eq_SR, ssol_i_eq, ssol_i_eq_SR, sol_1S, sol_1S_SR, sol_i_1S, sol_i_1S_SR, ssol_1S, ssol_1S_SR, ssol_i_1S, ssol_i_1S_SR] = equilibrate(pinParams)
or, quicker with equilibrate_minimal:
>> [sol_eq, sol_i_eq, sol_i_eq_SR, ssol_i_eq, ssol_i_eq_SR, sol_i_1S_SR, ssol_i_1S_SR] = equilibrate_minimal(pinParams)
For simulating a different set of parameters, specify the relative pinParams file as an argument to equilibrate:
>> [~, ~, sol_i_eq_SR, ~, ssol_i_eq_SR, sol_i_1S_SR, ssol_i_1S_SR] = equilibrate_minimal(pinParams_10kxSRH_001xmajority)
For plotting the free charges and ionic defect density profile and the energy levels you can use the pinana
routine:
>> pinana(ssol_i_1S_SR)
Simulate impedance spectroscopy with oscillating voltage on a single solution with ISwave_EA_single_exec:
>> asymssol_i_1S_SR = asymmetricize(ssol_i_1S_SR)
>> asymssol_i_1S_SR = stabilize(asymssol_i_1S_SR)
>> ssol_i_1S_SR_is_100Hz_50mV = ISwave_EA_single_exec(asymssol_i_1S_SR, 5e-2, 1e2, 20, 40, true, false, 1e-8)
Analyse the obtained solution with ISwave_single_analysis:
>> ISwave_single_analysis(ssol_i_1S_SR_is_100Hz_50mV, false, true)
Generate a cell with solutions at various illuminations at open circuit conditions with genIntStructs:
>> [structs_oc, VOCs, ~] = genIntStructs(ssol_i_eq_1S, 1, 1e-3, 7, true)
or, more accurate but slower with genIntStructsRealVoc:
>> [structs_oc_realvoc, VOCs_real] = genIntStructsRealVoc(ssol_i_eq_SR, 1, 1e-3, 7, true)
Generate a cell with solutions in dark at various applied voltages with genVappStructs:
>> structs_vapp = genVappStructs(sol_i_eq_SR, [0, 0.2, 0.4, 0.6, 0.8])
Simulate the impedance spectroscopy with oscillating voltage on a cell containing various structures (at different illuminations or applied voltages) with ISwave_full_exec:
>> ISwave_oc = ISwave_full_exec(structs_oc, 1e9, 1e-2, 56, 2e-3, false, true, true)
For plotting the Bode plots of capacitance and impedance versus frequency of a previous EIS simulation:
>> IS_full_analysis_impedance(ISwave_oc)
For plotting the Bode plot of phase versus frequency of a previous EIS simulation:
>> ISwave_full_analysis_phase(ISwave_oc)
For plotting the Nyquist plot of a previous EIS simulation:
>> ISwave_full_analysis_nyquist(ISwave_oc)
To save the workspace to a file:
>> save('EIS_20190515')
To load the workspace from a file:
>> load('EIS_20190515')
Complete documentation for each function is in the header of the relative file, which can be found here.
>> runtests('examples_unit_test')