Started on ChemThermal enum
I might just merge this with chemElement enum when finished. However, for now its a bit hard to work with just one. So i started to create a version just for thermal properties. Main use for my mods will be heating values.
This commit is contained in:
parent
d70f858392
commit
50b1dcabcd
2 changed files with 52 additions and 29 deletions
|
@ -1,6 +1,9 @@
|
||||||
package com.builtbroken.common;
|
package com.builtbroken.common;
|
||||||
|
|
||||||
/** List of element from the periodic table of elements for any kind of use
|
/** List of element from the periodic table of elements for any kind of use. Is not complete for all
|
||||||
|
* parts but each element should have a listed names, symbol, and atomic mass. Atomic number should
|
||||||
|
* be the placement # in the list. Var ZERO should not be used as its designed to offset the
|
||||||
|
* placement of all elements by one
|
||||||
*
|
*
|
||||||
* @Source http://www.periodictable.com/Properties/A/SpecificHeat.an.html
|
* @Source http://www.periodictable.com/Properties/A/SpecificHeat.an.html
|
||||||
* @source http://www.chemicalelements.com/
|
* @source http://www.chemicalelements.com/
|
||||||
|
@ -8,7 +11,9 @@ package com.builtbroken.common;
|
||||||
* @author Robert Seifert */
|
* @author Robert Seifert */
|
||||||
public enum ChemElement
|
public enum ChemElement
|
||||||
{
|
{
|
||||||
Hydrogen("Hydrogen", "H", 1.00794f, 0.08988f, 14.009985f, 20.280005f),
|
/** Placeholder so that hydrogen starts as number one */
|
||||||
|
ZERO("ZERO", "ZERO", 0, 0),
|
||||||
|
Hydrogen("Hydrogen", "H", 1.00794f, 0.08988f),
|
||||||
Helium("Helium", "He", 4.002602f, 0.1785f),
|
Helium("Helium", "He", 4.002602f, 0.1785f),
|
||||||
Lithium("Lithium", "Li", 6.941f, 0.53f),
|
Lithium("Lithium", "Li", 6.941f, 0.53f),
|
||||||
Beryllium("Beryllium", "Be", 9.012182f, 1.8477f),
|
Beryllium("Beryllium", "Be", 9.012182f, 1.8477f),
|
||||||
|
@ -124,37 +129,19 @@ public enum ChemElement
|
||||||
Ununquadium("Ununquadium", "Uuq", 289f),
|
Ununquadium("Ununquadium", "Uuq", 289f),
|
||||||
Ununpentium("Ununpentium", "Uup", 288f),
|
Ununpentium("Ununpentium", "Uup", 288f),
|
||||||
Ununhexium("Ununhexium", "Uuh", 292f);
|
Ununhexium("Ununhexium", "Uuh", 292f);
|
||||||
;
|
|
||||||
|
|
||||||
public float specificHeatSolid, specificHeatGas, specificHeatLiquid;
|
|
||||||
/** g/cm^3 */
|
/** g/cm^3 */
|
||||||
public float density;
|
public float density;
|
||||||
/** amu */
|
/** amu */
|
||||||
public float atomicMass;
|
public float atomicMass;
|
||||||
|
|
||||||
/** Melting point in kelvin */
|
|
||||||
public float meltingPointKelvin;
|
|
||||||
/** boiling point in kelvin */
|
|
||||||
public float boilignPointKelving;
|
|
||||||
|
|
||||||
public String elementName = "element";
|
public String elementName = "element";
|
||||||
public String elementSymbol = "element";
|
public String elementSymbol = "element";
|
||||||
|
|
||||||
private ChemElement()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private ChemElement(String name, String symbol)
|
|
||||||
{
|
|
||||||
this();
|
|
||||||
this.elementName = name;
|
|
||||||
this.elementSymbol = symbol;
|
|
||||||
}
|
|
||||||
|
|
||||||
private ChemElement(String name, String symbol, float atomicMass)
|
private ChemElement(String name, String symbol, float atomicMass)
|
||||||
{
|
{
|
||||||
this(name, symbol);
|
this.elementName = name;
|
||||||
|
this.elementSymbol = symbol;
|
||||||
this.atomicMass = atomicMass;
|
this.atomicMass = atomicMass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,11 +151,4 @@ public enum ChemElement
|
||||||
this.density = density;
|
this.density = density;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ChemElement(String name, String symbol, float atomicMass, float density, float meltingPointK, float boilingPointK)
|
|
||||||
{
|
|
||||||
this(name, symbol, atomicMass, density);
|
|
||||||
this.meltingPointKelvin = meltingPointK;
|
|
||||||
this.boilignPointKelving = boilingPointK;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
43
src/com/builtbroken/common/ChemThermal.java
Normal file
43
src/com/builtbroken/common/ChemThermal.java
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
package com.builtbroken.common;
|
||||||
|
|
||||||
|
/** List of elements and thier themal properties
|
||||||
|
*
|
||||||
|
* @Source http://www.periodictable.com/Properties/A/SpecificHeat.an.html
|
||||||
|
* @source http://www.chemicalelements.com/
|
||||||
|
* @source http://www.lenntech.com/periodic/periodic-chart.htm
|
||||||
|
* @author Robert Seifert */
|
||||||
|
public enum ChemThermal
|
||||||
|
{
|
||||||
|
/** Placeholder so that hydrogen starts as number one */
|
||||||
|
ZERO(),
|
||||||
|
Hydrogen(),
|
||||||
|
Helium(),
|
||||||
|
Lithium(),
|
||||||
|
Beryllium(),
|
||||||
|
Boron(),
|
||||||
|
Carbon(),
|
||||||
|
Nitrogen(),
|
||||||
|
Oxygen();
|
||||||
|
|
||||||
|
public Phase phase = Phase.Solid;
|
||||||
|
public float meltingPointKelvin;
|
||||||
|
public float boilingPointKelvin;
|
||||||
|
public float heatOfFusion;
|
||||||
|
public float heatOfVaporization;
|
||||||
|
public float specificHeatSolid;
|
||||||
|
public float specificHeatLiquid;
|
||||||
|
public float specificHeatGas;
|
||||||
|
public float thermalConductivity;
|
||||||
|
public float thermalExpansion;
|
||||||
|
|
||||||
|
private ChemThermal()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static enum Phase
|
||||||
|
{
|
||||||
|
Solid(), Liquid(), Gas(), Plasma();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue