Class ChemicalComponent
- Direct Known Subclasses:
Solvent
A chemical component is a canocical chemical entity that cannot be divided, from which other chemical species can be produced according to chemical reactions.
The total concentration of a component is defined as the sum of the
concentration of the chemical species associated to the component and the
concentrations of all the species compound from the component. This total
concentration is defined by the user. The chemmisol library then dispatch the
total concentration among all species produced from this component when
ChemicalSystem.solve()
is called. It consequence, when the chemical
system is at equilibrium, the total concentration of a component generally
does not correspond the concentration of its associated chemical
species.
The total concentration of a chemical component can be set using ChemicalSystem.setTotalConcentration(ChemicalComponent, double)
.
- See Also:
-
Constructor Summary
ConstructorDescriptionChemicalComponent
(String name, Phase phase, double total_concentration) Initializes a chemical component associated to a new ChemicalSpecies with the specified name and phase.ChemicalComponent
(ChemicalSpecies species, double total_concentration) Initializes a chemical component associated to the specified species. -
Method Summary
-
Constructor Details
-
ChemicalComponent
Initializes a chemical component associated to the specified species.- Parameters:
species
- ChemicalSpecies associated to the new ChemicalComponent. By convention, the name of the component corresponds to the name of the associated species.total_concentration
- Initial total concentration of the component.
-
ChemicalComponent
Initializes a chemical component associated to a new ChemicalSpecies with the specified name and phase.- Parameters:
name
- Name of the chemical species associated to the new chemical component. By convention, the name of the component corresponds to the name of the associated species.phase
- Phase of the chemical species associated to the new chemical component.total_concentration
- Initial total concentration of the component.
-
-
Method Details
-
getSpecies
Gets the species associated to this component.- Returns:
- species associated to this component
-
getName
Gets the name of the component, i.e. the name of its associated species.- Returns:
- name of this component
-
getPhase
Gets the phase of the species associated to this component.- Returns:
- phase of the species associated to this component
-
getTotalConcentration
public double getTotalConcentration()Gets the total concentration of this component.- Returns:
- total concentration of this component
-