-
Notifications
You must be signed in to change notification settings - Fork 2
/
Element.h
4214 lines (4076 loc) · 152 KB
/
Element.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//
// Created by ryanz on 12/10/2022.
//
#ifndef PHYSICSFORMULA_ELEMENT_H
#define PHYSICSFORMULA_ELEMENT_H
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <cmath>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
class Element {
public:
[[nodiscard]] virtual int getGroup() const { return group; }
[[nodiscard]] virtual std::string getSymbol() const { return symbol; }
[[nodiscard]] virtual std::string getType() const { return type; }
[[nodiscard]] virtual std::string getCrystalType() const { return crystal_type; }
[[nodiscard]] virtual std::string getElectronConfiguration() const { return electron_configuration; }
[[nodiscard]] virtual long double getAtomicWeight() const { return atomicWeight; }
[[nodiscard]] virtual int getAtomicNumber() const { return atomicNumber; }
[[nodiscard]] virtual std::vector<long double> getEnergyLevels() const { return energyLevels; }
[[nodiscard]] virtual long double getDensitySTP() const { return densitySTP; }
[[nodiscard]] virtual long double getMeltingPoint() const { return meltingPoint; }
[[nodiscard]] virtual long double getBoilingPoint() const { return boilingPoint; }
[[nodiscard]] virtual long double getThermalConductivity() const { return thermalConductivity; }
[[nodiscard]] virtual long double getElectricConductivity() const { return electricConductivity; }
[[nodiscard]] virtual long double getResistivity() const { return resistivity; }
[[nodiscard]] virtual long double getHeatSpecific() const { return heatSpecific; }
[[nodiscard]] virtual long double getHeatVaporization() const { return heatVaporization; }
[[nodiscard]] virtual long double getHeatFusion() const { return heatFusion; }
[[nodiscard]] virtual long double getIonization1st() const { return ionization1st; }
void print() const {
// print all the data including the SI units if applicable
std::cout << "Element: " << typeid(*this).name()+1 << std::endl;
std::cout << "Group: " << getGroup() << std::endl;
std::cout << "Symbol: " << getSymbol() << std::endl;
std::cout << "Type: " << getType() << std::endl;
std::cout << "Crystal Type: " << getCrystalType() << std::endl;
std::cout << "Electron Configuration: " << getElectronConfiguration() << std::endl;
std::cout << "Atomic Weight: " << getAtomicWeight() << " u (g/mol)" << std::endl;
std::cout << "Atomic Number: " << getAtomicNumber() << std::endl;
std::cout << "Energy Levels: ";
for (auto &i : getEnergyLevels()) {
std::cout << i << " ";
}
std::cout << std::endl;
std::cout << "Density STP: " << getDensitySTP() << " kg/m^3" << std::endl;
std::cout << "Melting Point: " << getMeltingPoint() << " C" << std::endl;
std::cout << "Boiling Point: " << getBoilingPoint() << " C" << std::endl;
std::cout << "Thermal Conductivity: " << getThermalConductivity() << " W/mK" << std::endl;
std::cout << "Electric Conductivity: " << getElectricConductivity() << " MS/m" << std::endl;
std::cout << "Resistivity: " << getResistivity() << " m Ohm" << std::endl;
std::cout << "Heat Specific: " << getHeatSpecific() << " J/kgK" << std::endl;
std::cout << "Heat Vaporization: " << getHeatVaporization() << " kJ/mol" << std::endl;
std::cout << "Heat Fusion: " << getHeatFusion() << " kJ/mol" << std::endl;
std::cout << "Ionization 1st: " << getIonization1st() << " eV" << std::endl;
}
void display() const {
displayElementImg(getFileName(this->atomicNumber));
}
virtual ~Element() = default;
protected:
int group{};
std::string symbol;
std::string type;
std::string crystal_type;
std::string electron_configuration;
long double atomicWeight{};
int atomicNumber{};
std::vector<long double> energyLevels;
long double densitySTP{};
long double meltingPoint{};
long double boilingPoint{};
long double thermalConductivity{};
long double electricConductivity{};
long double resistivity{};
long double heatSpecific{};
long double heatVaporization{};
long double heatFusion{};
long double ionization1st{};
private:
static void loadImage(const char* pathname, sf::Texture& texture, sf::Sprite& sprite)
{
texture.loadFromFile(pathname); // load it from the file
sprite.setTexture(texture); // put that texture in our sprite
// the rectangle of the texture to use for this
sprite.setTextureRect( sf::IntRect(0,0,screenSize_X,screenSize_Y) );
}
static void displayElementImg(const char elementName[])
{
// Create our window
sf::RenderWindow window(
sf::VideoMode(screenSize_X,screenSize_Y), // size of the client area we want
"Display an Image" // The text to appear on the window title
);
// load our image
sf::Texture texture; // the texture which will contain our pixel data
sf::Sprite sprite; // the sprite which will actually draw it
loadImage(elementName,texture,sprite);
// Set FPS so this draws at 60 FPS (note: I didn't do this for the WinAPI version because it'd be too hard for such
// a small example)
window.setFramerateLimit( 60 );
bool program_running = true; // true until the user wants to quit
while(program_running)
{
// Do the event pump -- same idea as with Windows... look for events and process them
sf::Event evt{};
while( window.pollEvent(evt) ) // while there are any events to process...
{
// process them. But we're only interested in the closed event
if(evt.type == sf::Event::EventType::Closed) // is this a close event?
program_running = false; // indicate that we want the window to close
}
// now that events are processed... draw our image
window.draw(sprite); // just draw it to the back buffer
window.display(); // and display it so the back buffer moves to the front
}
}
static const char* getFileName(int atomicNumber)
{
switch (atomicNumber)
{
case 1: return "img\\hydrogen.bmp";
case 2: return "img\\helium.bmp";
case 3: return "img\\lithium.bmp";
case 4: return "img\\beryllium.bmp";
case 5: return "img\\boron.bmp";
case 6: return "img\\carbon.bmp";
case 7: return "img\\nitrogen.bmp";
case 8: return "img\\oxygen.bmp";
case 9: return "img\\fluorine.bmp";
case 10: return "img\\neon.bmp";
case 11: return "img\\sodium.bmp";
case 12: return "img\\magnesium.bmp";
case 13: return "img\\aluminium.bmp";
case 14: return "img\\silicon.bmp";
case 15: return "img\\phosphorus.bmp";
case 16: return "img\\sulfur.bmp";
case 17: return "img\\chlorine.bmp";
case 18: return "img\\argon.bmp";
case 19: return "img\\potassium.bmp";
case 20: return "img\\calcium.bmp";
case 21: return "img\\scandium.bmp";
case 22: return "img\\titanium.bmp";
case 23: return "img\\vanadium.bmp";
case 24: return "img\\chromium.bmp";
case 25: return "img\\manganese.bmp";
case 26: return "img\\iron.bmp";
case 27: return "img\\cobalt.bmp";
case 28: return "img\\nickel.bmp";
case 29: return "img\\copper.bmp";
case 30: return "img\\zinc.bmp";
case 31: return "img\\gallium.bmp";
case 32: return "img\\germanium.bmp";
case 33: return "img\\arsenic.bmp";
case 34: return "img\\selenium.bmp";
case 35: return "img\\bromine.bmp";
case 36: return "img\\krypton.bmp";
case 37: return "img\\rubidium.bmp";
case 38: return "img\\strontium.bmp";
case 39: return "img\\yttrium.bmp";
case 40: return "img\\zirconium.bmp";
case 41: return "img\\niobium.bmp";
case 42: return "img\\molybdenum.bmp";
case 43: return "img\\technetium.bmp";
case 44: return "img\\ruthenium.bmp";
case 45: return "img\\rhodium.bmp";
case 46: return "img\\palladium.bmp";
case 47: return "img\\silver.bmp";
case 48: return "img\\cadmium.bmp";
case 49: return "img\\indium.bmp";
case 50: return "img\\tin.bmp";
case 51: return "img\\antimony.bmp";
case 52: return "img\\tellurium.bmp";
case 53: return "img\\iodine.bmp";
case 54: return "img\\xenon.bmp";
case 55: return "img\\cerium.bmp";
case 56: return "img\\barium.bmp";
case 57: return "img\\lanthanum.bmp";
case 58: return "img\\cerium.bmp";
case 59: return "img\\praseodymium.bmp";
case 60: return "img\\neodymium.bmp";
case 61: return "img\\promethium.bmp";
case 62: return "img\\samarium.bmp";
case 63: return "img\\europium.bmp";
case 64: return "img\\gadolinium.bmp";
case 65: return "img\\terbium.bmp";
case 66: return "img\\dysprosium.bmp";
case 67: return "img\\holmium.bmp";
case 68: return "img\\erbium.bmp";
case 69: return "img\\thulium.bmp";
case 70: return "img\\ytterbium.bmp";
case 71: return "img\\lutetium.bmp";
case 72: return "img\\hafnium.bmp";
case 73: return "img\\tantalum.bmp";
case 74: return "img\\tungsten.bmp";
case 75: return "img\\rhenium.bmp";
case 76: return "img\\osmium.bmp";
case 77: return "img\\iridium.bmp";
case 78: return "img\\platinum.bmp";
case 79: return "img\\gold.bmp";
case 80: return "img\\mercury.bmp";
case 81: return "img\\thallium.bmp";
case 82: return "img\\lead.bmp";
case 83: return "img\\bismuth.bmp";
case 84: return "img\\polonium.bmp";
case 85: return "img\\astatine.bmp";
case 86: return "img\\radon.bmp";
case 87: return "img\\francium.bmp";
case 88: return "img\\radium.bmp";
case 89: return "img\\actinium.bmp";
case 90: return "img\\thorium.bmp";
case 91: return "img\\protactinium.bmp";
case 92: return "img\\uranium.bmp";
case 93: return "img\\neptunium.bmp";
case 94: return "img\\plutonium.bmp";
case 95: return "img\\americium.bmp";
case 96: return "img\\curium.bmp";
case 97: return "img\\berkelium.bmp";
case 98: return "img\\califomium.bmp";
case 99: return "img\\einsteinium.bmp";
case 100: return "img\\fermium.bmp";
case 101: return "img\\mendelevium.bmp";
case 102: return "img\\nobelium.bmp";
case 103: return "img\\lawrencium.bmp";
case 104: return "img\\rutherfordium.bmp";
case 105: return "img\\dubnium.bmp";
case 106: return "img\\seaborgium.bmp";
case 107: return "img\\bohrium.bmp";
case 108: return "img\\hassium.bmp";
case 109: return "img\\meitnerium.bmp";
case 110: return "img\\darmstadtium.bmp";
case 111: return "img\\roentgenium.bmp";
case 112: return "img\\copernicium.bmp";
case 113: return "img\\nihonium.bmp";
case 114: return "img\\flerovium.bmp";
case 115: return "img\\moscovium.bmp";
case 116: return "img\\livermorium.bmp";
case 117: return "img\\tennessine.bmp";
case 118: return "img\\oganesson.bmp";
default: return "no image";
}
}
};
#endif //PHYSICSFORMULA_ELEMENT_H
/**
* @brief Hydrogen is the chemical element with the symbol H and atomic number 1.
* With a standard atomic weight of 1.008, hydrogen is the lightest element
* in the periodic table. Hydrogen is the most abundant chemical substance
* in the universe, constituting roughly 75% of all baryonic mass
*/
class Hydrogen : public Element {
public:
Hydrogen() {
group = 1;
symbol = "H";
type = "Reactive Nonmetal";
crystal_type = "Hexagonal";
electron_configuration = "1s1";
atomicWeight = 1.007825; // 1.007825 u (g/mol)
atomicNumber = 1; // Z_ = 1
energyLevels = {1};
densitySTP = .0899; // .0899 kg/m^3
meltingPoint = -259.3; // -259.3 C
boilingPoint = -252.9; // -252.9 C
thermalConductivity = .18; // .18 W/mK
electricConductivity = FP_NAN; // FP_NAN
resistivity = FP_NAN; //FP_NAN
heatSpecific = 14300.0; // 14300.0 J/kgK
heatVaporization = .452; // 452 kJ/mol
heatFusion = .558; // .558 kJ/mol
ionization1st = 13.598;
}
};
/**
* @brief Helium is a chemical element with the symbol He and atomic number 2.
* It is a colorless, odorless, tasteless, non-toxic, inert, monatomic gas,
* the first in the noble gas group in the periodic table. Its boiling point
* is the lowest among all the elements
*/
class Helium : public Element {
public:
Helium() {
group = 18;
symbol = "He";
type = "Noble Gas";
crystal_type = "Hexagonal";
electron_configuration = "1s2";
atomicWeight = 4.002602; // 4.002602 u (g/mol)
atomicNumber = 2; // Z_ = 2
energyLevels = {2};
densitySTP = 0.1785; // 0.1785 kg/m^3
meltingPoint = FP_NAN; // C
boilingPoint = -268.9; // -269 C
thermalConductivity = 0.1513; // 0.1513 W/mK
electricConductivity = FP_NAN; // FP_NAN
resistivity = FP_NAN; // FP_NAN
heatSpecific = 5193.1; // 5193.1 J/kgK
heatVaporization = .083; // .083 kJ/mol
heatFusion = .02; // .02 kJ/mol
ionization1st = 24.587; // eV
}
};
/**
* @brief Lithium is a chemical element with the symbol LinearMomentum and atomic number 3.
* It is a soft, silvery-white alkali metal. Under standard conditions,
* it is the lightest metal and the lightest solid element.
*/
class Lithium : public Element {
public:
Lithium() {
group = 1;
symbol = "Li";
type = "Alkali Metal";
crystal_type = "Body-Centered Cubic";
electron_configuration = "[He]2s1";
atomicWeight = 6.941; // 6.94 u (g/mol)
atomicNumber = 3; // Z_ = 3
energyLevels = {2, 1};
densitySTP = 535.0; // 535.0 kg/m^3
meltingPoint = 180.54; // 180.54 C
boilingPoint = 1342.0; // 1342.0 C
thermalConductivity = 85.0; // 85.0 W/mK
electricConductivity = 11.0; // 11.0 MS/m
resistivity = 9.40 * pow(10, -8); // 9.4e-8 m Ohm (m * kg*m^2*s^-3*A^-2)
heatSpecific = 3570.0; // 3570.0 J/kgK
heatVaporization = 147.0; // 147.0 kJ/mol
heatFusion = 3.0; // 3.0 kJ/mol
ionization1st = 5.391; // eV
}
};
/**
* @brief Beryllium is a chemical element with the symbol Be and atomic number 4.
* It is a relatively rare element in the universe, usually occurring as a
* product of the spallation of larger atomic nuclei that have collided
* with cosmic rays. Within the cores of stars, beryllium is depleted as
* it is fused into heavier elements.
*/
class Beryllium : public Element {
public:
Beryllium() {
group = 2;
symbol = "Be";
type = "Alkaline Earth Metal";
crystal_type = "Hexagonal";
electron_configuration = "[He]2s2";
atomicWeight = 9.0121831; // 9.0121831 u (g/mol)
atomicNumber = 4; //4
energyLevels = {2, 2};
densitySTP = 1848.0; // 1848.0 kg/m^3
meltingPoint = 1287; // 1287 C
boilingPoint = 2470; // 2470 C
thermalConductivity = 190; // 190 W/mK
electricConductivity = 25; // 25 MS/m
resistivity = 3.999999999998 * pow(10, -8); // 4e-8 m Ohm (m * kg*m^2*s^-3*A^-2)
heatSpecific = 1820.0; // 1820.0 J/kgK
heatVaporization = 297.0; // 297.0 kJ/mol
heatFusion = 7.95; // 7.95 kJ/mol
ionization1st = 9.323; // eV
}
};
/**
* @brief Boron is a chemical element with the symbol B and atomic number 5.
* Produced entirely by cosmic ray spallation and supernovae and not by
* stellar nucleosynthesis, it is a low-abundance element in the Solar
* System and in the Earth's crust. It constitutes about 0.001 percent
* by weight of Earth's crust.
*/
class Boron : public Element {
public:
Boron() {
group = 13;
symbol = "B";
type = "Metalloid";
crystal_type = "Rhombohedral";
electron_configuration = "[He]2s2 2p1";
atomicWeight = 10.81; // 10.81 u (g/mol)
atomicNumber = 5; // 5
energyLevels = {2, 3}; //add u (g/mol)p to atomic number
densitySTP = 2460.0; // 2460.0 kg/m^3
meltingPoint = 2075; // 2075 C
boilingPoint = 4000; // 4000 C
thermalConductivity = 27.0; // 27.0W/mK
electricConductivity = 1; // MS/m
resistivity = 10000.0; // 10000 m Ohm (m * kg*m^2*s^-3*A^-2)
heatSpecific = 1030.0; // J/kgK
heatVaporization = 507.0; // kJ/mol
heatFusion = 50.0; // kJ/mol
ionization1st = 8.298; // eV
}
};
/**
* @brief Carbon is a chemical element with the symbol C and atomic number 6.
* It is nonmetallic and tetravalent—making four electrons available to
* form covalent chemical bonds. It belongs to group 14 of the periodic
* table. Carbon makes up only about 0.025 percent of Earth's crust.
*/
class Carbon : public Element {
public:
Carbon() {
group = 14;
symbol = "C";
type = "Reactive Nonmetal";
crystal_type = "Diamond";
electron_configuration = "[He]2s2 2p2";
atomicWeight = 12.011; // u (g/mol)
atomicNumber = 6;
energyLevels = {2, 4};
densitySTP = 2260.0; // kg/m^3
meltingPoint = 3550; // C
boilingPoint = 4027; // C
thermalConductivity = 140.0; // W/mK
electricConductivity = .10; // MS/m
resistivity = 0.00001; // 0.00001 m Ohm (m * kg*m^2*s^-3*A^-2)
heatSpecific = 710.0; // J/kgK
heatVaporization = 715.0; // kJ/mol
heatFusion = 105; // kJ/mol
ionization1st = 11.261; // eV
}
};
/**
* @brief Nitrogen is the chemical element with the symbol N and atomic number 7.
* It was first discovered and isolated by Scottish physician Daniel
* Rutherford in 1772.
*/
class Nitrogen : public Element {
public:
Nitrogen() {
group = 15;
symbol = "N";
type = "Reactive Nonmetal";
crystal_type = "Hexagonal";
electron_configuration = "[He]2s2 2p3";
atomicWeight = 14.007; // u (g/mol)
atomicNumber = 7;
energyLevels = {2, 5};
densitySTP = 1.251; // kg/m^3
meltingPoint = -210.1; // C
boilingPoint = -195.8; // C
thermalConductivity = .025; // W/mK
electricConductivity = FP_NAN; // MS/m
resistivity = FP_NAN; //FP_NAN
heatSpecific = 1040; // J/kgK
heatVaporization = 2.79; // kJ/mol
heatFusion = .36; // kJ/mol
ionization1st = 14.534; // eV
}
};
/**
* @brief Oxygen is the chemical element with the symbol O and atomic number 8.
* It is a member of the chalcogen group in the periodic table, a highly
* reactive nonmetal, and an oxidizing agent that readily forms oxides with
* most elements as well as with other compounds.
*/
class Oxygen : public Element {
public:
Oxygen() {
group = 16;
symbol = "O";
type = "Reactive Nonmetal";
crystal_type = "Simple Cubic";
electron_configuration = "[He]2s2 2p4";
atomicWeight = 15.999; // u (g/mol)
atomicNumber = 8;
energyLevels = {2, 6};
densitySTP = 1.251; // kg/m^3
meltingPoint = -218.0; // C
boilingPoint = -183.0; // C
thermalConductivity = 0.02658; // W/mK
electricConductivity = FP_NAN; // MS/m
resistivity = FP_NAN; // FP_NAN
heatSpecific = 919; // J/kgK
heatVaporization = 3.41; // kJ/mol
heatFusion = .222; // kJ/mol
ionization1st = 13.681; // eV
}
};
/**
* @brief Fluorine is a chemical element with the symbol F and atomic number 9.
* It is the lightest halogen and exists at standard conditions as a highly
* toxic, pale yellow diatomic gas. As the most electronegative element,
* it is extremely reactive, as it reacts with all other elements, except
* for argon, neon, and helium.
*/
class Fluorine : public Element {
public:
Fluorine() {
group = 17;
symbol = "F";
type = "Reactive Nonmetal";
crystal_type = "Monoclinc";
electron_configuration = "[He]2s2 2p5";
atomicWeight = 18.998403163; // u (g/mol)
atomicNumber = 9;
energyLevels = {2, 7};
densitySTP = 1.696; // kg/m^3
meltingPoint = -220.0; // C
boilingPoint = -188.1; // C
thermalConductivity = .0277; // W/mK
electricConductivity = FP_NAN; // MS/m
resistivity = FP_NAN; // FP_NAN
heatSpecific = 824; // J/kgK
heatVaporization = 3.27; // kJ/mol
heatFusion = .26; // kJ/mol
ionization1st = 17.422; // eV
}
};
/**
* @brief Neon is a chemical element with the symbol Ne and atomic number 10.
* It is a noble gas. Neon is a colorless, odorless, inert monatomic gas
* u (g/mol)nder standard conditions, with about two-thirds the density of air.
*/
class Neon : public Element {
public:
Neon() {
group = 18;
symbol = "Ne";
type = "Noble Gas";
crystal_type = "Face-Centered Cubic";
electron_configuration = "[He]2s2 2p6";
atomicWeight = 20.1797; // u (g/mol)
atomicNumber = 10;
energyLevels = {2, 8};
densitySTP = .900; // kg/m^3
meltingPoint = -248.6; // C
boilingPoint = -246.1; // C
thermalConductivity = .0491; // W/mK
electricConductivity = FP_NAN; // MS/m
resistivity = FP_NAN; // FP_NAN
heatSpecific = 1030; // J/kgK
heatVaporization = 1.75; // kJ/mol
heatFusion = 0.34; // kJ/mol
ionization1st = 21.565; // eV
}
};
/**
* @brief Sodium is a chemical element with the symbol Na and atomic number 11.
* It is a soft, silvery-white, highly reactive metal. Sodium is an
* alkali metal, being in group 1 of the periodic table. Its only stable
* isotope is ²³Na. The free metal does not occur in nature, and must be
* prepared from compounds.
*/
class Sodium : public Element {
public:
Sodium() {
group = 1;
symbol = "Na";
type = "Alkali Metal";
crystal_type = "Body-Centered Cubic";
electron_configuration = "[Ne]3s1";
atomicWeight = 22.98976928; // u (g/mol)
atomicNumber = 11;
energyLevels = {2, 8, 1};
densitySTP = 968; // kg/m^3
meltingPoint = 97.720; // C
boilingPoint = 882.9; // C
thermalConductivity = 140.0; // W/mK
electricConductivity = 21.0; // MS/m
resistivity = 4.69999999e-8; // 4.7e-8 m Ohm (m * kg*m^2*s^-3*A^-2)
heatSpecific = 1230; // J/kgK
heatVaporization = 97.7; // kJ/mol
heatFusion = 2.60; // kJ/mol
ionization1st = 5.139; // eV
}
};
/**
* @brief Magnesium is a chemical element with the symbol Mg and atomic
* number 12. It is a shiny gray solid which bears a close physical
* resemblance to the other five elements in the second column of the
* periodic table: all group 2 elements have the same electron configuration
* in the outer electron shell and a similar crystal structure.
*/
class Magnesium : public Element {
public:
Magnesium() {
group = 2;
symbol = "Mg";
type = "Alkaline Earth Metal";
crystal_type = "Hexagonal Close Packed";
electron_configuration = "[Ne]3s2";
atomicWeight = 24.305; // u (g/mol)
atomicNumber = 12;
energyLevels = {2, 8, 2};
densitySTP = 1738.0; // kg/m^3
meltingPoint = 650; // C
boilingPoint = 1090; // C
thermalConductivity = 160.0; // W/mK
electricConductivity = 23.0; // MS/m
resistivity = 4.39999999e-8; // 4.4e-8 m Ohm (m * kg*m^2*s^-3*A^-2)
heatSpecific = 1020; // J/kgK
heatVaporization = 128; // kJ/mol
heatFusion = 8.7; // kJ/mol
ionization1st = 7.646; // eV
}
};
/**
* @brief Aluminium is a chemical element with the symbol Al and atomic
* number 13. Aluminium has a density lower than those of other common
* metals, at approximately one third that of steel. It has a great affinity
* towards oxygen, and forms a protective layer of oxide on the surface when
* exposed to air.
*/
class Aluminium : public Element {
public:
Aluminium() {
group = 13;
symbol = "Al";
type = "Post-Transition Metal";
crystal_type = "Face-Centered Cubic";
electron_configuration = "[Ne]3s2 3p1";
atomicWeight = 26.9815385; // 26.9815385 u (g/mol)
atomicNumber = 13; // 13
energyLevels = {2, 8, 3};
densitySTP = 2700; // 2700 kg/m^3
meltingPoint = 660.32; // 660.32 C
boilingPoint = 2519.0; // 2519C
thermalConductivity = 235; // 235 W/mK
electricConductivity = 38.0; // 38 MS/m
resistivity = 2.6e-8; // 2.6e-8 m Ohm (m * kg*m^2*s^-3*A^-2)
heatSpecific = 904.0; // 904 J/kgK
heatVaporization = 293.0; // 293 kJ/mol
heatFusion = 10.7; // 10.7 kJ/mol
ionization1st = 5.985; // eV
}
};
/**
* @brief Silicon is a chemical element with the symbol Si and atomic number
* 14. It is a hard, brittle crystalline solid with a blue-grey metallic
* lustre, and is a tetravalent metalloid and semiconductor. It is a member
* of group 14 in the periodic table: carbon is above it; and germanium, tin,
* lead and flerovium, are below it
*/
class Silicon : public Element {
public:
Silicon() {
group = 14;
symbol = "Si";
type = "Metalloid";
crystal_type = "Diamond Cubic";
electron_configuration = "[Ne]3s2 3p2";
atomicWeight = 28.085; // 28.085 u (g/mol)
atomicNumber = 14; //14
energyLevels = {2, 8, 4};
densitySTP = 2330.0; // 2330 kg/m^3
meltingPoint = 1414.0; // 1414 C
boilingPoint = 2900.0; // 2000 C
thermalConductivity = 150.0; // 150 W/mK
electricConductivity = .0010; // .0010 MS/m
resistivity = .001; // .001 m Ohm (m * kg*m^2*s^-3*A^-2)
heatSpecific = 710.0; // 710 J/kgK
heatVaporization = 359.0; // 359 kJ/mol
heatFusion = 50.2; // 50.2 kJ/mol
ionization1st = 8.151; // eV
}
};
/**
* @brief Phosphorus is a chemical element with the symbol P and atomic number
* 15. Elemental phosphorus exists in two major forms, white phosphorus and
* red phosphorus, but because it is highly reactive, phosphorus is never
* found as a free element on Earth.
*/
class Phosphorus : public Element {
public:
Phosphorus() {
group = 15;
symbol = "P";
type = "Reactive Nonmetal";
crystal_type = "Orthorhombic";
electron_configuration = "[Ne]3s2 3p3";
atomicWeight = 30.973761998; // 30.973761998 u (g/mol)
atomicNumber = 15; //15
energyLevels = {2, 8, 5};
densitySTP = 1823.0; // 1823 kg/m^3
meltingPoint = 44.15; // 44.15 C
boilingPoint = 280.5; // 280.5 C
thermalConductivity = .236; // .236 W/mK
electricConductivity = 10.0; // 10 MS/m
resistivity = 1e-7; // 1e-7 m Ohm (m * kg*m^2*s^-3*A^-2)
heatSpecific = 769.7; // 769.7 J/kgK
heatVaporization = 12.4; // 12.4 kJ/mol
heatFusion = .64; // .64 kJ/mol
ionization1st = 10.487; // eV
}
};
/**
* @brief Sulfur is a chemical element with the symbol S and atomic number 16.
* It is abundant, multivalent and nonmetallic. Under normal conditions,
* sulfur atoms form cyclic octatomic molecules with a chemical formula S₈.
* Elemental sulfur is a bright yellow, crystalline solid at room temperature
*/
class Sulfur : public Element {
public:
Sulfur() {
group = 16;
symbol = "S";
type = "Reactive Nonmetal";
crystal_type = "Orthorhombic";
electron_configuration = "[Ne]3s2 3p4";
atomicWeight = 32.06; // 32.06 u (g/mol)
atomicNumber = 16; // 16
energyLevels = {2, 8, 6};
densitySTP = 1960.0; // 1960.0 kg/m^3
meltingPoint = 115.21; // 115.21 C
boilingPoint = 444.72; // 444.72 C
thermalConductivity = .205; // .205 W/mK
electricConductivity = pow(1.0, -21); // 1e-21 MS/m
resistivity = 1e15; // 1e15 m Ohm (m * kg*m^2*s^-3*A^-2)
heatSpecific = 705.0; // 705 J/kgK
heatVaporization = 9.8; // 9.8 kJ/mol
heatFusion = 1.73; // 1.73 kJ/mol
ionization1st = 10.36; // eV
}
};
/**
* @brief Chlorine is a chemical element with the symbol Cl and atomic number 17.
* The second-lightest of the halogens, it appears between fluorine and
* bromine in the periodic table and its properties are mostly intermediate
* between them. Chlorine is a yellow-green gas at room temperature.
*/
class Chlorine : public Element {
public:
Chlorine() {
group = 17;
symbol = "Cl";
type = "Reactive Nonmetal";
crystal_type = "Orthorhombic";
electron_configuration = "[Ne]3s2 3p5";
atomicWeight = 35.45; // 35.45 u (g/mol)
atomicNumber = 17; //17
energyLevels = {2, 8, 7};
densitySTP = 3.214; // 3.214 kg/m^3
meltingPoint = -101.5; // -101.5 C
boilingPoint = -34.040; // -34.040 C
thermalConductivity = .0089; // .0089 W/mK
electricConductivity = pow(1.0, -8.0); // 1e-8 MS/m
resistivity = 100; // 100 m Ohm (m * kg*m^2*s^-3*A^-2)
heatSpecific = 478.2; // 478.2 J/kgK
heatVaporization = 10.2; // 10.2 kJ/mol
heatFusion = 3.2; // 3.2 kJ/mol
ionization1st = 12.968; // eV
}
};
/**
* @brief Argon is a chemical element with the symbol Ar and atomic number 18.
* It is in group 18 of the periodic table and is a noble gas. Argon is
* the third-most abundant gas in the Earth's atmosphere, at 0.934%
*/
class Argon : public Element {
public:
Argon() {
group = 18;
symbol = "Ar";
type = "Noble Gas";
crystal_type = "Face-Centered Cubic";
electron_configuration = "[Ne]3s2 3p6";
atomicWeight = 39.948; // 39.948 u (g/mol)
atomicNumber = 18; //18
energyLevels = {2, 8, 8};
densitySTP = 1784.0; // 1784 kg/m^3
meltingPoint = -189; // -189 C
boilingPoint = -186; // -186 C
thermalConductivity = .01772; // .01772 W/mK
electricConductivity = FP_NAN; // FP_NAN
resistivity = FP_NAN; // FP_NAN
heatSpecific = 520.33; // 520.33 J/kgK
heatVaporization = 6.5; // 6.5 kJ/mol
heatFusion = 1.18; // 1.18 kJ/mol
ionization1st = 15.760; // eV
}
};
/**
* @brief Potassium is a chemical element with the symbol K and atomic number 19.
* Potassium is a silvery-white metal that is soft enough to be cut with a
* knife with little force. Potassium metal reacts rapidly with atmospheric
* oxygen to form flaky white potassium peroxide in only seconds of exposure.
*/
class Potassium : public Element {
public:
Potassium() {
group = 1;
symbol = "K";
type = "Alkali Metal";
crystal_type = "Body-Centered Cubic";
electron_configuration = "[Ar]4s1";
atomicWeight = 39.0983; // 39.0983 u (g/mol)
atomicNumber = 19; // 19
energyLevels = {2, 8, 8, 1};
densitySTP = 856; // 856 kg/m^3
meltingPoint = 63.380; // 63.38C
boilingPoint = 758.9; // 758.9C
thermalConductivity = 100.0; // 100 W/mK
electricConductivity = 14.0; // 14 MS/m
resistivity = 7.000000000002e-8; // 7.0e-8 m Ohm (m * kg*m^2*s^-3*A^-2)
heatSpecific = 757; // 757 J/kgK
heatVaporization = 76.9; // 76.9 kJ/mol
heatFusion = 2.33; // 2.33kJ/mol
ionization1st = 4.341; // eV
}
};
/**
* @brief Calcium is a chemical element with the symbol Ca and atomic number 20.
* As an alkaline earth metal, calcium is a reactive metal that forms a
* dark oxide-nitride layer when exposed to air. ... It is the fifth most
* abundant element in Earth's crust, and the third most abundant metal,
* after iron and aluminium
*/
class Calcium : public Element {
public:
Calcium() {
group = 2;
symbol = "Ca";
type = "Alkaline Earth Metal";
crystal_type = "Face-Centered Cubic";
electron_configuration = "[Ar]4s2";
atomicWeight = 40.078; // 40.078 u (g/mol)
atomicNumber = 20; // 20
energyLevels = {2, 8, 8, 2};
densitySTP = 1550.0; // 1550kg/m^3
meltingPoint = 841.9; // 841.9C
boilingPoint = 1484; // 1484 C
thermalConductivity = 200.0; //200 W/mK
electricConductivity = 29; // 29 MS/m
resistivity = 3.39999999e-8; // 3.4e-8 m Ohm (m * kg*m^2*s^-3*A^-2)
heatSpecific = 631; // 631 J/kgK
heatVaporization = 155.0; // 155 kJ/mol
heatFusion = 8.54; // 8.54 kJ/mol
ionization1st = 6.113; // eV
}
};
/**
* @brief Scandium is a chemical element with the symbol Sc and atomic number 21.
* A silvery-white metallic d-block element, it has historically been
* classified as a rare-earth element, together with yttrium and the
* lanthanide.
*/
class Scandium : public Element {
public:
Scandium() {
group = 3;
symbol = "Sc";
type = "Transition Metal";
crystal_type = "Hexagonal Close Packed";
electron_configuration = "[Ar]3d1 4s2";
atomicWeight = 44.955908; // 44.955908 u (g/mol)
atomicNumber = 21; // 21
energyLevels = {2, 8, 9, 2};
densitySTP = 2985.0; // 2985 kg/m^3
meltingPoint = 1541.0; // 1541 C
boilingPoint = 2830.0; // 2830 C
thermalConductivity = 16; // 16W/mK
electricConductivity = 1.8; // 1.8 MS/m
resistivity = 5.5e-7; // 5.5e-7 m Ohm (m * kg*m^2*s^-3*A^-2)
heatSpecific = 567.0; // 567 J/kgK
heatVaporization = 318.0; // 318 kJ/mol
heatFusion = 16.0; // 16 kJ/mol
ionization1st = 6.562; // eV
}
};
/**
* @brief Titanium is a chemical element with the symbol Ti and atomic number 22.
* Its atomic weight is 47.867 measured in daltons. It is a lustrous
* transition metal with a silver color, low density, and high strength.
* Titanium is resistant to corrosion in sea water, aqua regia, and chlorine.
*/
class Titanium : public Element {
public:
Titanium() {
group = 4;
symbol = "Ti";
type = "Transition Metal";
crystal_type = "Hexagonal Close Packed";
electron_configuration = "[Ar]3d2 4s2";
atomicWeight = 47.867; // 47.867 u (g/mol)
atomicNumber = 22; //22
energyLevels = {2, 8, 10, 2};
densitySTP = 4507.0; // 4507 kg/m^3
meltingPoint = 1668.0; // 1668 C
boilingPoint = 3287.0; // 3287 C
thermalConductivity = 22.0; // 22.0 W/mK
electricConductivity = 2.5; // 2.5 MS/m
resistivity = 4e-7; // 4e-7 m Ohm (m * kg*m^2*s^-3*A^-2)
heatSpecific = 520.0; // 525 J/kgK
heatVaporization = 425.0; // 425 kJ/mol
heatFusion = 18.7; // 18.7 kJ/mol
ionization1st = 6.828; // eV
}
};
/**
* @brief Vanadium is a chemical element with the symbol V and atomic number 23.
* It is a hard, silvery-grey, malleable transition metal. The elemental
* metal is rarely found in nature, but once isolated artificially, the
* formation of an oxide layer somewhat stabilizes the free metal against
* further oxidation.
*/
class Vanadium : public Element {
public:
Vanadium() {
group = 5;
symbol = "V";
type = "Transition Metal";
crystal_type = "Body-Centered Cubic";
electron_configuration = "[Ar]3d3 4s2";
atomicWeight = 50.9415; // 50.9415 u (g/mol)
atomicNumber = 23; //23
energyLevels = {2, 8, 11, 2};
densitySTP = 6110; // 6110 kg/m^3
meltingPoint = 1910; // 1910 C
boilingPoint = 3407; // 3407 C
thermalConductivity = 31; // 31 W/mK
electricConductivity = 5; // 5 MS/m
resistivity = 2e-7; // 2e-7 m Ohm (m * kg*m^2*s^-3*A^-2)
heatSpecific = 489; // 489 J/kgK
heatVaporization = 453; // 453 kJ/mol
heatFusion = 22.8; // 22.8 kJ/mol
ionization1st = 6.746; // eV
}
};
/**
* @brief Chromium is a chemical element with the symbol Cr and atomic number 24.
* It is the first element in group 6. It is a steely-grey, lustrous, hard, and
* brittle transition metal. Chromium is the main additive in stainless steel,
* to which it adds anti-corrosive properties.
*/
class Chromium : public Element {
public:
Chromium() {
group = 6;
symbol = "Cr";
type = "Transition Metal";
crystal_type = "Body-Centered Cubic";
electron_configuration = "[Ar]3d5 4s1";
atomicWeight = 51.996; // 51.996 u (g/mol)
atomicNumber = 24; //24
energyLevels = {2, 8, 13, 1};
densitySTP = 7190; // 7190 kg/m^3
meltingPoint = 1907; // 1907 C
boilingPoint = 2671; // 2671 C
thermalConductivity = 94; // 94 W/mK
electricConductivity = 7.9; // 7.9 MS/m
resistivity = 1.3e-7; // 1.3e-7 m Ohm (m * kg*m^2*s^-3*A^-2)
heatSpecific = 448; // 448 J/kgK
heatVaporization = 339; // 339 kJ/mol
heatFusion = 20.5; // 20.5 kJ/mol
ionization1st = 6.767; // eV
}
};
/**
* @brief Manganese is a chemical element with the symbol Mn and atomic number 25.
* It is not found as a free element in nature; it is often found in minerals
* in combination with iron. Manganese is a transition metal with a
* multifaceted array of industrial alloy u (g/mol)ses, particularly in
* stainless steels.
*/
class Manganese : public Element {
public:
Manganese() {