Final touches for chemical formula feature.

This commit is contained in:
2023-01-23 15:26:51 +01:00
parent a7ffcaeefe
commit 84d97b95c9
3 changed files with 36 additions and 14 deletions

View File

@@ -1 +1,2 @@
- Increase the number of elements acceptable for each layer, currently up to 5
- Stop using the tandard filenames eingabe/ausgabe etc. Take input filename as an argument and produce output files with the same name.

View File

@@ -1152,14 +1152,15 @@ function CreateInpFile(All) {
// Takes object All as input for all relevant parameters
// This is the form of the begining of the input file:
var TemplateFile= " ProjZ ProjAM valEnergy sigEnergy valAngle sigAngle parEF parESB parSHEATH parERC\n numberProj ranSeed ranSeed ranSeed z0 parRD dz parCA parKK0 parKK0R parKDEE1 parKDEE2 parIPOT parIPOTR parIRL";
var TemplateFile = "ProjZ ProjAM valEnergy sigEnergy valAngle sigAngle parEF parESB parSHEATH parERC\n"
TemplateFile += "numberProj ranSeed ranSeed ranSeed z0 parRD dz parCA parKK0 parKK0R parKDEE1 parKDEE2 parIPOT parIPOTR parIRL";
// Then comes the number of layers (new format) for example 4 layers:
// N_Layers=4
TemplateFile=TemplateFile+"\n"+"N_Layers=numLayer";
// Then loop over the layers and for each give the following structure
// thickness, density, correction factor, chemical formula
// chemical formula, thickness, density, correction factor
var TemplateLayer = "L1Comp L1d L1rho L1CK\n";
// Z number of elements
TemplateLayer += "L1ELZ1 L1ELZ2 L1ELZ3 L1ELZ4 L1ELZ5\n";
@@ -1167,13 +1168,21 @@ function CreateInpFile(All) {
TemplateLayer += "L1ELW1 L1ELW2 L1ELW3 L1ELW4 L1ELW5\n";
// Weigth of element in composition
TemplateLayer += "L1ELC1 L1ELC2 L1ELC3 L1ELC4 L1ELC5\n";
// Surface binding energy of elements
TemplateLayer += "L1ELE1 L1ELE2 L1ELE3 L1ELE4 L1ELE5\n";
// Displacement energy of elements, always 30 eV??
TemplateLayer += "L10301 L10302 L10303 L10304 L10305\n";
TemplateLayer += "0.0000 0.0000 0.0000 0.0000 0.0000\n";
// Bulk binding energy of elements, usually zero
TemplateLayer += "0 0 0 0 0\n";
// value A-1 of the ziegler tables
TemplateLayer += "L1ELST11 L1ELST21 L1ELST31 L1ELST41 L1ELST51\n";
// value A-2 of the ziegler tables
TemplateLayer += "L1ELST12 L1ELST22 L1ELST32 L1ELST42 L1ELST52\n";
// value A-3 of the ziegler tables
TemplateLayer += "L1ELST13 L1ELST23 L1ELST33 L1ELST43 L1ELST53\n";
// value A-4 of the ziegler tables
TemplateLayer += "L1ELST14 L1ELST24 L1ELST34 L1ELST44 L1ELST54\n";
// value A-5 of the ziegler tables
TemplateLayer += "L1ELST15 L1ELST25 L1ELST35 L1ELST45 L1ELST55";
let projectile = All['ProjType'];

View File

@@ -410,28 +410,40 @@ C Chemical formula (chem), Thickness (DX), density (RHO), and correction fac
C (CK, it is always 1.0??)
C Possibly add the number of elements in the layer
READ(11,*) chem(I),DX(I),RHO(I),CK(I)
C Replace the following lines with read(11,*) (a(i,j), j = 1, 5)
C Atomic numbers
READ(11,*) ZT(I,1),ZT(I,2),ZT(I,3),ZT(I,4),ZT(I,5)
C READ(11,*) ZT(I,1),ZT(I,2),ZT(I,3),ZT(I,4),ZT(I,5)
read(11,*) (ZT(I,j), j = 1, 5)
C Mass numbers (amu)
READ(11,*) MT(I,1),MT(I,2),MT(I,3),MT(I,4),MT(I,5)
C READ(11,*) MT(I,1),MT(I,2),MT(I,3),MT(I,4),MT(I,5)
read(11,*) (MT(I,j), j = 1, 5)
C Concentration (stoichiometry)
READ(11,*) CO(I,1),CO(I,2),CO(I,3),CO(I,4),CO(I,5)
C READ(11,*) CO(I,1),CO(I,2),CO(I,3),CO(I,4),CO(I,5)
read(11,*) (CO(I,j), j = 1, 5)
C Surface binding energy
READ(11,*) SBE(I,1),SBE(I,2),SBE(I,3),SBE(I,4),SBE(I,5)
C READ(11,*) SBE(I,1),SBE(I,2),SBE(I,3),SBE(I,4),SBE(I,5)
read(11,*) (SBE(I,j), j = 1, 5)
C Displacement energy, always 30 eV??
READ(11,*) ED(I,1),ED(I,2),ED(I,3),ED(I,4),ED(I,5)
C READ(11,*) ED(I,1),ED(I,2),ED(I,3),ED(I,4),ED(I,5)
read(11,*) (ED(I,j), j = 1, 5)
C Bulk binding energy, usually zero
READ(11,*) BE(I,1),BE(I,2),BE(I,3),BE(I,4),BE(I,5)
C READ(11,*) BE(I,1),BE(I,2),BE(I,3),BE(I,4),BE(I,5)
read(11,*) (BE(I,j), j = 1, 5)
C value A-1 of the ziegler tables
READ(11,*) CH1(I,1),CH1(I,2),CH1(I,3),CH1(I,4),CH1(I,5)
C READ(11,*) CH1(I,1),CH1(I,2),CH1(I,3),CH1(I,4),CH1(I,5)
read(11,*) (CH1(I,j), j = 1, 5)
C value A-2 of the ziegler tables
READ(11,*) CH2(I,1),CH2(I,2),CH2(I,3),CH2(I,4),CH2(I,5)
C READ(11,*) CH2(I,1),CH2(I,2),CH2(I,3),CH2(I,4),CH2(I,5)
read(11,*) (CH2(I,j), j = 1, 5)
C value A-3 of the ziegler tables
READ(11,*) CH3(I,1),CH3(I,2),CH3(I,3),CH3(I,4),CH3(I,5)
C READ(11,*) CH3(I,1),CH3(I,2),CH3(I,3),CH3(I,4),CH3(I,5)
read(11,*) (CH3(I,j), j = 1, 5)
C value A-4 of the ziegler tables
READ(11,*) CH4(I,1),CH4(I,2),CH4(I,3),CH4(I,4),CH4(I,5)
C READ(11,*) CH4(I,1),CH4(I,2),CH4(I,3),CH4(I,4),CH4(I,5)
read(11,*) (CH4(I,j), j = 1, 5)
C value A-5 of the ziegler tables
READ(11,*) CH5(I,1),CH5(I,2),CH5(I,3),CH5(I,4),CH5(I,5)
C READ(11,*) CH5(I,1),CH5(I,2),CH5(I,3),CH5(I,4),CH5(I,5)
read(11,*) (CH5(I,j), j = 1, 5)
ENDDO
1359 CLOSE(UNIT=11)